fastbhej
v1.6.0
Published
Share text and files with FastBhej from the terminal - end-to-end encrypted, zero-knowledge
Maintainers
Readme
FastBhej CLI
Share text, files, and entire folders from your terminal — end-to-end encrypted, zero-knowledge, no account required.
Website · VS Code Extension · Report an issue
The same encryption engine that powers fastbhej.com and the FastBhej VS Code extension, wrapped in a single terminal command. Encryption happens entirely on your machine before anything leaves it — the server only ever stores ciphertext, never your content or the key that unlocks it. A link, code, or name created in any one of the three (web, CLI, extension) opens correctly in the others.
Install
npm install -g fastbhejQuick start
fastbhej share --text "hello world" # share text
fastbhej share ./report.pdf # share a file
fastbhej share ./a.txt ./b.txt # share several files together
fastbhej share ./my-project # share a whole folder (zipped automatically)
git diff | fastbhej share # share piped input
fastbhej receive <link-or-code-or-name> # get it back on the other end
fastbhej open <link-or-code-or-name> # or just open it in your browserEvery share copies the resulting link to your clipboard automatically, and shows a
real, live progress bar for both uploads and downloads — not a simulated one, it's
tracking actual bytes sent/received. In an interactive terminal you also get a spinner
for the gaps in between (connecting, encrypting), and a clean summary box for the
result; all of that gets out of the way automatically when output is piped or
redirected, or when NO_COLOR is set.
Three ways to hand off a share
| | |
|---|---|
| A link | The default — full URL, works anywhere, in any browser. |
| A quick code | --code generates a short 6-digit code. Say it out loud, text it, type it in: fastbhej r 483920. |
| A QR code | --qr prints a scannable code right in your terminal — point a phone camera at it, no typing at all. |
| A custom name | --name my-report makes the link memorable and directly typeable: fastbhej r my-report. |
All four can be combined on the same share.
fastbhej share ./photo.png --code --qr --name family-photoCommands
fastbhej share <file|folder>
| Option | Description |
|---|---|
| --text "..." | Share literal text instead of a file |
| --expiry <10m\|1h\|1d\|7d> | How long the link stays alive (default: 1h) |
| --password <pw> | Require a password to view |
| --burn | Delete permanently after the first view |
| --code | Generate a 6-digit quick code |
| --qr | Print a scannable QR code for the link |
| --name <custom-name> | Use a memorable, directly-typeable custom name instead of a random ID |
| --skip <a,b,c> | Extra folder/file names to exclude when sharing a folder |
| --include-all | Disable the default folder exclusions below and send everything |
fastbhej share ./release-notes.txt --expiry 1d --qr
fastbhej share --text "API_KEY=..." --password hunter2 --burn
fastbhej share ./design-assets --name design-v2 --code
fastbhej share ./frontend --skip .env,coverage
fastbhej share ./frontend --include-all # send node_modules and all
fastbhej share ./a.txt ./b.txt ./c.txt # multiple files, one share
fastbhej share --text "see attached" ./report.pdf # text + attachment togetherSharing a folder zips it in memory first (nothing touches disk except your original
files), then encrypts and uploads the archive as a single blob. receive on the other
end knows to extract it back into a real folder, not a raw .zip.
Heavy, rarely-useful directories are excluded by default — node_modules, .git,
dist, build, .cache, .next, __pycache__, .venv, and a few others — and
skipped at the filesystem level, not just filtered out afterward, so a huge
node_modules doesn't slow anything down. --skip adds more names on top of that
default list. If you genuinely want everything included, --include-all turns the
default list off (an explicit --skip still applies on top, since you asked for that
one specifically).
fastbhej receive <link|code|name> (alias: r)
Accepts anything you were handed — a full link, a quick code, or a custom name.
| Option | Description |
|---|---|
| --out <path> | A file path for text, or a destination folder for files/folders (default: current directory) |
| --password <pw> | Provide the password upfront; without it, you'll be prompted if the share needs one |
| --copy | Also copy received text straight to your clipboard |
fastbhej receive https://fastbhej.com/view/abc123#key...
fastbhej receive 483920
fastbhej r design-v2 --out ./downloads
fastbhej r 483920 --copyText prints straight to your terminal (pipeable: fastbhej receive 483920 >
notes.txt) - piped output is always exactly the raw content, with all the status
messages and formatting below sent to stderr instead so they never leak into a
redirected file. Files, images, and folders are saved to --out, or the current
directory if you don't pass one.
fastbhej history
Lists your recent shares, kept locally in ~/.fastbhej/history.json (last 20).
fastbhej rm <id>
Permanently deletes a share you created.
fastbhej open <link|code|name|id>
Resolves whatever you give it and opens it directly in your default browser - no need to receive it through the CLI if you'd rather just look at it in a tab.
fastbhej config
Set personal defaults so you're not retyping the same flags every time.
fastbhej config set expiry 1d # every share defaults to a 1-day expiry
fastbhej config set code true # every share also gets a quick code
fastbhej config set qr true # every share also prints a QR code
fastbhej config list # see what's currently set
fastbhej config unset expiry # remove oneValid keys: expiry, code, qr, apiUrl, skip. Flags passed on the command line
always win over whatever's in config.
Security
- Zero-knowledge: AES-256-GCM encryption happens client-side, before upload. The server stores ciphertext only and never has the key.
- Cross-compatible: identical wire format across the website, this CLI, and the VS Code extension.
- Quick codes and custom names trade a small amount of that zero-knowledge purity
for convenience: the server holds the key alongside the code/name so it can be
resolved with nothing but that short string. A plain link, by contrast, never gives
the server the key at all — it lives only in the part after
#, which browsers and servers never receive. - Passwords (
--password) are a separate, server-side "is this the right password" gate, properly hashed — not the encryption key itself.
License
MIT
