npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

bytifi

v0.2.13

Published

Official Bytifi CLI — encrypt, upload, and decrypt files from the terminal

Downloads

1,678

Readme

Bytifi CLI

Official command-line tool for encrypting, uploading, and decrypting files with Bytifi.

Install

npm (all platforms)

npm install -g bytifi

Requires Node.js 18+.

Or from source:

git clone https://github.com/jpwcguy/Bytifi.git
cd Bytifi
npm link

Python (PyPI)

Requires Python 3.10+.

pip install bytifi
bytifi --version

Upgrade:

pip install --upgrade bytifi

Use in code: see python/API.md.

Develop / publish the Python package from this repo: see python/README.md (pyproject.toml, tests, and publish scripts).

Windows (WinGet)

winget install Bytifi.Bytifi

Or download bytifi.exe from GitHub Releases.

Environment variable (all platforms)

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.

Setup

Set your API key via environment variable (see Install above) or pass --api-key per command.

Security: Prefer BYTIFI_API_KEY over --api-key on the command line. API keys and encryption tokens passed as CLI flags may appear in shell history and process lists (ps). The CLI warns when secrets are passed on argv.

Usage

Upload

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

Files up to 10 MB use a single direct upload with gzip-compressed chunks. Files over 10 MB use multipart upload with fixed-size encrypted parts (no compression — gzip can expand ISO/zip data past the server part limit).

Upload concurrency auto-scales when --concurrency is omitted: ≤1 GB → 4 workers, 1–3 GB → 3 workers, ≥3 GB → 2 workers.

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.

Decrypt from a link

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
bytifi decrypt LINK_ID --token ENCRYPTION_TOKEN --concurrency 4

Decrypt a downloaded encrypted file

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

# Force local-path mode when the filename looks like a URL
bytifi decrypt ./https-example.bin --local-file --upload-json upload.json

# Overwrite an existing output file
bytifi decrypt ./downloaded-file --upload-json upload.json --force

Link ID vs 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)

Offline decrypt workflow

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.

Upload options

| 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: auto-scaled by file size) | | --base-url | API base URL (default: https://bytifi.com) |

Decrypt options

| 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 | | --local-file | Treat input as a local path even if it looks like a URL | | -o, --output | Output file path | | --output-dir | Output directory when saving under the original filename | | --force | Overwrite existing output file | | --concurrency | Parallel part download workers, 1–8 (default: 2) | | --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, 130 interrupted (Ctrl+C).

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).

Progress prints to stderr with throughput and ETA unless --json or --quiet is set.

Development

npm test
node bin/bytifi.js upload ./file.png --json > upload.json
node bin/bytifi.js decrypt ./file.encrypted --upload-json upload.json