Skip to content

Conversation

@beengud
Copy link
Contributor

@beengud beengud commented Dec 6, 2025

Summary

  • Added disk-backed AccountStore with JSON persistence to platform config directory
  • Updated CLI commands (add/list/remove) to use AccountStore
  • Comprehensive integration tests for account lifecycle

Changes

  • sigilforge-core/src/account_store.rs - New AccountStore implementation
  • sigilforge-cli/src/main.rs - CLI handlers now use persistent storage
  • sigilforge-core/tests/account_lifecycle.rs - 17 integration tests

Test plan

  • Account metadata persists under platform config dir
  • CLI reflects stored accounts
  • CLI exits non-zero on missing accounts
  • All tests pass

Closes #7

🤖 Generated with Claude Code

Add disk-backed AccountStore using JSON and platform config paths for
CRUD operations on account metadata. Update CLI commands (add/list/remove)
to use AccountStore and delete secrets on removal.

Changes:
- Add AccountStore with JSON persistence under ~/.config/sigilforge/
- Implement add_account, get_account, list_accounts, remove_account
- Update CLI handlers to use AccountStore for all operations
- Add error handling with non-zero exit for missing accounts
- Add comprehensive integration tests in account_lifecycle.rs
- Add directories and tempfile dependencies

The AccountStore provides platform-specific storage using the
directories crate, with proper error handling and thread safety
via Arc<RwLock>. CLI now reflects persisted accounts and provides
user feedback on storage location.

Tests cover happy paths, error cases, persistence, and edge cases
like duplicate accounts, filtering, and service ID normalization.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@beengud beengud merged commit 02c168f into main Dec 6, 2025
1 of 12 checks passed
@beengud beengud deleted the feat/issue-7-account-store branch December 6, 2025 21:57
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.

Implement AccountStore persistence and wire CLI CRUD

2 participants