Bytifi CLI Bytifi
winget install --id=Bytifi.Bytifi -e Official Bytifi command-line tool. Gzip-compresses and encrypts files locally, uploads encrypted bytes to bytifi.com, and supports decrypting shared files from the terminal.
winget install --id=Bytifi.Bytifi -e Official Bytifi command-line tool. Gzip-compresses and encrypts files locally, uploads encrypted bytes to bytifi.com, and supports decrypting shared files from the terminal.
Official command-line tool for encrypting, uploading, and decrypting files with Bytifi.
npm install -g bytifi
Requires Node.js 18+.
Or from source:
git clone https://github.com/jpwcguy/Bytifi.git
cd Bytifi
npm link
winget install Bytifi.Bytifi
Or download bytifi.exe from GitHub Releases.
export BYTIFI_API_KEY=usk_your_api_key_here
PowerShell:
$env:BYTIFI_API_KEY = "usk_your_api_key_here"
Create an API key in Account → API on bytifi.com.
Set your API key via environment variable (see Install above) or pass --api-key per command.
Prefer the environment variable — keys on the command line can appear in shell history and process lists.
bytifi upload ./photo.png
bytifi upload "./my video (1).mp4"
bytifi upload ./report.pdf --expires 60 --delete-on-download
bytifi upload ./logs.txt --concurrency 8 --json > upload.json
bytifi upload ./photo.png -q
All uploads are gzip-compressed per chunk before encryption. Files over 10 MB use multipart upload automatically.
Upload accepts one file at a time. Quote paths that contain spaces. Avoid shell globs like ** — your shell may expand them into dozens of paths.
Download and decrypt directly from a share URL or link token. No API key required.
bytifi decrypt 'https://bytifi.com/link?link=LINK_ID#token=ENCRYPTION_TOKEN'
bytifi decrypt LINK_ID --token ENCRYPTION_TOKEN -o ./restored.mp4
If you already downloaded the encrypted blob from /f/LINK_ID (browser, curl, etc.):
# Easiest — use the upload JSON from when you uploaded
bytifi decrypt ./downloaded-file --upload-json upload.json
# Or pass both values manually
bytifi decrypt "./my video (1).mp4" \
--link LINK_ID \
--token ENCRYPTION_TOKEN
Bytifi uses two different values — don't swap them:
| Name | Upload JSON field | Example location |
|---|---|---|
| Link ID | link | /f/QeVuslvdaP-okMxG, link?link=QeVuslvdaP-okMxG |
| Encryption token | encryptionToken | #token=2LTlmBrDkO4GJg0... in shareUrl |
--link = link ID (short, ~16 chars)--token = encryption key (long, ~43 chars)Save metadata when you upload, so you can decrypt after the link expires:
bytifi upload ./report.pdf --json > upload.json
curl -L "$(jq -r .encryptedFile upload.json)" -o report.encrypted
bytifi decrypt ./report.encrypted --upload-json upload.json -o ./report.pdf
Without a global install:
npx bytifi upload ./photo.png --api-key usk_your_api_key_here
npm exec bytifi -- upload ./photo.png --api-key usk_your_api_key_here
Note: with npm exec, put -- before the file path so npm does not swallow --api-key.
| Flag | Description |
|---|---|
-k, --api-key | API key (default: BYTIFI_API_KEY) |
-e, --expires | Link lifetime in minutes: 5, 15, 30, 60, 120 |
--delete-on-download | Delete after first download |
--json | Machine-readable JSON output |
-q, --quiet | Print only the share URL |
--verbose | Print API error details to stderr |
--mime-type | Override detected MIME type |
--concurrency | Parallel encrypt/upload workers, 1–16 (default: 4) |
--base-url | API base URL (default: https://bytifi.com) |
| Flag | Description |
|---|---|
--token | Encryption key from #token=... (encryptionToken in upload JSON) |
--link | Link ID from upload JSON link field (/f/LINK_ID) |
--upload-json | Upload --json output file (recommended for downloaded files) |
--meta | Saved clientEncryptionMeta JSON for offline decrypt |
--share-url | Share URL to read token/metadata while decrypting a local file |
-o, --output | Output file path |
--output-dir | Output directory when saving under the original filename |
--json | Machine-readable JSON output |
-q, --quiet | Print only the output file path |
--verbose | Print error details to stderr |
--base-url | API base URL (default: https://bytifi.com) |
Exit codes: 0 success, 1 usage error, 2 API error, 3 network error.
JSON output (--json) for upload includes shareUrl, encryptedFile, link, encryptionToken, clientEncryptionMeta, compression, and expiresAt.
JSON output for decrypt includes outputPath, originalName, size, mimeType, expiresAt, link, storageMode, and sourcePath (for local decrypt).
Files over ~100 MB encrypted use multipart upload automatically. Progress prints to stderr unless --json or --quiet is set.
node bin/bytifi.js upload ./file.png --json > upload.json
node bin/bytifi.js decrypt ./file.encrypted --upload-json upload.json