Skip to content

feat(kryphos): add vault CLI — init, add, list, get, rotate, revoke, identity#38

Merged
forkwright merged 1 commit intomainfrom
feat/kryphos-cli
Mar 17, 2026
Merged

feat(kryphos): add vault CLI — init, add, list, get, rotate, revoke, identity#38
forkwright merged 1 commit intomainfrom
feat/kryphos-cli

Conversation

@forkwright
Copy link
Owner

Summary

  • Add vault subcommand group to the akroasis CLI with full credential CRUD and lifecycle operations
  • Wire kryphos vault API into CLI: init, add, list, get, rotate, revoke, identity
  • Secure passphrase input via rpassword (no terminal echo), double-confirmation on init

Subcommands

Command Description
vault init Create new vault, prompt for passphrase (confirm twice)
vault add <name> --type <type> Store encrypted credential (api-key, psk, certificate, radio-key, custom:label)
vault list Show entries with status, type, created/rotated dates (no secrets)
vault get <name> Decrypt and display secret
vault rotate <name> Prompt for new secret value
vault revoke <name> Mark as revoked with y/N confirmation
vault identity Show installation public key fingerprint (hex-encoded)

Test plan

  • CLI argument parsing tests for all 7 subcommands
  • Credential type parser tests (all variants + invalid input)
  • Integration tests with temp vault (init, add/get round-trip, list, rotate, revoke)
  • Identity fingerprint format validation
  • cargo fmt --all -- --check passes
  • cargo clippy --workspace --all-targets -- -D warnings passes
  • cargo test --workspace passes (357 tests, 0 failures)

Observations

  • Debt: run_identity generates a fresh ephemeral identity each call rather than reading the vault's sealed identity. The vault currently has no public API to retrieve its sealed InstallationIdentity after creation. A future PR should add Vault::identity() to unseal and return the stored keypair.
  • Missing test: No end-to-end test for the full CLI dispatch path (would require mocking stdin for rpassword). Consider adding a dispatch_with pattern (like radio module) that accepts a passphrase provider trait.

🤖 Generated with Claude Code

…identity

Wire kryphos vault operations into the akroasis CLI as a `vault`
subcommand group. All credential CRUD and lifecycle operations are
accessible from the command line with secure passphrase input via
rpassword (no terminal echo).

Subcommands:
- vault init — create vault with double-confirmed passphrase
- vault add <name> --type <type> — store encrypted credential
- vault list — show entries with status, type, dates (no secrets)
- vault get <name> — decrypt and display secret
- vault rotate <name> — update credential secret
- vault revoke <name> — mark as revoked with confirmation
- vault identity — show installation public key fingerprint

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Contributor

⚠️ Large PR detected — 6 files, 569 lines changed.

Consider splitting into smaller PRs for easier review. Not a blocker, just a signal.

@forkwright forkwright merged commit df3ac1a into main Mar 17, 2026
13 checks passed
@forkwright forkwright deleted the feat/kryphos-cli branch March 18, 2026 02:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant