Skip to main content
Install the Staplehire CLI globally with npm, then verify the staplehire binary before logging in.

Prerequisites

Install

The package name is @staplehire/staplehire-cli, and the binary it installs is staplehire.

Verify the install

doctor checks four things: the CLI version (against the latest on npm), your API key and where it came from, the API gateway URL, and a live GET /v1/me roundtrip.
Example JSON output:
Before you authenticate, the API Key and API Validation checks will report fail — that is expected. Run staplehire login (or set STAPLEHIRE_KEY), then re-run doctor.
doctor exits 1 if any check fails, so it doubles as a CI preflight:

Keep the CLI up to date

Check whether a newer version is published on npm:
Then run the upgrade_command it returns.

FAQ

@staplehire/staplehire-cli. It installs the staplehire binary and (for TypeScript users) also exports the @staplehire/hire SDK.
Yes — Node.js 18 or newer. The CLI runs on Node and is distributed through npm.
No. Browser login is for local development. In CI, set STAPLEHIRE_KEY as a secret and verify with staplehire doctor -q. See Use in CI.
The CLI and SDK live in the monorepo at navindev26/Staplehire under packages/hire.
Related: Authentication · Quickstart · Use in CI