ruleshub
v0.2.0
Published
RulesHub CLI — install, publish, and manage AI coding tool assets. Wrapper that downloads the canonical Rust binary on install.
Readme
ruleshub (npm wrapper)
Install, publish, and manage AI coding tool assets — Claude Code, Cursor, GitHub Copilot, Windsurf, Cline, Aider, Continue.
npm wrapper for the RulesHub CLI. On install, downloads the canonical Rust binary from GitHub Releases and exec's it for every CLI invocation.
Install
# one-shot, no global install
npx ruleshub <command>
# or install globally
npm install -g ruleshubAfter install, the ruleshub command is on your PATH.
Quick start
ruleshub --help # list commands
ruleshub search nestjs # search the registry
ruleshub install lozymon/nestjs-rules --tool claude-code
ruleshub validate # check a ruleshub.json
ruleshub publish # publish the package in cwdThe RULESHUB_TOKEN env var (or --token) authenticates publish. Get a token at ruleshub.dev/dashboard → API Keys.
Requirements
- Node 18 or later (for built-in
fetch) - A working
tarcommand (Windows 10+, macOS, Linux all ship one) - Network access to GitHub Releases at install time
Supported platforms
| Platform | Binary downloaded |
| ------------------- | ----------------------------------------------- |
| Linux x86_64 | ruleshub-<version>-x86_64-unknown-linux-musl |
| Linux ARM64 | ruleshub-<version>-aarch64-unknown-linux-musl |
| macOS Intel | ruleshub-<version>-x86_64-apple-darwin |
| macOS Apple Silicon | ruleshub-<version>-aarch64-apple-darwin |
| Windows x86_64 | ruleshub-<version>-x86_64-pc-windows-msvc |
If your platform isn't listed, npm install succeeds quietly and the launcher prints a clear error when you run ruleshub. Use pip install ruleshub, composer require ruleshub/cli, or download the binary directly instead.
How it works
ruleshub's npm package is ~3 KB:
bin/ruleshub.js— Node launcher (~30 lines): locates the binary atbin/ruleshub-binand exec's ittools/install.js— postinstall script: downloads the matching binary from GitHub Releases, verifies SHA256, places it atbin/ruleshub-bin
Same canonical binary as cargo install ruleshub, pip install ruleshub, composer require ruleshub/cli, and curl https://ruleshub.dev/install.sh | sh. No drift across ecosystems by construction.
--ignore-scripts
If you install with npm install --ignore-scripts ruleshub, the postinstall doesn't run and the binary isn't downloaded. The launcher prints a clear error:
ruleshub: native binary not found at .../bin/ruleshub-bin
the postinstall script downloads it on install.
did the install fail, or were scripts disabled (--ignore-scripts)?
retry: npm rebuild ruleshub (or reinstall with scripts enabled)npm rebuild ruleshub re-runs the postinstall.
Pinning a specific binary version
RULESHUB_VERSION=0.1.0 npm install ruleshubThe wrapper version (npm package) and binary version are intentionally aligned — [email protected] ships binary 0.1.0. Override only if you need to test against a different binary.
Other install paths
- Native install script —
curl | sh/iwr | iex, no Node required - pip —
pipx install ruleshub - Composer —
composer require --dev ruleshub/cli - crates.io —
cargo install ruleshub
License
MIT — same as the canonical CLI.
