SnapPwd CLI

Share secrets and files securely without leaving your terminal. Integrate secure sharing into your scripts and CI/CD pipelines.

npm install -g @snappwd/cli

Lightning Fast Sharing

Share a secret in seconds. No need to open a browser, log in, or click through menus.

$ snappwd put "MySecretPassword"
Secret created successfully!
URL: https://snappwd.io/g/sps-abc123...#key...

Secure File Transfer

Upload config files, logs, or archives securely. Perfect for sharing .env files with teammates.

$ snappwd put-file .env.production
File uploaded successfully!
URL: https://snappwd.io/g/spf-xyz789...#key...

Installation & Usage

1. Install via NPM

The CLI is available as a Node.js package. You'll need Node.js installed on your machine.

npm install -g @snappwd/cli

2. Share Text

Encrypt text and get a one-time link. Links expire after 1 hour by default; use --expiration to set a different lifetime in seconds.

snappwd put "SuperSecret123"

# Expire after 10 minutes
snappwd put "SuperSecret123" --expiration 600

3. Share a File

Encrypt and upload a file (up to 2MB). File links expire after 24 hours by default; --expiration works here too.

snappwd put-file ./path/to/secret.key

4. Retrieve a Secret or File

Pass the full share link, including the #key fragment, to fetch and decrypt it locally. Text secrets are printed to stdout; files are saved under their original filename unless you set --output. Retrieval is one-time: the secret or file is deleted from the server afterwards.

snappwd get "https://snappwd.io/g/sps-abc123...#key..."

# Save a shared file to a specific path
snappwd get "https://snappwd.io/g/spf-xyz789...#key..." --output ./secret.key

5. Check a Link Without Opening It

peek shows when a secret or file was created and how long until it expires, without consuming it. Add --json for machine-readable output.

snappwd peek "https://snappwd.io/g/sps-abc123...#key..."
snappwd peek "https://snappwd.io/g/sps-abc123...#key..." --json

6. Use a Self-Hosted Backend

Point any command at your own SnapPwd service with --api-url. The value is the service's base URL including /v1. The self-hosting guide shows how to start one with Docker Compose, and the API reference documents the endpoints the CLI calls.

snappwd --api-url "http://localhost:8080/v1" put "Internal Secret"

Automation & DevOps

CI/CD Integration

Use SnapPwd CLI in your GitHub Actions, GitLab CI, or Jenkins pipelines to securely share build artifacts or logs without exposing them in public build logs.

Example: Send build logs on failure

# In your CI pipeline script
npm install -g @snappwd/cli
snappwd put-file ./build.log

Open Source

The CLI is open source and transparent. Audit the code yourself.