feat: add export/import functionality for backup and migration
Implemented roadmap #4: Export/import functionality. Features: - export <file> <key1> [key2...] - Export specified keys to JSON - export-list <keyfile> <output> - Bulk export from key list file - import <file> - Import keys from JSON file --skip-existing (default) - Skip keys that already exist --overwrite - Overwrite existing keys Export file format (v1.0): { "version": "1.0", "entries": [ { "key": "users/alice", "uuid": "...", "timestamp": 1234567890, "data": {...} } ] } The format preserves UUIDs and timestamps for audit trails. Export shows progress with ✓/✗/⊘ symbols for success/fail/not-found. Import checks for existing keys and respects skip/overwrite flags. Use cases: - Backup: export-list keys.txt backup.json - Migration: import backup.json --overwrite - Selective sync: export dest.json key1 key2 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -60,6 +60,13 @@ Group Management:
|
||||
group add-member <uuid> <user-uuid> - Add member to group
|
||||
group remove-member <uuid> <user-uuid> - Remove member from group
|
||||
|
||||
Export/Import:
|
||||
export <file> <key1> ... - Export keys to JSON file
|
||||
export-list <keyfile> <output> - Export keys listed in file
|
||||
import <file> - Import keys from JSON file
|
||||
--skip-existing - Skip existing keys (default)
|
||||
--overwrite - Overwrite existing keys
|
||||
|
||||
Batch Operations:
|
||||
batch <file> - Execute commands from file
|
||||
source <file> - Alias for batch
|
||||
|
Reference in New Issue
Block a user