# Command reference

Every `arena` command, subcommand and flag, with the same text `arena <command> --help` prints. The pages are generated from the version of `agilerl` that Arena currently supports. For how to use a command, start from the guide for the task.

## Commands

Each command has its own page with its subcommands and their flags.

- [arena agent](commands/agent.md): List, deploy, run, and generate with Arena agents.
- [arena cluster](commands/cluster.md): Manage Arena enterprise clusters.
- [arena datasets](commands/datasets.md): Manage your language model datasets in Arena.
- [arena env](commands/env.md): Manage your custom GEM environments.
- [arena experiments](commands/experiments.md): Manage experiments (training jobs) by name.
- [arena login](commands/login.md): Sign in through the browser.
- [arena logout](commands/logout.md): Log out and clear persisted credentials.
- [arena manifest](commands/manifest.md): Validate a training manifest, or print its JSON Schema.
- [arena memory](commands/memory.md): Estimate GPU memory, or solve one setting against a card.
- [arena models](commands/models.md): List HuggingFace models in the Arena catalog.
- [arena projects](commands/projects.md): Manage your projects in Arena.
- [arena resources](commands/resources.md): List the GPU types and GPU counts you can train on.
- [arena secrets](commands/secrets.md): Manage your organization’s secrets in Arena.
- [arena user](commands/user.md): Retrieve user / account information.

`arena cluster` only appears in `arena --help` once you sign in to an Enterprise organization. Its `providers` subcommands come from your organization’s settings at run time, so they are not listed here.

## Global options

These go between `arena` and the command, for example `arena --json experiments list`.

### Usage

```shell
arena [OPTIONS] COMMAND [ARGS]...
```

### Options

### --json

Print each result as one JSON document on stdout, with every field. Progress, logs and errors go to stderr. Commands that stream text (agent run/generate, sessions) stay as text.

### --api-key <api_key>

Bearer secret: profile CLI PAT (arena_pat_…) or access token.

### --org-key <org_key>

Organisation API key (arena_org_…). Requires --external-user-id.

### --external-user-id <external_user_id>

Partner user id sent as X-External-User-Id. Requires --org-key.

### --base-url <base_url>

Override Arena API base URL (for local/dev environments).

### --keycloak-url <keycloak_url>

Override Keycloak URL for authentication.

### --realm <realm>

Override Keycloak realm.

### --client-id <client_id>

Override Keycloak client ID.

### --request-timeout <request_timeout>

Default timeout in seconds for API requests.

* **Default:**
  `30`

### --upload-timeout <upload_timeout>

Timeout in seconds for file uploads and cluster register.

* **Default:**
  `300`

### --module-catalog-url <module_catalog_url>

Base URL of the signed Terraform module catalog.

### --module-catalog-public-key <module_catalog_public_key>

Ed25519 public key PEM used to verify the module catalog.

### -h, --help

Show this message and exit.
