CLI¶
Install¶
This installs the gbit and ghostbit commands.
With optional extras for terminal rendering:
Configuration¶
Config is stored at ~/.config/ghostbit.toml.
Create a paste¶
From stdin¶
From a file¶
Language is auto-detected from the file extension.
Options¶
| Flag | Short | Description |
|---|---|---|
--lang LANG |
-l |
Language hint (python, go, rust, sql, …) |
--expires SECONDS |
-e |
TTL in seconds. 3600 = 1h, 86400 = 1d |
--burn |
-b |
Delete after the first view |
--max-views N |
-m |
Delete after N views |
--password [PASS] |
-p |
Encrypt with a password. Omit value to be prompted securely. |
--server URL |
-s |
Override server URL for this invocation only |
--quiet |
-q |
Print URL only (useful in scripts) |
--json |
Print full JSON response including full_url |
|
--no-history |
Don't save this paste to local history | |
--version |
-V |
Print version and exit |
Delete a paste¶
The delete token is read from the URL fragment (after ~). No server-side secret needed — the token was generated at creation time and embedded in the URL.
Paste history¶
All created pastes are saved locally to ~/.local/share/ghostbit/history.jsonl.
Nothing is sent to the server — this file stays on your machine only.
Example output:
View a paste¶
Download, decrypt, and display a paste directly in the terminal:
- Markdown pastes are rendered with titles, bold, lists, and code blocks (requires
rich) - Other languages are syntax-highlighted (requires
pygments) - Falls back to plain text if neither is installed
- Burn-after-read pastes display a warning on stderr after decryption
Examples¶
Shell completion¶
Enable tab-completion for gbit in your shell.
Bash¶
Zsh¶
Fish¶
Supported language extensions¶
Auto-detected from file extension or filename when using gbit <file>:
| Extension / Name | Language |
|---|---|
.py |
python |
.js |
javascript |
.ts |
typescript |
.go |
go |
.rs |
rust |
.rb |
ruby |
.sh, .bash, .zsh |
bash |
.html |
html |
.css |
css |
.sql |
sql |
.json |
json |
.yaml, .yml |
yaml |
.toml |
toml |
.md |
markdown |
.diff, .patch |
diff |
.java |
java |
.c |
c |
.cpp |
cpp |
.cs |
csharp |
.php |
php |
.kt |
kotlin |
.swift |
swift |
.lua |
lua |
.r |
r |
Dockerfile |
dockerfile |
Makefile |
makefile |