Smart Password Manager CLI (Rust)
Command line interface for smart password management built on smartpasslib. Generate deterministic passwords from secret phrases without storing them. No cloud, no database, no trust required.
Overview
Smart Password Manager CLI is a Unix-style command line utility for managing smart passwords — passwords that are regenerated on demand from a secret phrase instead of being stored. It is built on top of the smartpasslib library and uses the same cryptographic algorithm as the Python, JavaScript, Kotlin, Go and C# implementations.
The application stores only public verification keys, descriptions and lengths. Your secret phrase and the actual passwords are never written to disk. Passwords are recalculated whenever you need them.
The CLI is designed to be scriptable: passwords go to stdout, everything else goes to stderr, so you can pipe the password into xclip, pbcopy, wl-copy, or any other tool.
Decentralized by design: no cloud, no database, no third-party trust required. Your secrets never leave your device.
Core Principles
- Zero-Storage Security: No passwords or secret phrases are ever stored or transmitted
- Decentralized Architecture: No central servers, no cloud dependency, no third-party trust required
- Deterministic Regeneration: Passwords are recreated identically from your secret phrase
- Metadata Only: Only public keys, descriptions and lengths are stored
- Scriptable Output: Passwords go to stdout, diagnostics go to stderr
- On-Demand Discovery: Passwords exist only when you generate them
Key Features
- Decentralized & Serverless: No central database, no cloud lock-in, complete user sovereignty
- No Password Database: Eliminates password storage completely
- Deterministic Password Generation: Same secret + same length = same password, always, on every platform
- Public Key Verification: Verify secret knowledge without exposure
- Unix-friendly: stdout for passwords, stderr for everything else — pipe anywhere
- Multiple Secret Input Methods: interactive prompt,
--secret,--secret-stdin,SPM_SECRET - JSON Output:
--jsononlistandgetfor scripting - Clipboard Copy:
--copypipes towl-copy,xclip,xselorpbcopywhen available, and falls back to OSC 52 for compatible terminals - Terminal QR:
--qrrenders the password as a QR code directly in the terminal with ANSI colors — scannable by phone, works on any tty - Cross-Platform Data: Same
passwords.jsonformat as the Python, JavaScript, Kotlin, Go and C# implementations - No Network Access: Runs entirely offline
Installation
Option 1: cargo install
The simplest way, if you have Rust installed:
Then run:
Option 2: Prebuilt binaries
Download the Linux musl binary from GitHub Releases:
https://github.com/smartlegionlab/smart-password-manager-cli-rs/releases
The musl build is statically linked and runs on any modern Linux distribution without additional dependencies.
Option 3: One-command install (Linux)
|
Installs the binary to ~/.local/bin/.
Uninstall
|
Your password metadata in ~/.config/smart_password_manager/passwords.json is never touched. Delete it manually if you want to remove it:
Quick Usage Guide
Add an entry
Prompts for the secret phrase interactively. Alternatively:
# from environment (recommended for scripts)
SPM_SECRET='MyStrongSecretPhrase2026!' \
# from stdin (safest, never appears in shell history or ps)
| \
Get a password
# stdout
# pipe to system clipboard
|
|
|
# or use --copy (system clipboard tools + OSC 52 fallback)
# render as QR in the terminal (ANSI colors, scannable by phone)
# machine-readable
List entries
Edit metadata
Delete an entry
Verify a secret
Exits with code 0 if the secret matches, 1 otherwise — usable in scripts.
Command Reference
Global
smart-password-manager-cli --help
smart-password-manager-cli --version
add
add --description <TEXT> [--length <N>] [--secret <TEXT> | --secret-stdin]
get
get (--key <KEY> | --description <TEXT>)
[--secret <TEXT> | --secret-stdin]
[--copy] [--qr] [--json]
list
list [--json]
delete
delete (--key <KEY> | --description <TEXT>) [--yes]
edit
edit (--key <KEY> | --description <TEXT>)
[--new-description <TEXT>] [--new-length <N>]
verify
verify (--key <KEY> | --description <TEXT>) [--secret <TEXT> | --secret-stdin]
Secret Phrase Input
The secret phrase can be provided in four ways, tried in this order:
--secret <TEXT>— direct argument (visible inps, not recommended)--secret-stdin— read from stdin (safest for scripts)SPM_SECRETenvironment variable — convenient for CI- Interactive prompt via
rpassword— no echo, default for humans
Clipboard Notes
--copy works in interactive terminals:
- First, it pipes the password to the first available system tool:
wl-copy(Wayland),xcliporxsel(X11),pbcopy(macOS). - If none of those are installed, it falls back to an OSC 52 escape sequence written to stdout. Most modern terminals (
kitty,alacritty,wezterm,iTerm2,Windows Terminal,GNOME Terminal,Konsole,tmuxwithset-clipboard on) and SSH sessions support this.
In non-interactive shells (pipes, CI), --copy cannot reach the clipboard. Use a shell pipeline instead:
|
|
|
QR Notes
--qr renders the password as a QR code directly in the terminal, using ANSI background colors so that the QR appears as black modules on a white background. This is what phone scanners expect, and it works even on a bare Linux console without a graphical session.
If the terminal does not support ANSI colors, the QR may not be readable. In that case, pipe the password to a QR encoder on a machine with a graphical session, or use the --json flag and process the password elsewhere.
Data Storage
Only public keys, descriptions and lengths are stored, as JSON. The file location follows the standard user data directory convention:
| Platform | Path |
|---|---|
| Linux | ~/.config/smart_password_manager/passwords.json |
| macOS | ~/.config/smart_password_manager/passwords.json |
| Windows | %USERPROFILE%\.config\smart_password_manager\passwords.json |
Format:
What is NOT stored:
- Your secret phrase
- The actual password
- Any reversible password data
What IS stored:
- Public verification key (a hash derived from the secret)
- Service description
- Password length
Data Compatibility
- Uses the same
~/.config/smart_password_manager/passwords.jsonformat as the Python, JavaScript, Kotlin, Go and C# implementations - Same algorithm, so metadata can be moved between platforms without conversion
- The Rust TUI (
smart-password-manager-tui) and GUI (smart-password-manager) share the same file
Security Model
- Proof of knowledge: Public keys verify secrets without exposing them
- Decentralized trust: No third party needed — you control your secrets completely
- Deterministic security: Same secret + same length = same password, always
- Metadata separation: Non-sensitive data stored separately from verification
- Local processing: No data leaves your computer
- No recovery backdoors: Lost secret phrase = permanently lost access, by design
Decentralized Nature
There is no "forgot password" button. This is by design:
- No central server can reset your passwords
- No support team can recover your access
- Your secret phrase is the ONLY key
This is the price of true decentralization — you are completely in control.
Security Warnings
Secret Phrase Security
Your secret phrase is the cryptographic master key
- Permanent data loss: Lost secret phrase = irreversible loss of all derived passwords
- No recovery mechanisms: No password recovery, no secret reset, no administrative override
- Deterministic generation: Identical input (secret + length) = identical output (password)
- Single point of failure: Secret phrase is the sole authentication factor for all passwords
- Secure storage required: Digital storage of secret phrases is prohibited
Critical: Test password regeneration with non-essential accounts before production use.
Secret Phrase Requirements
- Minimum 12 characters (enforced by the application)
- Case-sensitive
- Use a mix of: uppercase, lowercase, numbers, symbols, emoji, or Cyrillic
- Never store digitally
- NEVER use your password description as your secret phrase
Strong Secret Examples
✅ "MyStrongSecretPhrase2026!" — mixed case + numbers + symbols
✅ "P@ssw0rd!LongSecret" — special chars + numbers + length
✅ "КотБегемот2026НаДиете" — Cyrillic + numbers
✅ "Correct-Horse-Battery-42" — memorable phrase with separator
Weak Secret Examples (avoid)
❌ "short" — too short, rejected
❌ "GitHub Account" — using description as secret (weak!)
❌ "password" — dictionary word, too short
❌ "1234567890" — only digits, too short
❌ "qwerty123" — keyboard pattern
❌ Same as description — never use the same value as description
Password Length Requirements
- Smart passwords: 12–100 characters
Technical Foundation
Powered by smartpasslib — the core library for deterministic password generation.
Key derivation:
| Key Type | Iterations | Purpose |
|---|---|---|
| Private Key | 15–30 (dynamic) | Password generation (never stored, never transmitted) |
| Public Key | 45–60 (dynamic) | Verification (stored locally) |
Character set (Google-compatible):
!@#$%^&*()_+-=[]{};:,.<>?/ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz
Validation rules:
- Secret phrase: minimum 12 characters
- Password length: 12–100 characters
Cross-Platform Implementations
The same deterministic algorithm is available in multiple languages. Smart Password Manager CLI produces identical passwords to:
| Language | Repository |
|---|---|
| Python | smartpasslib |
| JavaScript | smartpasslib-js |
| Kotlin | smartpasslib-kotlin |
| Go | smartpasslib-go |
| C# | smartpasslib-csharp |
| Rust | smartpasslib-rs |
Data transfer: Metadata can be moved between platforms through the shared passwords.json format.
Research Paradigms & Publications
- Pointer-Based Security Paradigm — Architectural Shift from Data Protection to Data Non-Existence
- Local Data Regeneration Paradigm — Ontological Shift from Data Transmission to Synchronous State Discovery
Build from Source
Requirements:
- Rust 1.88 or newer (edition 2024)
- Cargo
For development:
Ecosystem
Core Libraries:
- smartpasslib — Python
- smartpasslib-js — JavaScript
- smartpasslib-kotlin — Kotlin
- smartpasslib-go — Go
- smartpasslib-csharp — C#
- smartpasslib-rs — Rust
CLI Applications:
- CLI Smart Password Manager (Python)
- CLI Smart Password Generator (Python)
- CLI Smart Password Manager (C#)
- CLI Smart Password Generator (C#)
- CLI Smart Password Manager (Rust) — this project
Desktop Applications:
- Desktop Smart Password Manager (Python)
- Desktop Smart Password Manager (C#)
- Desktop Smart Password Manager (Rust, GUI)
- Desktop Smart Password Manager (Rust, TUI)
Other:
Project Layout
smart-password-manager-cli-rs/
├── .github/
│ └── workflows/
│ ├── publish.yml
│ └── release.yml
├── src/
│ ├── main.rs Entry point
│ ├── cli.rs clap command definitions
│ ├── secret.rs Secret phrase input resolution
│ ├── output.rs stdout / stderr helpers
│ ├── clipboard.rs System clipboard + OSC 52
│ ├── qr.rs Terminal QR rendering
│ └── commands/
│ ├── mod.rs Entry lookup, confirmation
│ ├── add.rs
│ ├── get.rs
│ ├── list.rs
│ ├── delete.rs
│ ├── edit.rs
│ └── verify.rs
├── .gitignore
├── Cargo.toml
├── Cargo.lock
├── LICENSE
├── README.md
├── install.sh
└── uninstall.sh
License
Copyright (©) 2026, Alexander Suvorov
Author
Alexander Suvorov
- GitHub: smartlegionlab
- Website: smartlegionlab.github.io
Support
- CLI Issues: GitHub Issues
- Core Library Issues: smartpasslib Issues
Note: Always test password regeneration with non-essential accounts first. Implementation security depends on proper usage.
Links
- Repository: https://github.com/smartlegionlab/smart-password-manager-cli-rs
- Website: https://smartlegionlab.github.io
- Core library: https://github.com/smartlegionlab/smartpasslib-rs
⚠️ Disclaimer
By using this software, you agree to the full disclaimer terms.
Summary: Software provided "AS IS" without warranty. You assume all risks.
Full legal disclaimer: See DISCLAIMER.md