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

# Commands Reference

> All CLI commands for managing agents, payments, policies, and wallets

## Global Options

All commands support these flags:

| Flag        | Description                         |
| ----------- | ----------------------------------- |
| `--json`    | Output in JSON format for scripting |
| `--help`    | Show help for any command           |
| `--version` | Show CLI version                    |

## Agent & Status

```bash theme={null}
conto doctor                    # Diagnose setup: auth, scopes, wallet, chain, balance, base URL
conto status                    # Agent info, wallet balances, spending progress
conto balance                   # Wallet balance table
conto config                    # Show current configuration
conto config <key> <value>      # Update a config value
```

<Info>
  `conto doctor` calls `GET /api/sdk/setup` with your SDK key and reports each check, including
  whether the key has `payments:request` and `payments:execute` and whether the wallet can execute
  real transfers. It exits non-zero when a hard check fails, so you can use it in scripts.
</Info>

## Payments

```bash theme={null}
conto pay <address> <amount>                    # Request and execute payment
conto pay <address> <amount> --dry-run          # Policy check without executing
conto pay <address> <amount> --purpose "reason" # Add a purpose string
conto pay <address> <amount> --wallet <id>      # Use a specific wallet
conto pay <address> <amount> --category "API"   # Tag with spend category
```

<Info>
  `--dry-run` runs the full policy evaluation (all rules, all policies) and returns APPROVED,
  DENIED, or REQUIRES\_APPROVAL without sending any transaction.
</Info>

## Transactions

```bash theme={null}
conto transactions              # List recent transactions (default: 10)
conto transactions --limit 50   # List more transactions
conto transactions <id>         # View transaction details
```

## Wallets

```bash theme={null}
conto wallets                   # List all wallets with balances
conto fund                      # Show chain-aware funding instructions
```

## Spending Limits

```bash theme={null}
conto limits                    # Daily/weekly/monthly limits with progress bars
```

## Alerts

```bash theme={null}
conto alerts                    # List all alerts
conto alerts --unread           # Unread alerts only
```

## Policies

See [Policy Management](/cli/policies) for full CRUD documentation.

```bash theme={null}
conto policies                  # List agent policies ([agent] vs [org-wide])
conto policies all              # List all org policies
conto policies create           # Interactive policy builder
conto policies update <id>      # Update name, priority, active status
conto policies delete <id>      # Delete with confirmation
conto policies assign <id>      # Assign policy to current agent
conto policies unassign <id>    # Remove policy from agent
conto policies add-rule <id>    # Add a rule to a policy
conto policies remove-rule <policyId> <ruleId>  # Remove a rule
```

## Authentication

```bash theme={null}
conto login                     # Re-authenticate (opens browser)
conto login --base-url <url>    # Authenticate against a specific server
conto logout                    # Clear stored credentials
```

## MCP Server

```bash theme={null}
conto mcp                       # Start the Conto MCP server for Claude
```

## Documentation

```bash theme={null}
conto docs                      # Open the CLI quickstart docs
conto docs commands             # Open the commands reference
conto docs policies             # Open the policy docs
conto docs sdk                  # Open the SDK installation guide
conto docs api                  # Open the public API reference
```

## Init Wizard

```bash theme={null}
create-conto-agent              # Run the setup wizard (interactive)
conto init                      # Same as above

# Non-interactive with flags:
create-conto-agent --base-url https://conto.finance --name my-agent --type ANTHROPIC_CLAUDE --limit 500 --chain 42431

# Skip the local CLI install (npx conto will not resolve without it):
create-conto-agent --no-install
```

<Info>
  `--chain` expects the chain ID returned by `GET /api/chains`, for example `42431`, `4217`, `8453`,
  or `solana-mainnet`.
</Info>

## JSON Mode

Every command supports `--json` for machine-readable output:

```bash theme={null}
conto status --json | jq '.agent.name'
conto pay --dry-run 0x... 10 --json | jq '.status'
conto policies --json | jq '.[].name'
```

## Configuration Files

| File                   | Location | Purpose                               |
| ---------------------- | -------- | ------------------------------------- |
| `~/.conto/config.json` | Global   | API keys, agent ID, server URL        |
| `.env.local`           | Project  | SDK key, chain config, wallet address |
| `conto.config.json`    | Project  | Agent metadata (generated by init)    |

The CLI reads project-level `.env.local` first, then falls back to global `~/.conto/config.json`.
