Skip to main content

Ghostbit CLI — create end-to-end encrypted pastes from the terminal

Project description

Ghostbit CLI

Command-line tool for Ghostbit — a self-hosted, end-to-end encrypted paste service.

All content is encrypted in the client before being sent to the server. The server never sees your plaintext.

Install

pip install ghostbit-cli

With syntax highlighting and Markdown rendering:

pip install "ghostbit-cli[all]"       # pygments + rich
pip install "ghostbit-cli[color]"     # pygments only (syntax highlighting)
pip install "ghostbit-cli[markdown]"  # rich only (Markdown rendering)

Usage

# Paste from stdin
cat file.py | gbit

# Paste a file (language auto-detected from extension)
gbit file.py

# With options
gbit file.py --lang python --burn --expires 3600

# Password-protected paste (prompted securely)
echo "secret" | gbit -p

# Or pass inline (visible in process list)
gbit file.py --password mysecret

# View and decrypt a paste in the terminal
gbit view https://paste.example.com/abc123#KEY~TOKEN

# View a password-protected paste (prompts for password)
gbit view https://paste.example.com/abc123#~TOKEN

# Output JSON (includes full URL with decryption key)
cat data.json | gbit --json

# Point to your self-hosted instance
gbit config set server https://paste.example.com

Options

Flag Short Description
--lang -l Language hint (python, go, rust, …)
--expires -e TTL in seconds (3600 = 1h, 86400 = 1d)
--burn -b Delete after the first view
--max-views -m Delete after N views
--password -p Encrypt with a password (prompted if no value given)
--server -s Override server URL for this call
--quiet -q Print URL only
--json Print full JSON response
--no-history Don't save to local history
--version -V Print version and exit

Configuration

gbit config set server https://paste.example.com
gbit config show
gbit config unset server

Config is stored at ~/.config/ghostbit.toml.

Security Note

The local history (~/.local/share/ghostbit/history.jsonl) stores full URLs including decryption keys. Use --no-history for sensitive pastes, or clear history with gbit list --clear.

Self-hosting

See the Ghostbit server repository for Docker and manual setup instructions.

License

MIT

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

ghostbit_cli-1.3.0.tar.gz (13.5 kB view details)

Uploaded Source

Built Distribution

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

ghostbit_cli-1.3.0-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

Details for the file ghostbit_cli-1.3.0.tar.gz.

File metadata

  • Download URL: ghostbit_cli-1.3.0.tar.gz
  • Upload date:
  • Size: 13.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ghostbit_cli-1.3.0.tar.gz
Algorithm Hash digest
SHA256 7de7535bc008b09e14b1cdd2a3ad225bc5f0fce7305e3fe7ae69fc4f6bf4b5d7
MD5 e5406e949ea5e29c3adb9f6974845ee0
BLAKE2b-256 6bde30ac0ba2ffd07a9211e54cbb9e7b794364370139ec1b3c517ad31765882b

See more details on using hashes here.

Provenance

The following attestation bundles were made for ghostbit_cli-1.3.0.tar.gz:

Publisher: release.yml on stackopshq/ghostbit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ghostbit_cli-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: ghostbit_cli-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 14.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ghostbit_cli-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5e2ee0a22936646f035535aa0ec7778c502da2d0c5fac4b0bf575f0725434dea
MD5 040c818b6a88fea45a417c97e6c80310
BLAKE2b-256 5e1eb23755cc9cd459c3ae048623e4183e98a863bc42e8b5695bef74dd89da9e

See more details on using hashes here.

Provenance

The following attestation bundles were made for ghostbit_cli-1.3.0-py3-none-any.whl:

Publisher: release.yml on stackopshq/ghostbit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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