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

# CLI overview

> Use AgentCash from the command line.

The `agentcash` CLI is the primary interface for AgentCash. Use it to discover premium APIs, make paid requests, manage your wallet, add skills, and install [MCP mode](/mcp-mode) for AI clients.

## Install

```bash theme={null}
npm i -g agentcash
```

Or run commands directly with `npx`:

```bash theme={null}
npx agentcash <command> [options]
```

## Commands

| Command            | Description                                                                                        |
| ------------------ | -------------------------------------------------------------------------------------------------- |
| `onboard [code]`   | Set up wallet, configure MCP, and optionally redeem an invite code                                 |
| `search <query>`   | Find paid API services by natural-language query                                                   |
| `discover <url>`   | List available endpoints on an origin with descriptions and auth modes                             |
| `check <url>`      | Get input/output schema and auth mode for an endpoint. Run this before `fetch` to avoid 400 errors |
| `fetch <url>`      | HTTP fetch with automatic SIWX auth and payment                                                    |
| `fetch-auth <url>` | Deprecated alias for `fetch`                                                                       |
| `try <url>`        | Fetch a new origin's resources and return a prompt for calling the first endpoint                  |
| `register <url>`   | Register an origin with AgentCash (discover + index endpoints)                                     |
| `add <url>`        | Add a skill to the AgentCash MCP server                                                            |
| `balance`          | Show total wallet balance                                                                          |
| `accounts`         | Show per-network balances, addresses, and deposit links                                            |
| `redeem <code>`    | Redeem an invite code                                                                              |
| `fund`             | Open the funding page in your browser                                                              |
| `install`          | Install MCP mode for your AI client                                                                |
| `server`           | Start the MCP server (default when no command given)                                               |
| `report-error`     | Report a critical bug (emergency only)                                                             |

## Global options

| Flag                | Description                                                             |
| ------------------- | ----------------------------------------------------------------------- |
| `--verbose` / `-v`  | Enable debug output to stderr                                           |
| `--quiet` / `-q`    | Suppress stderr output                                                  |
| `--format <type>`   | Output format: `json` (default for pipes) or `pretty` (default for TTY) |
| `--invite <code>`   | Invite code to redeem for starter credits                               |
| `-y` / `--yes`      | Yes to all prompts                                                      |
| `--dev`             | Use development endpoints (localhost)                                   |
| `--sessionId <id>`  | Session ID for request tracing (auto-generated if not provided)         |
| `--provider <name>` | Custom provider identifier                                              |
| `--version`         | Show version number                                                     |
