@snappwd/cli
v1.3.0
Published
Official CLI for SnapPwd - Secure, zero-knowledge secret sharing
Downloads
287
Readme
SnapPwd CLI
The official command-line interface for SnapPwd.io.
Share secrets and files securely from your terminal. The CLI performs local encryption (AES-GCM) before uploading, ensuring the server never sees your data or keys.
Features
- Zero-Knowledge: Secrets are encrypted on your machine.
- Cross-Platform: Windows, macOS, Linux (via Node.js).
- Interoperable: Secrets created via CLI can be opened in the web app.
- Self-Hostable: Supports custom backends (e.g., your own snappwd-service).
Installation
npm install -g snappwd-cliUsage
Share a Secret
snappwd put "My secret API key"
# Output: https://snappwd.io/g/uuid...#key...Share a File
snappwd put-file ./database.envRetrieve a Secret
snappwd get "https://snappwd.io/g/uuid...#key..."Self-Hosting
If you are running your own SnapPwd Service, point the CLI to it:
snappwd put "Internal Secret" --api-url "https://secrets.internal.corp/api/v1"You can also set the API URL permanently via environment variable:
export SNAPPWD_API_URL="https://secrets.internal.corp/api/v1"
snappwd put "Internal Secret"Security Model
- Key Gen: A random AES key is generated locally.
- Encrypt: Data is encrypted using AES-GCM.
- Upload: Only the encrypted ciphertext is sent to the server.
- Link: The CLI generates a link with the key in the URL fragment (
#). This key never leaves your machine.
License
MIT
