Skip to main content
This walkthrough takes you through a complete hiring loop with the Staplehire CLI: install → authenticate → create a role → add a stage → add a candidate → send an AI interview. Every step returns JSON, so you can chain commands with jq.
1

Install the CLI

Install globally with npm and confirm the staplehire binary is on your PATH.
Need details or alternatives? See Installation.
2

Authenticate

Log in with browser OAuth. This opens app.staplehire.com, completes a PKCE exchange, and writes STAPLEHIRE_KEY to a .env file in your current directory.
For agents and CI, set STAPLEHIRE_KEY instead of logging in. See Authentication.
3

Verify your environment

doctor checks your CLI version, API key, gateway URL, and that GET /v1/me succeeds.
All checks should report pass. If not, follow the hint in each check’s message.
4

Create a role

Pass a job description inline, from a file (@path), or from stdin (-). Capture the role ID for later steps.
See Create a role.
5

Add a pipeline stage

Candidates live in stages. Create one before adding candidates.
See Manage stages.
6

Add a candidate

Add a candidate by email into the stage you just created. The command is idempotent per role and email.
See Add a candidate.
7

Generate an interview design

An interview design defines the AI screening round. Generate one for the role.
See Send an interview.
8

Send the interview

Invite the candidate to the AI interview. This emails them an apply link.
Track responses later with staplehire sessions list "$ROLE_ID".

The whole thing in one script

jq -e exits non-zero if a field is missing, so the script fails fast instead of passing an empty ID into the next command.

Where to next

Source candidates

Let the agent find prospects for a role instead of adding them by hand.

Enrich a candidate

Run deep research on a candidate and read the summary.

Automate with agents

Install the skill so Cursor, Claude Code, and Codex run these flows for you.

Command reference

Every command, flag, and exit code in one place.