PowerShell CLI¶
A native PowerShell module that mirrors the Python gbit CLI.
All encryption is done client-side using the built-in .NET cryptography APIs — no external dependencies.
Requirements: PowerShell 7.0+ (Windows, macOS, or Linux)
Install¶
Option 1 — copy to your module path¶
Option 2 — import directly¶
Add the import to your $PROFILE to make it permanent.
Configuration¶
Config is stored at:
| Platform | Path |
|---|---|
| Windows | %APPDATA%\ghostbit\config.toml |
| macOS / Linux | ~/.config/ghostbit.toml |
Create a paste¶
From the pipeline¶
From a file¶
Language is auto-detected from the file extension.
Options¶
| Parameter | Short alias | Description |
|---|---|---|
-Language |
-l (n/a in PS) |
Language hint (python, go, rust, sql, …) |
-ExpiresIn |
TTL in seconds. 3600 = 1 h, 86400 = 1 d |
|
-Burn |
Delete after the first view | |
-MaxViews N |
Delete after N views | |
-Password |
Encrypt with a password (PBKDF2-SHA256, client-side) | |
-Server URL |
Override server URL for this invocation only | |
-Quiet |
Print URL only (useful in scripts) | |
-AsJson |
Print full API response as JSON including full_url |
View a paste¶
Download, decrypt, and print a paste directly in the terminal:
Delete a paste¶
The delete token is read from the URL fragment (after ~).
Paste history¶
All created pastes are saved locally. Nothing is sent to the server.
| Platform | Path |
|---|---|
| Windows | %LOCALAPPDATA%\ghostbit\history.jsonl |
| macOS / Linux | ~/.local/share/ghostbit/history.jsonl |
Examples¶
Supported language extensions¶
Auto-detected from file extension when using gbit <file>:
| Extension | Language |
|---|---|
.py |
python |
.js |
javascript |
.ts |
typescript |
.go |
go |
.rs |
rust |
.ps1, .psm1, .psd1 |
powershell |
.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 |