Toolhub CLI

Terminal-friendly versions of popular Toolhub tools. Run from your shell or CI โ€” no install, no network calls, no tracking. Pure Node.js, all logic local.

Quick start

Requires Node.js 18 or later. No install step โ€” npx fetches and runs in one shot:

# Encode a string to base64
npx github:JXXR1/Toolhub#main base64 encode "hello"
# โ†’ aGVsbG8=

# Generate a SHA-256 hash
npx github:JXXR1/Toolhub#main hash sha256 "hello"
# โ†’ 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824

# Pipe-friendly
echo "My Article Title!" | npx github:JXXR1/Toolhub#main slugify
# โ†’ my-article-title

Why a CLI?

Same logic as the browser tools, but pipe-able. Useful in build scripts, CI pipelines, git hooks, and ad-hoc terminal work where copy-pasting through a webpage is awkward. The CLI is dispatched per-call โ€” no daemon, no background process, no telemetry.

Available tools

Tool Example Browser version
base64toolhub base64 encode "hello"base64-encoder
slugifytoolhub slugify "My Title!"slug-generator
hashtoolhub hash sha256 "x"hash-generator
uuidtoolhub uuid v4 5uuid-generator
json-formatcat f.json | toolhub json-formatjson-formatter
color-converttoolhub color-convert "#ff0066"color-converter
url-encodetoolhub url-encode encode "x&y"url-encoder
percentagetoolhub percentage of 20 100percentage-calculator

Flags

Stdin / pipe support

All tools read from stdin when no positional input is given. This makes them composable with standard Unix tooling:

# Minify all JSON files in place
for f in *.json; do
  npx toolhub-cli json-format minify --in "$f" --out "$f.min"
done

# Hash arbitrary stdin (e.g. for content addressing)
curl -s https://example.com/page.html | npx toolhub-cli hash sha256

# Slugify a stream of titles
cat titles.txt | while read line; do
  npx toolhub-cli slugify "$line"
done

Why npx and not a Cloudflare API?

An HTTP API would force users to send their data over the network and trust the server side. The browser-side and CLI-side of Toolhub both keep the contract simple: your input never leaves your device. Same guarantee, two surfaces.

For users who genuinely need an HTTP endpoint (e.g. integrating from a language without npm), the CLI source is small enough to port directly โ€” see cli/tools/*.js.

Source & contributing

All CLI source lives at github.com/JXXR1/Toolhub/tree/main/cli. Adding a new tool is one file in cli/tools/ exporting { run({ args, stdin, flags }) } plus a one-line registry entry in cli/bin/toolhub.js. PRs welcome.

License

MIT โ€” use it in your CI, your scripts, your tools. Attribution appreciated but not required.