Skip to content

feat(vdb): multi-vault resolver + named-vault registry (CLI foundation)

Ben requested to merge feat/vdb-resolve-registry into main

First slice of the unified vdb CLI (docs/vdb-cli-plan.md, build-order step 2).

Adds the context-resolution core everything else depends on:

  • resolve_vault() — locked precedence, first match wins: --vault > --context > $VDB_VAULT > walk-up to nearest vdb-config.yaml > registry default > unresolved.
  • Named-vault registry at ~/.config/vdb/config.toml (XDG), hand-rolled TOML writer / stdlib tomllib reader — backs vdb context add/use/list/remove.
  • format_status() for vdb status (kubectl-style resolved-vault + why).

Pure functions, injectable env/cwd/registry path, no TUI/yaml dep. tests/test_resolve.py covers full precedence, registry mutations, walk-up, status. Full suite green.

No behavior change to existing scripts — new module only.

🤖 Generated with Claude Code

Merge request reports

Loading