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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ghostbit_cli-1.1.1.tar.gz.
File metadata
- Download URL: ghostbit_cli-1.1.1.tar.gz
- Upload date:
- Size: 11.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ef3979042c3c9ea5087284f947ea8a4b76ae3cb4b0b86c26a30c205d0c671b4
|
|
| MD5 |
a69c73dc682cb4b04a4ed09e8d0da0ec
|
|
| BLAKE2b-256 |
5877a57815fa373381c2ab5944addb25314e0d64b78e6a99528b3911f53f35d4
|
Provenance
The following attestation bundles were made for ghostbit_cli-1.1.1.tar.gz:
Publisher:
release.yml on stackopshq/ghostbit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ghostbit_cli-1.1.1.tar.gz -
Subject digest:
7ef3979042c3c9ea5087284f947ea8a4b76ae3cb4b0b86c26a30c205d0c671b4 - Sigstore transparency entry: 1285132473
- Sigstore integration time:
-
Permalink:
stackopshq/ghostbit@5f9d5b9d9dd296e7ec086a1896e743f28fe412c0 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/stackopshq
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5f9d5b9d9dd296e7ec086a1896e743f28fe412c0 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file ghostbit_cli-1.1.1-py3-none-any.whl.
File metadata
- Download URL: ghostbit_cli-1.1.1-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8ab7b1c2374a310af0820c20bb746b02c241c4e5025fbdbdba20171d7f15125a
|
|
| MD5 |
fd76c8d77cad496720a2d312a71038bf
|
|
| BLAKE2b-256 |
67c2ef6b65c5b8f1205bcbaffe856e304b7f91a80747fae85ebe46c1441e45a8
|
Provenance
The following attestation bundles were made for ghostbit_cli-1.1.1-py3-none-any.whl:
Publisher:
release.yml on stackopshq/ghostbit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ghostbit_cli-1.1.1-py3-none-any.whl -
Subject digest:
8ab7b1c2374a310af0820c20bb746b02c241c4e5025fbdbdba20171d7f15125a - Sigstore transparency entry: 1285132557
- Sigstore integration time:
-
Permalink:
stackopshq/ghostbit@5f9d5b9d9dd296e7ec086a1896e743f28fe412c0 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/stackopshq
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5f9d5b9d9dd296e7ec086a1896e743f28fe412c0 -
Trigger Event:
workflow_dispatch
-
Statement type: