-
Notifications
You must be signed in to change notification settings - Fork 1
Examples and Recipes
Practical, copy-paste recipes for common tasks. Web steps use the app at https://zefer.carrillo.app; terminal steps use the CLI; code steps use the Library. All produce the same interoperable .zefer files.
Golden rule: send the
.zeferfile and its passphrase through different channels (e.g., file by email, passphrase by chat). A file alone is useless to anyone who intercepts it.
Web: Encrypt tab → Text → paste the key → set a passphrase → Encrypt & download → send the .zefer file; share the passphrase separately.
CLI:
echo "API_KEY=sk_live_9f2c8a1b" | zefer encrypt - -p "a-strong-passphrase" -o api-key.zefer
# Recipient:
zefer decrypt api-key.zefer -p "a-strong-passphrase"zefer encrypt notes.txt -p "pass" --ttl 60 # opens for 60 minutes, then neverWeb: pick an expiration (30 min … 2 weeks). After the deadline the file refuses to decrypt. See TTL / expiration.
Require both people to be present to open the file:
zefer encrypt merger.pdf -p "alice-secret" -2 "bob-secret" --dual-key
# Decrypt needs both:
zefer decrypt merger.pdf.zefer -p "alice-secret" -2 "bob-secret"See dual passphrase.
zefer encrypt report.pdf -p "my-private-key" --reveal "share-2026"
# Give the recipient ONLY "share-2026" — they decrypt without ever seeing your main key:
zefer decrypt report.pdf.zefer -p "share-2026"See reveal key.
zefer encrypt secret.txt -p "pass" -q "Project codename?" -a "bluebird"Only a hash of the answer is stored. See secret question.
zefer encrypt secret.txt -p "pass" --allowed-ips "203.0.113.5,::1"for f in *.env; do
zefer encrypt "$f" -p "$ZEFER_PASS" -o "encrypted/$f.zefer"
done# Encrypt from stdin, decrypt to stdout, pipe into another tool
echo '{"api_key":"abc"}' | zefer encrypt - -p "$P" -o creds.zefer
zefer decrypt creds.zefer -p "$P" | jq '.api_key'import { encodeZefer } from "zefer-cli";
import { writeFile } from "node:fs/promises";
const buf = await encodeZefer({
content: process.env.SECRET ?? "",
passphrase: process.env.ZEFER_PASS!,
fileName: null,
expiresAt: 0,
compression: "gzip",
iterations: 600_000, // always pass explicit iterations — the library never auto-benchmarks
});
await writeFile("out.zefer", buf);See Library.
Add the server to your MCP client, then ask the agent to use it:
The agent gains zefer_encrypt, zefer_decrypt, zefer_keygen, zefer_analyze_password, zefer_inspect. See MCP Server.
zefer keygen # 64-char passphrase (recommended)
zefer keygen --mode base58 --length 24 # readable, safe to dictate
zefer keygen --mode hex --length 32 # hex token
zefer keygen --mode uuid # an identifier
zefer keygen --count 5 # five at onceOr use the web Password Generator and Analyzer.
https://zefer.carrillo.app/?t=decrypt&p=thePassphrase
The passphrase is auto-cleared from the address bar after it loads. See URL Parameters.
📖 Glossary — terms on this page: TTL / expiration · dual passphrase · reveal key · secret question · compression · MCP · PBKDF2. Full list in the Glossary.
📖 New to a term? See the Glossary. · Zefer · Repository · CLI · MIT © José Carrillo
Guides
- Getting Started
- How It Works
- Examples and Recipes
- Install and Self-Hosting
- Comparisons
- Troubleshooting
- FAQ
Security
Channels
Tools
Project
Reference
{ "mcpServers": { "zefer": { "command": "npx", "args": ["-y", "zefer-cli", "mcp"] } } }