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

# Overview

> The Cadenza CLI command surface and how the pieces connect.

The CLI is organized around **projects**. A project is a directory with an
`env.json` mission spec. You scaffold it, run it, analyze it, and turn it into
training data.

## The workflow

<Steps>
  <Step title="Scaffold">
    `mkdir` or `env init` create a project and its `env.json`.
  </Step>

  <Step title="Author">
    Edit `env.json` to define the scene, phases, success/fail predicates, and
    reward shaping. See the [schema](/cli/environment-schema).
  </Step>

  <Step title="Run">
    `env run` executes the mission in simulation, logging every tick and scoring
    the result with the LLM judge.
  </Step>

  <Step title="Improve">
    `env stats` analyzes runs. `env finetune`, `env train`, and `env lora` turn
    them into better policies and prompts.
  </Step>
</Steps>

## Command map

| Area                           | Commands                                                                       | Extra          |
| ------------------------------ | ------------------------------------------------------------------------------ | -------------- |
| **Projects**                   | `mkdir`, `env init`, `env show`                                                | —              |
| **Run & analyze**              | `env run`, `env stats`, `env cache`                                            | `gym`          |
| **Actions** (needs login)      | `env action create`, `env action list`, `env action show`, `env action remove` | —              |
| **Fine-tune data & prompts**   | `env finetune`, `env train`                                                    | —              |
| **LoRA action head**           | `env lora` (`add`/`data`/`finetune`/`eval`/`decode`)                           | `lora`         |
| **Residual RL & distillation** | `env residual` (`init`/`show`/`train`/`eval`/`bench`), `env distill`           | `rl`           |
| **VLA mode + GRD**             | `env vla` (`init`/`show`/`data`/`grd`/`eval`)                                  | `lora` / `vla` |
| **Megan** (needs login)        | `apikey`, `usage`, `MeganTK` SDK                                               | —              |
| **Account**                    | `login`, `logout`, `whoami`                                                    | —              |
| **Shell**                      | `help`, `clear`, `--version`                                                   | —              |

The full table with every flag is in the [Command reference](/cli/command-reference).
The newer learning stages have their own guides:
[Residual RL & distillation](/cli/residual-and-distill),
[VLA mode & GRD](/cli/vla-mode), and the shared
[Governance gate](/cli/governance) that decides what's safe to deploy.
To call Cadenza **from your own project**, see [Megan](/megantk/introduction) —
your token as an API key.

## Two ways to run

```bash theme={null}
cadenza                      # interactive shell (tab-complete, Ctrl+C to exit)
cadenza env run my-project   # run one command and exit (scripts, CI)
```

Inside the shell, omit the leading `cadenza`:

```text theme={null}
> env run my-project --headless
> env stats my-project
```

<Tip>
  Press **Tab** in the shell to complete commands and `env` subcommands, and
  **Ctrl+L** to clear the screen / redraw the banner.
</Tip>
