A simple command-line key-value storage tool for persisting personal credentials, passwords, API keys, etc.
- Simple interactive command-line interface
- Persistent data storage
- Full CRUD operations
- Pretty table output
- Automatic duplicate tag handling (adds
-1,-2suffix) - Cross-platform support (macOS / Linux / Windows)
Each entry contains three fields:
- Tag - Tag name to identify the entry (e.g., "Google", "GitHub")
- Account - Username or email
- Password - Password or API key
# Clone the project
cd kv_storage
# Build release
cargo build --releaseAfter compilation, the executable is at target/release/kv_storage
First-time use requires initialization:
kv_storage initInteractive adding:
kv_storage addFollow the prompts to enter Tag, Account, and Password.
If the tag already exists, it will automatically append a suffix like -1, -2, etc. to avoid duplicates.
List all stored entries (shows all fields including password):
kv_storage listOutput:
Total 2 entries:
┌────────┬──────────────────┬──────────────┐
│ Tag │ Account │ Password │
├────────┼──────────────────┼──────────────┤
│ GitHub │ user │ mypass │
│ Google │ user@gmail.com │ apikey123 │
└────────┴──────────────────┴──────────────┘
Fuzzy search by tag, show password in plain text:
kv_storage get <keyword>Searches for all entries whose tag contains the keyword and displays the password.
Edit an existing entry by exact tag:
kv_storage edit <tag>Leave empty to keep the current value.
Delete entry by exact tag:
kv_storage delete <tag>
# or use the shorthand alias
kv_storage del <tag>Requires confirmation before deletion.
Clear all entries (requires confirmation):
kv_storage clearThis operation is irreversible.
Data file is stored in the system standard application data directory:
- macOS:
~/Library/Application Support/kv_storage/storage.bin - Linux:
~/.local/share/kv_storage/storage.bin - Windows:
%APPDATA%\kv_storage\storage.bin
This project uses these Rust crates:
- clap - Command-line argument parsing
- serde - Serialization
- bincode - Binary serialization format
- directories - Get standard application directories
- dialoguer - Interactive command-line prompts
- colored - Terminal colored output
- chrono - Timestamps
- tempfile - Atomic file writes
MIT