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

# Anyway CLI

> Use supported Business and Agents workflows from a terminal.

## Install and update

```bash theme={null}
npm install -g @anyway-sh/cli
anyway update --check
anyway update
```

Use `anyway --help` for the installed version's authoritative command list.

## Authentication modes

| Mode | Use it for |
| - | - |
| `anyway login` | Products, orders, wallet ownership, Credits, Dashboard, traces, and developer settings |
| `ANYWAY_AGENT_WALLET_KEY` | Agent identity, policy, history, signing, direct payment authorization, and SuperAPI calls |
| Local agent record | Selecting a saved Agent Wallet Key without exporting an environment variable |

```bash theme={null}
anyway login
anyway whoami
anyway whoami --refresh
anyway logout
```

### Create an Agent Wallet during login

Start the combined Agent Wallet flow:

```bash theme={null}
anyway login --agent-wallet
```

For SSH, CI, or an agent runtime, begin the flow and then complete both milestones:

```bash theme={null}
anyway login --agent-wallet --non-interactive
anyway login --continue
anyway wallets agents create --continue
```

Repeat a continuation command while it reports `pending`.

## Products and payment links

```bash theme={null}
anyway products list
anyway products get PRD_EXAMPLE
anyway products create --name "My Product" --price 29.99
anyway products create --name "Crypto Tip" --provider crypto
anyway products update PRD_EXAMPLE --name "New name"
anyway products publish PRD_EXAMPLE
anyway products archive PRD_EXAMPLE
anyway products payment-links PRD_EXAMPLE
anyway products payment-links PRD_EXAMPLE create --provider crypto --price 9.99
```

Creating a product or link returns `paymentLinkUrl`. Share the complete Anyway URL exactly as returned; do not parse, reconstruct, or modify it.

## Orders and Dashboard

```bash theme={null}
anyway orders list --status paid --page 1 --size 20
anyway orders list --product PRD_EXAMPLE --page 1 --size 20
anyway orders list --format csv
anyway dashboard templates
anyway dashboard query TEMPLATE_ID --days 30
```

CSV and JSON output use the same result page and filters as table output.

## Organization wallets and Credits

```bash theme={null}
anyway wallets balance
anyway wallets transactions
anyway wallets credit balance
anyway wallets credit ledger
anyway wallets credit topup
```

Organization Credits and wallet USDC are different assets. A Credit balance is not withdrawable wallet USDC.

## Agent Wallet management

Merchant-login commands manage the organization's wallets:

```bash theme={null}
anyway wallets agents create --name "Research Agent"
anyway wallets agents create --non-interactive
anyway wallets agents create --continue
anyway wallets agents list
anyway wallets agents reset AGENT_ID
anyway wallets agents reset AGENT_ID --non-interactive
anyway wallets agents reset AGENT_ID --continue
```

Runtime and local-key commands use an Agent Wallet Key:

```bash theme={null}
export ANYWAY_AGENT_WALLET_KEY="<base64url key bundle>"
anyway wallets agents import --token "<bundle>"
anyway wallets agents import --token-file ./agent-wallet-key.txt
anyway wallets agents list --local
anyway wallets agents list --local --offline
anyway wallets agents default AGENT_ID
anyway wallets agents whoami [AGENT_ID]
anyway wallets agents policies [AGENT_ID]
anyway wallets agents history [AGENT_ID] --limit 50
anyway wallets agents credit-balance [AGENT_ID]
anyway wallets agents forget AGENT_ID --yes
```

`default` and `forget` only change local CLI records. They do not rotate or delete the server-side wallet.

### Sign or authorize a payment

```bash theme={null}
anyway wallets agents pay --to 0xRECIPIENT --amount 1.5
anyway wallets agents sign --typed-data-file ./typed-data.json
```

The server enforces the selected wallet's spending policy before signing.

## SuperAPI

```bash theme={null}
anyway superapi call "<x402 endpoint URL>"
anyway superapi call "<x402 endpoint URL>" \
  --method POST --body '{"query":"payment APIs"}'
```

Useful flags include `--body-file`, `--header`, `--headers-json`, `--agent`, `--validity-seconds`, and `--yes`. `--yes` skips the quote confirmation; use it only when automatic approval is intentional.

## Setup and wallet initialization

```bash theme={null}
anyway setup --check
anyway setup
anyway setup -y
anyway init wallets --type crypto
anyway init wallets --type agent
```

`setup` installs the Anyway agent skill for detected compatible agents.

## Traces, developer settings, CLI telemetry, and feedback

```bash theme={null}
anyway traces status
anyway traces list --limit 20
anyway developer keys list
anyway developer keys list --type payment_key
anyway developer keys create --name "Production SDK"
anyway developer keys delete KEY_ID
anyway telemetry
anyway telemetry off
anyway telemetry on
anyway telemetry reset
anyway telemetry inspect superapi call
anyway feedback "Describe the issue"
anyway feedback "Describe the issue" --category bug --attach-last
anyway feedback "Describe the issue" --dry-run
```

CLI usage telemetry is separate from the application traces described in the Agent Tracing SDK guide. `telemetry inspect` previews the redacted command event without sending it. Run a command with `--help` before scripting a subcommand whose exact flags matter.

## Automation

Global automation flags:

| Flag | Behavior |
| - | - |
| `--format table` | Human-readable default |
| `--format json` | Structured output on stdout |
| `--format csv` | CSV for commands that return rows |
| `--timeout 10s` | Stop after a deadline; accepts `ms`, `s`, or `m` |
| `--yes`, `-y` | Skip a supported confirmation prompt |

Stable process exit classes are `0` success, `1` unknown, `2` validation, `3` authentication, `4` timeout, `5` network, `6` server error, `7` rate limited, and `8` other client error.

<Warning>
  Keep login tokens and Agent Wallet Keys out of shell history, CI logs, telemetry, screenshots, and model prompts. Prefer secret injection and delete temporary key files after import.
</Warning>


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