> For the complete documentation index, see [llms.txt](https://docs.arenas.fi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.arenas.fi/build-with-arenas/cli.md).

# CLI

The Arenas CLI scripts the same flows as the [API](/build-with-arenas/api-reference.md) and [SDK](/build-with-arenas/sdks-and-tooling.md) from a terminal or CI — useful for market operations, monitoring, and automation.

***

### Configuration

The CLI is scoped to an arena the same way the API is — with an `arenaKey` — plus a signer for write operations:

| Setting               | Purpose                                          |
| --------------------- | ------------------------------------------------ |
| `ARENA_KEY`           | Scopes reads/writes to your arena.               |
| `ARENAS_API`          | API base URL (see your arena’s `/swagger`).      |
| Signer key / keystore | Required only for write commands (transactions). |

Keep signer material in environment variables or a keystore — never commit it.

***

### What you can do

Read operations mirror the API surface:

* List **markets**, **pools**, **financings**, and per-account **positions**.
* Inspect **requests** and their status, and pending **intents**.
* Check **indexer sync** (`last-synced-blocks`) after writes.

Write operations mirror the role flows (each is an on-chain transaction):

| Role     | Actions                                      |
| -------- | -------------------------------------------- |
| Borrower | request · modify · close · receive · repay   |
| Approver | approve · decline                            |
| LP       | deposit · create-withdraw · execute-withdraw |

See [Embed Credit](/build-with-arenas/embed.md), [Launch a Market](/build-with-arenas/launch-market.md), and [Fund Markets](/build-with-arenas/fund-markets.md) for what each action does.

***

### Typical use

```bash
# read: list markets in your arena
arenas markets list --arena-key "$ARENA_KEY"

# monitor: an approver's pending review inbox
arenas requests list --status requested --arena-key "$ARENA_KEY"

# after a write: wait for the indexer before refetching
arenas sync status --arena-key "$ARENA_KEY"
```

> Command names above are illustrative. For the exact commands and flags available in your environment, run the CLI’s built-in help, and use the [MCP](/build-with-arenas/sdks-and-tooling.md#mcp) as the authoritative source for flow logic.
