snipit CLI
Share code snippets from your terminal in seconds
$cat file.py | snipit --burn
📦 Installation
Quick Install (Linux/macOS)
curl -fsSL https://snipit.sh/install.sh | bashnpm
npm install -g snipit-shnpx (no install)
npx snipit-sh create file.pyManual Download
🚀 Quick Start
# Share a file
snipit create main.py
# Pipe from stdin
cat script.sh | snipit -l bash
# Get a snippet
snipit get abc123def0
# Password + burn after reading
snipit create secret.env -p mypassword -b⌨️ Commands
Create Snippets
# From a file (language auto-detected)
snipit create server.ts
# From stdin with options
echo "Hello World" | snipit -t "Greeting" -l plaintext -e 1h
# Password protected + burn after reading
snipit create secret.env -p mypassword -b
# Copy URL to clipboard
snipit create notes.md -cRead Snippets
# Get content (by ID)
snipit get abc123def0
# Shorthand — just the ID
snipit abc123def0
# Password-protected snippet
snipit get abc123def0 -p mypassword
# Get metadata
snipit info abc123def0Configuration
# Set default server (for self-hosted)
snipit config server https://your-instance.com
# View all config
snipit config⚙️ Options
| Flag | Description |
|---|---|
| -t, --title <title> | Snippet title |
| -l, --language <lang> | Language for syntax highlighting |
| -p, --password <pw> | Password protect / unlock |
| -e, --expires <dur> | Expiration: 1h, 6h, 1d, 3d, 1w, 2w, never |
| -b, --burn | Burn after reading (one-time view) |
| -c, --copy | Copy URL to clipboard |
| -s, --server <url> | Server URL |
| -r, --raw | Raw output (no formatting) |
💡 Use Cases
Share Diffs in Code Review
git diff | snipit -t "My changes" -l diffQuick way to share uncommitted changes with teammates
Share Logs for Debugging
tail -100 /var/log/app.log | snipit -e 1hShare log excerpts that auto-expire
Secure Config Sharing
snipit create .env -p secret123 -bShare secrets that self-destruct after viewing
Quick Code Snippets
pbpaste | snipit -l pythonShare clipboard content with syntax highlighting
Script Output
./build.sh 2>&1 | snipit -t "Build output"Capture and share command output
Pipeline Integration
snipit get abc123 | python script.pyFetch snippets as input for other tools
🔗 Unix Pipeline Integration
snipit is designed to work seamlessly in Unix pipelines. When stdout is not a TTY, it outputs only the URL — perfect for scripting.
# Create and capture URL
URL=$(cat deploy.log | snipit)
echo "Logs: $URL"
# Download and process
snipit get abc123 | grep "ERROR"
# Chain commands
curl api.example.com | snipit | xargs open🏠 Self-Hosting
Running your own snipit.sh instance? Point the CLI to your server:
# Set your server as default
snipit config server https://paste.yourcompany.com
# Or use per-command
snipit create file.py -s https://paste.yourcompany.com