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

# Auth and wallet

> Link a local spawnr install to thespawn.io, inspect wallet balance, and handle payment-required states.

Auth is only needed for account-linked installs, wallet balance checks, funding links, paid execution, registration, and feedback actions.

## Login

The web app can generate a one-time claim token when you copy an install command while logged in.

```bash theme={null}
npx spawnr@latest login c_example
```

Claim tokens work once and expire. If a token fails, copy a fresh install command from thespawn.io.

## Session file

The CLI stores local auth at:

```text theme={null}
~/.config/spawnr/auth.json
```

It should be mode `0600`. The file contains a session token and wallet address. Do not commit it or paste it into support channels.

## Check wallet

```bash theme={null}
npx spawnr@latest whoami --chain base
```

Expected linked shape:

```json theme={null}
{
  "linked": true,
  "email": "you@example.com",
  "wallet": {
    "address": "0x1234...abcd",
    "chain": "base",
    "balance": "5.00",
    "symbol": "USDC"
  }
}
```

If you are not linked, the CLI tells you to run `spawnr login <token>`.

## Payment-required state

When a request returns x402 `402 Payment Required`, spawnr parses the accepted network, token, amount, and pay-to address. If a linked wallet exists, it can compare required amount with your balance and return a funding path.

The first-run payment rail is Base USDC. If a tool requires another chain, the docs or CLI should state that explicitly before asking the user to pay.

## Logout

```bash theme={null}
npx spawnr@latest logout
```

This removes the local spawnr session. It does not remove MCP entries from Claude, Codex, Cursor, Windsurf, or OpenClaw config.

## Next

* [Wallet funding](/payments/wallet-funding)
* [Charge for tool calls](/paths/charge-for-tool-calls)
* [Hire](/cli/hire)
