chore: auto-commit (97 archivos)
- .claude/CLAUDE.md - .claude/agents/fn-recopilador/SKILL.md - .claude/rules/INDEX.md - .claude/rules/cpp_apps.md - bash/functions/infra/build_cpp_windows.sh - cpp/CMakeLists.txt - cpp/PATTERNS.md - cpp/framework/app_base.cpp - cpp/framework/app_base.h - dev/issues/README.md - ... Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
---
|
||||
name: keepass_get
|
||||
kind: function
|
||||
lang: bash
|
||||
domain: infra
|
||||
version: "1.0.0"
|
||||
purity: impure
|
||||
signature: "keepass_get(entry: string, attr?: string) -> string"
|
||||
description: "Lee un atributo (Password por defecto) de una entry del KeePassXC database via keepassxc-cli. Resuelve master password desde pass (meta/keepassxc-master) o env KEEPASS_PASSWORD."
|
||||
tags: [keepass, keepassxc, secret, credential, get]
|
||||
uses_functions: []
|
||||
uses_types: []
|
||||
returns: []
|
||||
returns_optional: false
|
||||
error_type: "error_go_core"
|
||||
imports: []
|
||||
params:
|
||||
- name: entry
|
||||
desc: "path de la entry dentro del .kdbx (ej. 'Servers/prod-mysql')"
|
||||
- name: attr
|
||||
desc: "atributo a leer (Password, UserName, URL, Notes, Title); default Password"
|
||||
output: "valor del atributo en texto plano (sin newline final)"
|
||||
tested: false
|
||||
tests: []
|
||||
test_file_path: ""
|
||||
file_path: "bash/functions/infra/keepass_get.sh"
|
||||
---
|
||||
|
||||
## Ejemplo
|
||||
|
||||
```bash
|
||||
export KEEPASS_DB="/mnt/d/Tr4Shhh_FOLDER/Sync/PssDtbs/PassDataBase.kdbx"
|
||||
source keepass_get.sh
|
||||
|
||||
pwd=$(keepass_get "Servers/prod-mysql")
|
||||
user=$(keepass_get "Servers/prod-mysql" UserName)
|
||||
```
|
||||
|
||||
## Setup
|
||||
|
||||
Master password se guarda una vez en pass:
|
||||
|
||||
```bash
|
||||
pass insert meta/keepassxc-master
|
||||
```
|
||||
|
||||
## Notas
|
||||
|
||||
- Wrappea `keepassxc-cli show -s -a <attr>`.
|
||||
- Cada call reabre la BD (CLI stateless). Para batch, usa `keepass_dump`.
|
||||
- `KEEPASS_PASSWORD` env tiene prioridad sobre `pass`.
|
||||
Reference in New Issue
Block a user