Skip to main content

Command Line Interface to Password Pusher - secure information distribution with automatic expiration controls.

Project description

pwpush CLI

Build status Python Version Dependencies Status

Code style: black Security: bandit Pre-commit Semantic Versions License

Command Line Interface for Password Pusher
Secure information distribution with automatic expiration controls.

Overview

The pwpush CLI is a powerful command-line tool that interfaces with Password Pusher instances for secure information distribution. It supports both the hosted services (eu.pwpush.com, us.pwpush.com) and self-hosted instances.

Why Secure Information Distribution?

Traditional communication tools create permanent digital footprints that can be exploited years later. Password Pusher sidesteps this by creating:

  • Self-destructing shareable links that auto-expire after a preset number of views
  • Time-based expiration that automatically deletes content after a set duration
  • Zero permanent storage - once expired, the information is completely removed
  • Full audit trails so you know exactly who accessed what and when

Key Features

  • 🔐 Secure Information Distribution: Self-destructing links for passwords, secrets, and files with automatic expiration and complete audit trails.
  • 🌐 Multi-Instance Support: Works with eu.pwpush.com, us.pwpush.com, or your own instance
  • 🔑 Authentication: Full API integration with user accounts
  • 📊 Audit Logs: Track access and usage of distributed content
  • 🎯 Flexible Expiration: Set expiration by views, days, or both
  • 📁 File Support: Distribute files securely with the same expiration controls and audit logs
  • 🎨 Rich Output: Beautiful terminal output with tables and formatting

Installation

pip install pwpush

Requirements: Python 3.10 or higher

Quick Start

1. Basic Usage (Anonymous)

# Push a password (interactive mode)
pwpush push

# Push a password directly
pwpush push --secret "mypassword123"

# Auto-generate a secure password
pwpush push --auto

# Push with custom expiration (7 days, 5 views)
pwpush push --secret "mypassword" --days 7 --views 5

2. Configure Your Instance

The CLI works with multiple Password Pusher instances:

# Use the EU instance
pwpush config set url https://eu.pwpush.com

# Use the US instance
pwpush config set url https://us.pwpush.com

# Use your own self-hosted instance
pwpush config set url https://pwpush.yourdomain.com

3. Authentication (Optional)

For advanced features like listing pushes and audit logs, authenticate with your account:

# Login with your credentials
pwpush login

# Or set credentials manually
pwpush config set email your@email.com
pwpush config set token your_api_token

Get your API token from: https://pwpush.com/en/users/token

Common Commands

Pushing Content

# Push a password with custom settings
pwpush push --secret "password123" --days 3 --views 10 --deletable

# Push as URL (for sharing links)
pwpush push --secret "https://example.com" --kind url

# Push as QR code
pwpush push --secret "QR data content" --kind qr

# Push a file
pwpush push-file document.pdf --days 7 --views 5

# Push with a reference note (requires authentication)
pwpush push --secret "password" --note "Employee onboarding - John Doe"

# Require click-through for retrieval (prevents URL scanners)
pwpush push --secret "password" --retrieval-step

Managing Pushes

# List your active pushes (requires authentication)
pwpush list

# List expired pushes
pwpush list --expired

# View audit log for a specific push
pwpush audit <url_token>

# Expire a push immediately
pwpush expire <url_token>

Configuration

# View current configuration
pwpush config show

# Set default expiration settings
pwpush config set expire_after_days 7
pwpush config set expire_after_views 10

# Enable JSON output by default
pwpush config set json true

# Logout and clear credentials
pwpush logout

Advanced Usage

Push Types

The --kind parameter allows you to specify the type of content being pushed:

# Text/Password (default)
pwpush push --secret "mypassword" --kind text

# URL - for sharing links that will be displayed as clickable URLs
pwpush push --secret "https://example.com" --kind url

# QR Code - for content that will be displayed as a QR code
pwpush push --secret "QR data content" --kind qr

# File - automatically set when using push-file command
pwpush push-file document.pdf  # kind is automatically set to "file"

JSON Output

# Get JSON output for scripting
pwpush --json push --secret "password"
pwpush --json list

Verbose and Debug Modes

# Enable verbose output
pwpush --verbose push --secret "password"

# Enable debug mode for troubleshooting
pwpush --debug push --secret "password"

Batch Operations

# Generate and distribute multiple passwords
for i in {1..5}; do
  pwpush --json push --auto --note "Batch password $i"
done

Configuration Reference

Instance Settings

Key Description Example
url Password Pusher instance URL https://eu.pwpush.com
email Your account email user@example.com
token Your API token abc123...

Expiration Settings

Key Description Valid Values
expire_after_days Default days until expiration 1-90
expire_after_views Default views until expiration 1-100
retrieval_step Require click-through for retrieval true/false
deletable_by_viewer Allow viewers to delete content true/false

CLI Settings

Key Description Valid Values
json Output in JSON format true/false
verbose Enable verbose output true/false

Examples

Developer Workflow

# Push database credentials with team
pwpush push --secret "db_password_123" --days 1 --views 3 --note "Staging DB - expires in 24h"

# Push API keys securely
pwpush push --secret "sk_live_..." --days 7 --views 1 --note "Production API Key"

# Share deployment URLs as clickable links
pwpush push --secret "https://staging.example.com/deploy" --kind url --days 1 --views 5

System Administration

# Push temporary access credentials
pwpush push --auto --days 1 --views 1 --note "Emergency access - $(date)"

# Push configuration files
pwpush push-file /etc/nginx/nginx.conf --days 3 --views 5

Team Collaboration

# Push deployment secrets
pwpush push --secret "deploy_token" --days 1 --views 10 --note "Release v2.1.0"

# Push sensitive documents
pwpush push-file sensitive_document.pdf --days 7 --views 3 --retrieval-step

Troubleshooting

Common Issues

Connection Errors

# Check your instance URL
pwpush config show

# Test connectivity
pwpush --debug push --secret "test"

Authentication Issues

# Verify your credentials
pwpush config show

# Re-login
pwpush logout
pwpush login

Permission Errors

# Check file permissions when uploading files
ls -la your_file.txt
pwpush push-file your_file.txt

Getting Help

# View all available commands
pwpush --help

# Get help for specific commands
pwpush push --help
pwpush config --help

Security Notes

  • Passwords and secrets are encrypted before transmission
  • All communication uses HTTPS
  • Content is automatically deleted after expiration
  • API tokens should be kept secure and not shared
  • Use --retrieval-step to prevent URL scanners from consuming views

Contributing

We welcome contributions! Please see our Contributing Guide for details.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Links

About Apnotic

This CLI tool is built by Apnotic.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pwpush-0.13.1.tar.gz (17.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pwpush-0.13.1-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

Details for the file pwpush-0.13.1.tar.gz.

File metadata

  • Download URL: pwpush-0.13.1.tar.gz
  • Upload date:
  • Size: 17.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.12.6 Darwin/23.6.0

File hashes

Hashes for pwpush-0.13.1.tar.gz
Algorithm Hash digest
SHA256 27b13c6d8a24dc1edd2f638f7f6388c8dca750f057c5f07c9a3f50ea23429635
MD5 ce505c43213dac6724917973061999c6
BLAKE2b-256 a0af3b85ed49e4c6d525351d05c5a6850e530719118e6fcc045716b2446d3ae8

See more details on using hashes here.

File details

Details for the file pwpush-0.13.1-py3-none-any.whl.

File metadata

  • Download URL: pwpush-0.13.1-py3-none-any.whl
  • Upload date:
  • Size: 16.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.12.6 Darwin/23.6.0

File hashes

Hashes for pwpush-0.13.1-py3-none-any.whl
Algorithm Hash digest
SHA256 82697e73095fcc4ce2ecb3d0d503cce0b3ec7c63177f61b2b384c8a5b3f7f509
MD5 ec8413f1abe5138d8dcd10a3e39b762e
BLAKE2b-256 b72663387c03b3d86d6180e940f408ac76ddaa0579c016a280a7b9b42c00e20c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page