Command-line interface for Pastezen - secure code sharing & secrets management.
curl -fsSL https://backend.pastezen.com/install.sh | bashnpm install -g pastezen-cligit clone https://github.com/Pastezen/PasteZen-Cli.git
cd PasteZen-Cli
npm install
npm link# Authenticate with your API token
pz auth token YOUR_API_TOKEN
# Push a file
pz push myfile.js
# List your pastes
pz list
# Create a Pastebox
pz pastebox create myboxpz auth token <TOKEN> # Set API token
pz auth status # Show auth status
pz auth logout # Clear credentialsGet your API token from: https://pastezen.com/tokens
# Push files
pz push file.js # Single file
pz push file1.js file2.py # Multiple files
pz push file.js --title "My Code" # Custom title
pz push file.js --private # Private paste
pz push file.js --password # Password protect
pz push file.js --expire 1d # Expire in 1 day
# Manage pastes
pz list # List your pastes
pz view <paste-id> # View content
pz pull <paste-id> # Download files
pz delete <paste-id> # Delete paste# Create and manage
pz pastebox create <name> # Create new Pastebox
pz pastebox create <name> --ssh-auth both # With SSH key + password
pz pastebox list # List your Pasteboxes
pz pastebox inspect <id> # Show details
pz pastebox delete <id> # Delete Pastebox
# SSH Access
pz pastebox ssh <id> # Connect via SSH
pz pastebox ssh-info <id> # Show SSH details
# File Operations
pz pastebox files <id> # List files
pz pastebox upload <id> local.txt /remote/ # Upload file
pz pastebox download <id> /remote/file.txt . # Download file
# Secrets
pz pastebox secrets <id> --list # List injected secrets
pz pastebox secrets <id> --set API_KEY=xxx # Inject a secret
pz pastebox secrets <id> --env-file .env # Import from .env# Project management
pz secrets list # List projects
pz secrets create "My Project" # Create private project
pz secrets create "Config" --public # Create public project
pz secrets delete <id> # Delete project
# Key-value operations
pz secrets view <id> # View all secrets
pz secrets set <id> API_KEY=xxx # Set a value
pz secrets get <id> API_KEY # Get a value
# Import/Export
pz secrets export <id> > .env # Export to .env
pz secrets export <id> -o .env # Export to file
pz secrets import <id> .env # Import from .envpz run <paste-id> # Execute paste
pz run script.py --lang python # Execute local filepz config # Show config
pz config --set apiUrl=https://... # Change API URLConfig is stored in ~/.pastezen/config.json:
{
"apiUrl": "https://backend.pastezen.com",
"token": "your-api-token"
}# Share a snippet quickly
echo 'console.log("Hello!")' | pz push -
# Share multiple files
pz push src/*.js --title "Source files"# Create an isolated environment
pz pastebox create dev-env --ssh-auth password
# Upload your project
pz pastebox upload abc123 ./src/ /app/src/ --recursive
# Inject secrets
pz pastebox secrets abc123 --env-file .env.production
# Connect and run
pz pastebox ssh abc123# Create a project for your app
pz secrets create "MyApp Production"
# Add secrets
pz secrets set abc123 DATABASE_URL=postgres://...
pz secrets set abc123 API_KEY=sk_live_xxx
# Export for deployment
pz secrets export abc123 -o .envMIT