@drip-apex/rh
v0.2.1
Published
Public Research Hub CLI bootstrapper for macOS, Windows, and Linux.
Readme
Research Hub CLI
@drip-apex/rh is the public bootstrapper for the DRIP Research Hub command-line interface.
Requirements
Supported systems are macOS, Windows 10 1803+/11, and Linux on x64 or arm64, with Node.js 20.12 or newer and npm on PATH. Release extraction requires tar: macOS includes it, Windows 10 1803+/11 includes system tar.exe (preferred over other PATH entries), and Linux users should install their distribution's tar package. Desktop Linux uses xdg-open for automatic browser opening when available.
Install and start
npm install -g @drip-apex/rh
rh login
rh use <brand-id-or-name>
rh ideas list --compact --jsonrh login opens Research Hub in your browser and stores a revocable CLI token. If the browser does not open, copy the complete printed URL into your browser; the CLI keeps waiting for login. Keep the terminal open. Login uses a temporary loopback listener on 127.0.0.1 with a random port. No Windows Firewall prompt is expected because the listener is loopback only.
macOS stores tokens in Keychain when available. Windows, Linux, and macOS without Keychain access use ~/.config/drip/research-hub/config.json (under your home directory on Windows too), with restricted file permissions where supported. Downloaded releases live under ~/.local/share/drip/research-hub. RESEARCH_HUB_TOKEN overrides the stored token. Treat this file as a credential and use rh logout to revoke and remove the login.
rh use saves a default brand and company, so most commands no longer need repeated --brand and --company flags.
Updates
The CLI has two independently updated layers:
- This small npm bootstrapper checks the npm registry after commands and prints a notice when an update is available. Set
RH_NO_UPDATE_CHECK=1to disable that check. - The authenticated private CLI is downloaded from Research Hub, SHA-256 verified, and refreshed automatically when its release changes.
Run rh update to force-refresh the private CLI and update the npm bootstrapper when a newer version exists. If npm cannot write the global install directory, the command prints the exact install command to run with the permissions appropriate for your machine.
Use rh doctor --json to inspect Node, authentication, release, and update status.
Automation
Command payloads remain raw JSON on stdout. Human progress and update notices use stderr. Exit codes are stable: 0 success, 1 general failure, 2 authentication, 3 validation, 4 confirmation required, and 5 conflict.
See the full CLI guide in the Research Hub repository.
