#75 Add account management commands and --as flag

closed high · sable · 2026-03-02 23:37 · closed 2026-03-02 23:37 · feature · Phase 1: CLI Foundation

Comments — 1

sable note 2026-03-02 23:37

Implements #52 + #53 from the plan:

Part 1 (#52): Account management commands

  • config.rs: resolve_handle_or_did(), remove_account() with tests
  • commands/accounts.rs: list all accounts, mark default with *
  • commands/set_default.rs: switch default by handle or DID
  • commands/logout.rs: remove account config + data directory
  • main.rs: global --as flag, new command variants

Part 2 (#53): Execute trait refactor

  • Execute::execute now takes &CommandContext
  • login.rs standalone execute() (no trait)
  • run_with_context() generic helper in main.rs
  • Removed load_client_default(), load_identity_default()
  • resolve_context delegates to resolve_handle_or_did

174 tests passing, clippy clean.

Generated 2026-03-03 02:53 UTC