---
name: keepass_to_pass
kind: pipeline
lang: bash
domain: pipelines
version: "1.0.0"
purity: impure
signature: "keepass_to_pass [--prefix <p>] [--overwrite] [--dry-run]"
description: "Pipeline que exporta todas las entries del KeePassXC database a `pass`. Cada entry queda como multilinea (password en linea 1, metadata user/url/notes en lineas siguientes). Path en pass: <prefix>/<keepass_path>."
tags: [keepass, pass, migration, secret, credential, pipeline, launcher]
uses_functions:
  - keepass_dump_bash_infra
  - pass_set_bash_infra
uses_types: []
returns: []
returns_optional: false
error_type: "error_go_core"
imports: []
params:
  - name: prefix
    desc: "prefijo en pass (default: keepass)"
  - name: overwrite
    desc: "flag para sobreescribir entradas existentes"
  - name: dry_run
    desc: "flag para no escribir, solo listar"
output: "log de operaciones a stdout (IMPORT/SKIP/DRY/FAIL por entry, summary final)"
tested: false
tests: []
test_file_path: ""
file_path: "bash/functions/pipelines/keepass_to_pass.sh"
---

## Ejemplo

```bash
# Setup primera vez
pass insert meta/keepassxc-master
export KEEPASS_DB="/mnt/d/Tr4Shhh_FOLDER/Sync/PssDtbs/PassDataBase.kdbx"

# Dry run
./fn run keepass_to_pass --dry-run

# Importar todo (skip si existe en pass)
./fn run keepass_to_pass

# Forzar sobreescritura
./fn run keepass_to_pass --overwrite

# Otro prefijo
./fn run keepass_to_pass --prefix import/keepass
```

## Notas

- Despues del import, todo lo que estaba en KeePassXC es accesible para Claude via `pass_get_bash_infra`.
- Espacios en paths se sustituyen por `_` (pass no permite espacios sin escapado).
- Entries sin password se omiten (counter `empty`).
- `~/.password-store` se sincroniza entre PCs via `/full-git-push` y `/full-git-pull` ya existentes.
- Para revertir un import: `pass rm -r keepass/`.
