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

# CLI Overview

> All Enact commands and global flags.

## Commands

| Command                         | Description                         |
| ------------------------------- | ----------------------------------- |
| [`enact init`](/cli/init)       | Create wallet + agent session       |
| [`enact pay <url>`](/cli/pay)   | Make a paid HTTP request            |
| [`enact balance`](/cli/balance) | Show token balances                 |
| [`enact session`](/cli/session) | Show session info + remaining limit |
| `enact mcp`                     | Start MCP server for AI tools       |

## Global flags

| Flag            | Description                  |
| --------------- | ---------------------------- |
| `-t`, `--agent` | Machine-readable JSON output |
| `--help`        | Show help                    |

## Agent mode

All commands support `-t` for JSON output — useful when the CLI is being called by an agent:

```bash theme={null}
enact -t balance
# {"address":"0x...","balances":[{"token":"AlphaUSD","balance":"95.50"}]}

enact -t session
# {"rootAddress":"0x...","accessKey":"0x...","budget":"100","remaining":"95.50"}

enact -t pay https://api.example.com/resource
# {"status":200,"receipt":true,"body":{...}}
```

## Credentials

Credentials are loaded in this order:

1. `.env` file in the current working directory
2. Environment variables (`AGENT_PRIVATE_KEY`, `AGENT_ROOT_ADDRESS`, etc.)

Run [`enact init`](/cli/init) to create credentials for the first time.
