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

# Install the CLI

> Install the stophy command, search and scrape without logging in, then log in to crawl, extract, read sites with parsers and set up your coding agents.

The `stophy` command calls the API from your terminal. It reads the endpoint list from the API at run time, so a new endpoint is a new command. `stophy <command> --help` lists the options.

## Install

```bash theme={null}
curl -fsSL https://stophy.dev/install | bash
```

The binary goes to `~/.local/bin`. On Windows, run `irm https://stophy.dev/install.ps1 | iex`. With Node.js 20 or later, `npm install -g @stophy/cli` also works. Check with `stophy version`.

Without logging in, commands that `stophy endpoints` marks `free` work within the [free limits](https://docs.stophy.dev/production/rate-limits.md):

```bash theme={null}
stophy search "bun runtime" --limit 5
```

## Log in

`stophy login --browser` prints a code and opens stophy.dev. Check the page shows the same code, then click **Approve**. With no browser, open the printed link on another device.

With a key from the [dashboard](https://stophy.dev/dashboard), run `stophy login --api-key` and paste it when prompted. Never pass a key as an argument. In CI, set `STOPHY_API_KEY` from your secret store.

Each computer gets its own key, and logging in again replaces it. `stophy logout` revokes it. See [Get credentials](https://docs.stophy.dev/get-credentials.md).

## Set up your agent

`stophy init --all` logs you in, installs the [skills](https://docs.stophy.dev/install-skill.md) with `npx -y skills add stophydotdev/stophy` and adds the [MCP server](https://docs.stophy.dev/install-mcp.md). With Claude Code on your PATH it runs `claude mcp add`. For other agents it prints the command and leaves your config files alone.

| Option | What it does |
| - | - |
| `--all` | Run every step without asking |
| `--agent <name>` | Set up one agent, such as `claude-code` or `codex` |
| `--skip-auth`, `--skip-skills`, `--skip-mcp` | Skip that step |

## Make a request

```bash theme={null}
stophy scrape https://example.com
stophy map https://example.com --limit 50
stophy crawl https://example.com --limit 20
stophy extract --urls https://example.com --prompt "the page title"
stophy scrape --parser reddit-subreddit https://www.reddit.com/r/bun
```

* `--json` prints the data as JSON, `--raw` the full response, `-o <path>` writes a file. With `--json` the cost and request id go to stderr.
* Give lists as `--urls a,b`. Switch a yes-or-no option with `--flag` and `--no-flag`. Pass JSON options as one quoted argument, like `--formats '["markdown","links"]'`.
* A value the command does not take stops the CLI before the call and prints the ones that work.
* A failed call prints `Request id: <id>`, which support asks for.

`crawl` and `batch scrape` answer with an `id`. Run `status <id>` until it is `completed`, and `cancel <id>` to stop. When `status` returns a `next` link, rerun it with `--cursor`. `extract status <id>` rereads a result for 24 hours. See [Read a crawl](https://docs.stophy.dev/crawl/async.md).

`stophy parsers [word]` lists the parsers `scrape --parser` takes. If the output ends with a `cursor`, pass `--parserOptions '{"cursor":"<cursor>"}'` for the next page. See [Pre-built parsers](https://docs.stophy.dev/scrape/prebuilt-parsers).

The CLI has `parse`, `agent`, `browser task`, `batch scrape` and `webhook secret`, and no command for browser sessions or monitors. Call those over HTTP.

## Commands

| Command | What it does |
| - | - |
| `stophy init` | Set up Stophy in your coding agents |
| `stophy login`, `stophy logout` | Log in with a browser or key, or revoke this computer's key |
| `stophy endpoints [word]` | List every command with its price |
| `stophy describe <id>` | Show one command's options and an example |
| `stophy status`, `stophy usage` | Show your login, balance and usage |
| `stophy logs --days 7` | Show your recent requests |
| `stophy doctor` | Check your install, login and connection |

Set `STOPHY_NO_UPDATE_CHECK=1` to turn off the new-version notice.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.