> ## Documentation Index
> Fetch the complete documentation index at: https://staplehire.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Staplehire CLI

> Run your entire hiring pipeline from the terminal — create roles, source and enrich candidates, send AI interviews, and automate it all with JSON output built for scripts and AI agents.

The Staplehire CLI (`staplehire`) puts your hiring agent in the terminal. Create roles from a job description, build pipeline stages, add and enrich candidates, generate and send AI interviews, source prospects, and poll long-running jobs — every command returns structured JSON so it works for humans, scripts, AI agents, and CI/CD alike.

```bash theme={null}
npm install -g @staplehire/staplehire-cli
staplehire login
staplehire roles create --jd "Senior backend engineer. TypeScript, remote."
```

<CardGroup cols={2}>
  <Card title="Install the CLI" icon="download" href="/docs/installation">
    Install the npm package, verify the `staplehire` binary, and run `staplehire doctor`.
  </Card>

  <Card title="Authenticate" icon="key" href="/docs/authentication">
    Log in with browser OAuth, or set `STAPLEHIRE_KEY` for agents and CI.
  </Card>

  <Card title="Quickstart" icon="rocket" href="/docs/quickstart">
    Go from install to a sent AI interview in one end-to-end walkthrough.
  </Card>

  <Card title="Use with AI agents" icon="bot" href="/docs/ai-agents">
    Install the skill so Cursor, Claude Code, and Codex drive Staplehire safely.
  </Card>
</CardGroup>

## What you can do

| Workflow                | Command                                  | Guide                                       |
| ----------------------- | ---------------------------------------- | ------------------------------------------- |
| Create a role from a JD | `staplehire roles create --jd …`         | [Create a role](/docs/create-role-cli)           |
| Build pipeline stages   | `staplehire stages create …`             | [Manage stages](/docs/stages-cli)                |
| Add a candidate         | `staplehire candidates create …`         | [Add a candidate](/docs/add-candidate-cli)       |
| Run deep research       | `staplehire candidates enrich …`         | [Enrich a candidate](/docs/enrich-candidate-cli) |
| Send an AI interview    | `staplehire candidates send-interview …` | [Send an interview](/docs/send-interview-cli)    |
| Email a candidate       | `staplehire candidates send-email …`     | [Send an email](/docs/send-email-cli)            |
| Source prospects        | `staplehire sourcing start …`            | [Source candidates](/docs/source-candidates-cli) |
| Search your org         | `staplehire search --q …`                | [Search](/docs/search-cli)                       |
| Poll async jobs         | `staplehire jobs poll …`                 | [Poll jobs](/docs/poll-agent-jobs)               |

## Built for automation

Every data command writes JSON to **stdout**. Errors are structured JSON on **stderr** with [stable exit codes](/docs/cli-errors), and the CLI auto-switches to JSON whenever stdout is piped — so it behaves identically in a script, a CI job, or an AI agent's terminal.

```bash theme={null}
staplehire roles list | jq '.roles[].id'
staplehire doctor -q | jq '.checks[] | select(.status != "pass")'
```

<Tip>
  Run `staplehire commands` for a machine-readable command tree that matches your installed CLI version exactly — agents can discover every subcommand and flag without guessing.
</Tip>

## Domains

| Host                                             | Purpose                                  |
| ------------------------------------------------ | ---------------------------------------- |
| [staplehire.com](https://staplehire.com)         | Marketing site and these docs            |
| [app.staplehire.com](https://app.staplehire.com) | Dashboard, OAuth `/connect`, apply links |
| [api.staplehire.com](https://api.staplehire.com) | Hiring API gateway                       |

Read responses include `urls.*` deep links on **app.staplehire.com** (for example `urls.review_url` on a candidate with an interview session), so you can jump straight from a CLI result into the dashboard.

## Two ways to integrate

<CardGroup cols={2}>
  <Card title="CLI" icon="terminal">
    Shell out to the `staplehire` binary. Best for scripts, CI/CD, and coding agents that run terminal commands. **These docs cover the CLI.**
  </Card>

  <Card title="TypeScript SDK" icon="code" href="https://github.com/navindev26/Staplehire/tree/main/packages/hire">
    `import { createClient } from '@staplehire/hire'` for typed, in-process integrations. Ships in the same package.
  </Card>
</CardGroup>

Next: [Install the Staplehire CLI](/docs/installation) · [Authenticate](/docs/authentication) · [Quickstart](/docs/quickstart)
