Skip to main content
The Staplehire CLI is built for AI coding agents. Install the bundled skill so agents know the command surface and the non-interactive contract, then let them drive your hiring workflows from their terminal.

Install the skill

skills install copies the staplehire skill into the agent skill roots it finds in your current project. It looks for .agents/, .claude/, and .cursor/ and installs into their skills/ directories.
The JSON output reports where the skill was installed:
  • primary — the first agent root found; the skill files are copied here.
  • extras — additional roots; by default these are symlinked to primary (use --copy to copy instead).
  • created — set to a path (for example .agents/skills) when no agent root existed and the CLI created .agents/skills for you.

Options

Skills install into the project directory you run the command from (.agents/skills/staplehire, etc.), not a global home directory. Run it inside the repo your agent works in.

The agent protocol

The CLI auto-detects non-TTY environments and emits JSON — no --json flag needed (though -q forces clean JSON-only output). Agents should follow these rules:
1

Discover, don't guess

Run staplehire commands for the machine-readable command tree that matches the installed version. Don’t hardcode flag shapes.
2

Check the environment first

3

Supply every required flag

The CLI never prompts when stdin is not a TTY. Missing a required flag fails with exit code 8.
4

Poll async jobs before reading results

5

Branch on exit codes, not message strings

Read error.code from stderr JSON and the process exit code — never grep error.message.

Authentication for agents

Agents and CI must not use staplehire login (it opens a browser). Set STAPLEHIRE_KEY in the environment, or pass --api-key for a single command.
See Authentication and Use in CI.

Output contract for agents

  • Success → JSON on stdout, exit 0.
  • Failure{ "error": { … } } on stderr, non-zero exit code.
  • Use -q to suppress human status lines so stdout is pure JSON.
  • Read responses may include a urls object with dashboard deep links.

Supported agents

FAQ

Yes — set STAPLEHIRE_KEY in the environment, or pass --api-key for one command. Never use login in unattended runs.
staplehire doctor -q to confirm version, key source, API URL, and a live API validation, then staplehire commands to discover the command tree.
Into the agent roots in your current project — .agents/skills/staplehire, .claude/skills/staplehire, and/or .cursor/skills/staplehire. If none exist, the CLI creates .agents/skills.
Related: Authentication · Poll jobs · CLI errors