Metadata-Version: 2.4
Name: ghostbit-cli
Version: 1.1.1
Summary: Ghostbit CLI — create end-to-end encrypted pastes from the terminal
License-Expression: MIT
Project-URL: Homepage, https://github.com/stackopshq/ghostbit
Project-URL: Repository, https://github.com/stackopshq/ghostbit
Project-URL: Bug Tracker, https://github.com/stackopshq/ghostbit/issues
Keywords: paste,cli,encryption,privacy,ghostbit
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Internet
Classifier: Topic :: Security :: Cryptography
Classifier: Topic :: Utilities
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: cryptography>=42.0.0
Requires-Dist: certifi
Provides-Extra: color
Requires-Dist: pygments>=2.17.0; extra == "color"
Provides-Extra: markdown
Requires-Dist: rich>=13.0.0; extra == "markdown"
Provides-Extra: all
Requires-Dist: pygments>=2.17.0; extra == "all"
Requires-Dist: rich>=13.0.0; extra == "all"

# Ghostbit CLI

Command-line tool for [Ghostbit](https://github.com/stackopshq/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

```bash
pip install ghostbit-cli
```

With syntax highlighting and Markdown rendering:

```bash
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

```bash
# 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

```bash
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](https://github.com/stackopshq/ghostbit) for Docker and manual setup instructions.

## License

MIT
