PrivateNote CLI
Turn text and files into encrypted links from your terminal. Set access rules, automate handoffs, and keep the key in the sharing link.
On this page
Text, files, and repeatable handoffs
Read UTF-8 text from a file or stdin, or add downloadable files with repeated --attach options. Encryption happens on your machine before upload.
Start without an account for short text notes. Sign in for attachments and account limits; eligible paid accounts add activity, revocation, scheduled reveal, recipient verification, and receipt confirmation. Business adds company branding and private recipient instructions.
This page describes the 0.2.0 release candidate on staging. It has not been published to npm yet. The npm commands below run the published package; use the source-build instructions to try these changes now.
Create your first link
Node.js 18+ on macOS, Linux, or Windows. Use a maintained Node.js release. Create demo.txt with harmless text first; the command prints a sensitive sharing link.
# Check the published package without creating a note npx privatenote-cli --help # Read a UTF-8 file; - reads stdin instead npx privatenote-cli --expire 1h --output-url-only demo.txt # Optional global install adds the privatenote command npm install -g privatenote-cli privatenote --version privatenote --expire 1h --output-url-only demo.txt
Try it live
Run the same flow as the CLI in your browser: encrypt locally, upload ciphertext, print a URL with the key in the fragment.
Live demo — creates a real note on privatenote.ai. Use a throwaway secret, not production credentials.
echo 'sk-live-demo-replace-me' | npx privatenote-cli --expire 1h --output-url-onlyhttps://privatenote.ai/note/…#…
Sign in and protect access
Approve sign-in in the browser. This creates a separate CLI session; signing out of the website does not sign out this tool. Ctrl+C cancels a pending sign-in.
The first line of passphrase.txt supplies the reveal password. Share it separately from the link. Recipient verification requires a paid account and gates reveal; it does not deliver the link. Opening notifications go to your verified account email.
privatenote login privatenote whoami privatenote --password-file passphrase.txt --expire 1h --output-url-only demo.txt privatenote --verify-recipient reader@example.com --output-url-only demo.txt privatenote logout
Attach encrypted files
The positional file supplies note text. Each --attach adds a downloadable file with locally encrypted contents, filename, and MIME type. Sign-in is required; file counts and sizes follow your account plan.
Omit the positional file for an attachment-only handoff. Close stdin or provide an empty input stream in automation. The CLI encrypts one file at a time; leave memory for that file and its ciphertext.
privatenote --attach report.pdf --attach data.csv --output-url-only demo.txt
Schedule and confirm receipt
Paid accounts can schedule reveal at a future ISO time before expiry. Include Z or a UTC offset. Receipt confirmation happens after successful decryption; it does not send the link to the recipient.
Business branding uses saved company identity and styles from your web account. The instructions file contains a private message of up to 160 characters, encrypted separately. Labels and custom receipt statements are public metadata.
Replace FUTURE_ISO_TIME with a future timestamp before the note expires. Read counts, expiry, and country/network policies follow your account limits.
privatenote --opens-at FUTURE_ISO_TIME --expire 3d --require-receipt --output-url-only demo.txt privatenote --branding --recipient-instructions-file instructions.txt --output-url-only demo.txt privatenote --access-policy-file policy.json --output-url-only demo.txt
Manage sent notes
List shows account activity without note contents or link keys. Revoke only works for unopened notes owned by an eligible account. Use noteId from creation JSON or the activity list.
The existing notes command remains available. The separate burn command permanently destroys an owned note and requires the same note ID in --confirm-burn. Revocation and permanent destruction are different actions.
privatenote list --limit 25 --json privatenote revoke NOTE_ID --json # Existing account activity command privatenote notes # Permanent destruction: confirm the exact note ID privatenote burn NOTE_ID --confirm-burn NOTE_ID
Try the unpublished version
From a checkout containing this staging candidate, build and run the local executable. Use Node.js 24 for repository maintenance. This avoids downloading the older published npm package.
Use the staging origin consistently for login and creation. A session belongs to its API origin; a production login is not reused on staging. Test with harmless content and a matching recipient web app.
The browser playground on this page demonstrates encryption in the browser. It does not execute your installed CLI or verify its version.
npm ci npm run build:cli node packages/privatenote-cli/dist/cli.js --version node packages/privatenote-cli/dist/cli.js --api-base-url https://premium.privatenote.ai --expire 5m --output-url-only demo.txt
What stays private
Note text uses AES-256-GCM; attachments use the web-compatible libsodium secretstream format. File bytes, names, MIME types, and private recipient instructions are encrypted locally. The sharing link contains the decryption capability; treat the entire link like the secret.
Access settings, account association, labels, and branding identity/styles are visible to the service. HTTPS is required for remote APIs. A custom-host allowlist restricts destinations; it is not certificate pinning.
Captured stdout is blocked unless you choose --output-url-only or --force-stdout. Those flags permit output; they do not make a URL safe to expose in logs. For CI, capture JSON into protected storage with restrictive permissions.
Encrypt locally
AES-256-GCM on your device — browser, editor, terminal, or MCP process.
Upload ciphertext
Only encrypted bytes and note metadata (expiry, burn-after-reading) reach the server.
Key in #fragment
The decryption key stays in the URL hash. Browsers do not send fragments in HTTP requests.
privatenote.ai/note/…#key
Use a file or stdin for real secrets; avoid literal secrets in command arguments and shell history.
Send a reveal password separately. Do not paste the full sharing link into public build logs.
API redirects are refused. Session tokens remain on their configured API origin.
Use --insecure only for a local development API with a matching web app.
Commands and options
| Name | Description |
|---|---|
| login / whoami / logout | Approve browser sign-in, inspect your account, or clear the CLI session. |
| list --limit 1..50 --json | List sent-note activity for an eligible paid account; default limit 25. |
| revoke NOTE_ID --json | Revoke an unopened note owned by your account. |
| notes / burn | Existing activity and permanent destruction commands; burn needs --confirm-burn NOTE_ID. |
| --expire <duration> | 5m, 10m, 15m, 30m, 1h, 2h, 8h, 1d, 3d, 7d, 14d, 15d, 30d. Default 24h aliases 1d. Plan limits apply. |
| --burn / --no-burn | One read by default; --no-burn requests two reads and needs a paid account. |
| --max-reads <count> | 1, 2, 3, 5, 10, or 0 (unlimited), subject to plan. Cannot combine with burn flags. |
| --attach <path> | Repeat for encrypted downloadable files. Requires sign-in. |
| --password-file <path> | Use the first line as the reveal password. |
| --verify-recipient <email> | Require email verification before reveal; paid account. Does not deliver the link. |
| --notify-on-open | Notify your verified account email when opened; requires sign-in. |
| --opens-at <ISO time> | Schedule reveal before expiry; include Z or UTC offset. Paid account. |
| --require-receipt | Allow confirmation after decryption. Paid account. |
| --receipt-statement <text> | Public custom confirmation statement. Business; requires --require-receipt. |
| --branding | Snapshot saved Business company identity and styles. |
| --recipient-instructions-file <path> | Private message, up to 160 characters; requires --branding. |
| --access-policy-file <path> | Country/network policy JSON. Country allowlists: Starter/Business; country blocklists and network rules: Business. |
| --title / --label | Title is encrypted with note text. Label is public activity metadata, up to 120 characters. |
| --json --force-stdout | Creation JSON: noteId, secureUrl, expiresAt, burnAfterReading, maxReads. Protect the output. |
| --output-url-only | Permit URL-only output to a terminal, pipe, or captured stream. Cannot combine with --json. |
| --version / --help | Inspect the installed package version and available options. |
| --api-base-url / --web-origin | API origin and sharing-link origin. HTTPS required remotely; matching origins by default. |
| --insecure / --allow-origin-mismatch | Local HTTP development or explicit override of the matching-origin guard. |
| PRIVATENOTE_API_BASE_URL | Default API base URL. |
| PRIVATENOTE_WEB_ORIGIN | Sharing-link origin; defaults to API origin. |
| PRIVATENOTE_ALLOWED_HOSTS | Comma-separated API hostname allowlist. |
| PRIVATENOTE_CLI_SESSION_PATH | Override the CLI session file for isolated testing. |
Related integrations
Editor extension
Create notes from VS Code, Cursor, or Codex IDE without switching context. Use the sidebar, a selected-text command, or the title-bar action.
View docsMCP server
Give an MCP client a preview-and-confirm flow that encrypts a local file after you approve the exact bytes.
View docsCodex plugin
Install the bundled plugin for MCP plus skills, or add privatenote-mcp to ~/.codex/config.toml. Use the same VS Code extension in the Codex IDE for secrets the agent never sees.
View docsChrome extension
Encrypt selected text from any tab via context menu, toolbar popup, or keyboard shortcut — without opening the site first.
View docsPrivateNote CLI
Turn text and files into encrypted links from your terminal. Set access rules, automate handoffs, and keep the key in the sharing link.
