<!-- tempo-docs-context -->
> Source: [/docs/cli/wallet](https://tempo.xyz/developers/docs/cli/wallet.md)
> Section: [Get Started](https://tempo.xyz/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations.
> [Documentation index](https://tempo.xyz/developers/llms.txt) · [Docs skill](https://tempo.xyz/developers/SKILL.md)

> Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation.
> If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.xyz/developers/llms.txt) and Markdown pages directly.

# `tempo wallet`

`tempo wallet` is the command-line way to use [Tempo Wallet](https://wallet.tempo.xyz) from scripts, terminals, and AI agents. Use it to sign in, manage balances and access keys, discover [MPP](https://mpp.dev/overview) services, fund token balances, and manage payment sessions. Use [`tempo request`](https://tempo.xyz/developers/docs/cli/request) when you want the CLI to make the paid HTTP call.

<span id="download-the-tempo-wallet-cli" />

[Install the Tempo CLI](https://tempo.xyz/developers/docs/cli#install) first. The launcher installs the wallet and request extensions the first time you run them.

## Usage

```bash [Terminal]
tempo wallet <COMMAND> [FLAGS]
```

<span id="authenticate-with-tempo-wallet-cli" />

## Sign in

```bash [Terminal]
tempo wallet login
tempo wallet whoami
```

`login` opens a browser flow to connect your [Tempo Wallet](https://wallet.tempo.xyz). If you don't have one, the flow creates it. When `whoami` reports `ready=true`, the wallet is configured for [`tempo request`](https://tempo.xyz/developers/docs/cli/request). Check the balance and preview the request to confirm it can cover the payment.

* On a remote host where the browser is on another device, run `tempo wallet login --no-browser`.
* Run `tempo wallet refresh` to refresh a stale access key without signing out.
* Run `tempo wallet logout --yes` to disconnect.

<span id="balances-and-credits" />

## Balances

```bash [Terminal]
tempo wallet whoami
tempo wallet whoami --mach
```

`whoami` shows your address, token balances, and key state. Use `--mach` to show your onchain MACH balance.

<span id="manage-access-keys" />

## Access keys

```bash [Terminal]
tempo wallet keys
tempo wallet revoke <ACCESS_KEY_ADDRESS> --dry-run
tempo wallet revoke <ACCESS_KEY_ADDRESS>
```

Each wallet can have multiple access keys with independent spending limits. Use access-key limits to constrain account spending, and revoke keys that are no longer needed. These keys authorize transactions; they are separate from [Tempo API keys](https://tempo.xyz/developers/docs/api/authentication).

<span id="add-wallet-funds" />

## Add funds

```bash [Terminal]
tempo wallet fund
tempo wallet fund --mach
tempo wallet fund --crypto
```

On testnet, the default flow opens the faucet. On mainnet, it opens available funding options. `--crypto` opens direct crypto funding. `--mach` opens [MACH](https://wallet.tempo.xyz/agent#mach) checkout on mainnet.

Transfer tokens to another address:

```bash [Terminal]
tempo wallet transfer <AMOUNT> <TOKEN> <TO_ADDRESS> --dry-run
tempo wallet transfer <AMOUNT> <TOKEN> <TO_ADDRESS>
```

Check the network and balance with `tempo wallet whoami` before funding. For more options, see [Fund an account](https://tempo.xyz/developers/docs/guide/getting-funds).

## Discover services

```bash [Terminal]
tempo wallet services
tempo wallet services --search <QUERY>
tempo wallet services <SERVICE_ID>
```

The [Machine Payments Protocol](https://mpp.dev/overview) (MPP) lets HTTP endpoints accept payments inline. The service directory indexes MPP-registered providers. Each entry shows endpoint URLs, HTTP methods, pricing, and request schemas. Use it to find the exact URL and payload for [`tempo request`](https://tempo.xyz/developers/docs/cli/request).

Agents that support MCP can also use the read-only services MCP server at `https://mpp.dev/mcp/services`. See [Find services](https://tempo.xyz/developers/docs/guide/machine-payments/discover-services) for MCP setup, JSON-RPC examples, and the public catalog API.

<span id="manage-payment-sessions" />

## Payment sessions

When you use [pay-as-you-go](https://tempo.xyz/developers/docs/guide/machine-payments/pay-as-you-go) services, MPP opens a [session](https://mpp.dev/payment-methods/tempo/session): a payment channel where your wallet deposits funds into a reserve contract, then pays per request with signed [vouchers](https://mpp.dev/protocol/credentials). Vouchers are exchanged offchain; opening, funding, settling, and closing a channel are onchain operations.

`tempo wallet` tracks session state locally:

```bash [Terminal]
tempo wallet sessions list
tempo wallet sessions sync
tempo wallet sessions close --all
tempo wallet sessions close --orphaned
tempo wallet sessions close --finalize
```

`sync` reconciles local records with onchain state. `close --orphaned` targets orphaned onchain channels. `close --finalize` finalizes channels already pending close. Add `--dry-run` to any close command to preview it first.

## Agent and script mode

Add `-t` for compact, machine-readable [TOON](https://toonformat.dev/) output. Preview paid requests with `--dry-run` and cap them with `--max-spend`:

```bash [Terminal]
tempo wallet -t whoami
tempo wallet -t services --search <QUERY>
tempo wallet -t services <SERVICE_ID>
tempo request -t --dry-run -X POST --json '{"input":"hello"}' <SERVICE_URL>/<ENDPOINT_PATH>
tempo request -t --max-spend 1.00 -X POST --json '{"input":"hello"}' <SERVICE_URL>/<ENDPOINT_PATH>
```

See [Recipes](https://tempo.xyz/developers/docs/wallet/recipes) for complete flows, including agent setup.

<span id="tempo-wallet-cli-command-reference" />

<span id="wallet-authentication-commands" />

<span id="wallet-key-commands" />

<span id="wallet-funding-commands" />

<span id="wallet-service-discovery-commands" />

<span id="wallet-session-commands" />

<span id="advanced-wallet-commands" />

## Commands

| Command | Description |
| --- | --- |
| `tempo wallet login` | Connect or create a wallet through browser sign-in. |
| `tempo wallet logout` | Disconnect and clear local credentials. |
| `tempo wallet refresh` | Refresh the current access key. |
| `tempo wallet whoami` | Print readiness, address, balances, and key state. |
| `tempo wallet keys` | List access keys and their spending limits. |
| `tempo wallet revoke <ACCESS_KEY_ADDRESS>` | Revoke an access key. |
| `tempo wallet fund` | Fund the wallet: the faucet on testnet, funding options on mainnet. |
| `tempo wallet transfer <AMOUNT> <TOKEN> <TO_ADDRESS>` | Transfer tokens to another address. |
| `tempo wallet services [<SERVICE_ID>]` | List registered services, or show one service's endpoints, methods, and request schemas. |
| `tempo wallet sessions list` | List active payment sessions. |
| `tempo wallet sessions sync` | Reconcile local sessions with onchain state. |
| `tempo wallet sessions close` | Close payment sessions. |
| `tempo wallet debug` | Collect debug info for support. |
| `tempo wallet completions <SHELL>` | Generate shell completions. |

## Flags

### All commands

| Flag | Description |
| --- | --- |
| `-t` | Print compact, machine-readable [TOON](https://toonformat.dev/) output. |
| `--help` | Show the command's flags. |

### `tempo wallet login`

| Flag | Description |
| --- | --- |
| `--no-browser` | Print the sign-in URL instead of opening a browser, for remote hosts. |

### `tempo wallet logout`

| Flag | Description |
| --- | --- |
| `--yes` | Skip the confirmation prompt. |

### `tempo wallet whoami`

| Flag | Description |
| --- | --- |
| `--mach` | Show the onchain MACH balance. |

### `tempo wallet revoke`

| Flag | Description |
| --- | --- |
| `--dry-run` | Preview the revocation without submitting it. |

### `tempo wallet fund`

| Flag | Description |
| --- | --- |
| `--crypto` | Open direct crypto funding. |
| `--mach` | Buy MACH for supported services. |

### `tempo wallet transfer`

| Flag | Description |
| --- | --- |
| `--dry-run` | Preview the transfer without submitting it. |
| `--mpp-challenge-file <FILE>` | Pay the MPP challenge in this headers file, captured with `tempo request -D`. |

### `tempo wallet services`

| Flag | Description |
| --- | --- |
| `--search <QUERY>` | Filter services by keyword. |

### `tempo wallet sessions close`

| Flag | Description |
| --- | --- |
| `--all` | Close all sessions. |
| `--orphaned` | Close orphaned onchain channels. |
| `--finalize` | Finalize channels already pending close. |
| `--cooperative <URL>` | Request a cooperative close from the service. |
| `--dry-run` | Preview the close without submitting it. |

<span id="learn-more-about-tempo-wallet-cli" />

## Related

[tempo request](https://tempo.xyz/developers/docs/cli/request): Make paid HTTP requests from the terminal

[Tempo Wallet](https://wallet.tempo.xyz): Open the web wallet to manage your account

[MPP overview](https://mpp.dev/overview): How services request and verify payment

[Source code](https://github.com/tempoxyz/wallet-cli): tempoxyz/wallet-cli on GitHub
