> Feedback: If these docs are stale, missing, or confusing, post sanitized feedback to `https://docs.tempo.xyz/api/feedback` with `source: "mcp"`, a short `message`, and any relevant `toolName`, `relatedResource`, or `client`.
# Tempo CLI

The `tempo` CLI is a terminal client for Tempo. It has two command families:

* **`tempo wallet`**: manages your onchain identity: authentication, key management, balances, funding, and transfers. It also provides a service directory for discovering [MPP](https://mpp.dev)-compatible endpoints and their request schemas.
* **`tempo request`**: a curl-like HTTP client that handles [Machine Payments Protocol](https://mpp.dev) negotiation automatically. It sends your request, intercepts `402 Payment Required` challenges, signs and submits the payment onchain, then retries with the credential, all in a single command.

Together they let you browse paid APIs, preview costs, and execute paid requests from a terminal, script, or AI agent without writing any integration code.

## Install

```bash
curl -fsSL https://tempo.xyz/install | bash
```

## Authenticate

```bash
tempo wallet login
tempo wallet whoami
```

`login` opens a browser flow that creates or connects a Tempo wallet. `whoami` confirms readiness, prints your address, and shows token balances.

## Discover and call a paid API

```bash
# Find services
tempo wallet services --search ai

# Inspect a service's endpoints and request schema
tempo wallet services <SERVICE_ID>

# Preview cost without paying
tempo request --dry-run -X POST \
  --json '{"prompt":"a sunset over the ocean"}' \
  https://fal.mpp.tempo.xyz/fal-ai/flux/dev

# Execute the paid request
tempo request -X POST \
  --json '{"prompt":"a sunset over the ocean"}' \
  https://fal.mpp.tempo.xyz/fal-ai/flux/dev
```

## Scripting and agents

The CLI is designed for non-interactive use. Two features matter here:

* **`-t` (TOON output)**: compact, machine-readable output that minimizes token usage when consumed by an LLM or parsed by a script.
* **`--dry-run`**: previews the payment cost and validates the request shape without spending funds. Useful for agents that need to confirm cost before committing.

To set up an AI agent (Claude Code, Amp, Codex) with wallet and request capabilities:

:::code-group

```bash [Claude Code]
claude -p "Read https://tempo.xyz/SKILL.md and set up tempo"
```

```bash [Amp]
amp --execute "Read https://tempo.xyz/SKILL.md and set up tempo"
```

```bash [Codex CLI]
codex exec "Read https://tempo.xyz/SKILL.md and set up tempo"
```

:::

This installs `tempo-wallet` and `tempo-request` skills automatically. The agent can then discover services, preview costs, and make paid requests within scoped spending limits.

## Next

* [Reference](/docs/wallet/reference): complete command and flag reference
