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

> ## Agent Instructions
> These docs describe the Ancha CLI, npm package @ancha-labs/cli version 0.1.4, and the hosted workspace at app.ancha.io. Coding agents should start at https://docs.ancha.io/coding-agents. Run the CLI as `ancha` after `npm install -g @ancha-labs/cli`, or as `npx -y @ancha-labs/cli@0.1.4` without installing. Pass --json for machine-readable output, or set ANCHA_JSON=1. Every command ends with a `next:` line naming the next command. Exit codes: 0 pass, 1 a check failed or a comparison regressed, 2 usage, config or authentication error, 3 infrastructure error, 4 unimplemented endpoint with --strict.

# ancha docs

> Print the documentation bundled with the installed CLI, by topic, for reading offline.

`ancha docs` prints documentation that ships inside the CLI package, so it matches the installed version and works offline. This site is the full reference.

```bash theme={null}
ancha docs [options] [topic]
```

| Argument | Description |
| - | - |
| `topic` | Available: setup, run, explain, compare, scenes, integrations, cloud, playgrounds, cli-quickstart, tools |

```bash theme={null}
ancha docs run
```

Without a topic it lists the topics, then prints `setup`:

```text Output theme={null}
Topics: setup, run, explain, compare, scenes, integrations, cloud, playgrounds, cli-quickstart, tools. Read one with `ancha docs <topic>`.

# Start here
...
```

| Topic | Covers |
| - | - |
| `setup` | The loop: `init`, `doctor`, `run`, `explain`, baselines; where things run; exit codes. |
| `run` | Running agents, what the agent gets, container runs, retries, detached runs and your own harness. |
| `explain` | Reading a finished run. |
| `compare` | Baselines and comparisons. |
| `scenes` | Creating and validating scenes. |
| `integrations` | Native SDK settings and webhook signatures. |
| `cloud` | Signing in, where worlds run, CI variables, secrets and the authentication errors. |
| `tools` | Sandboxes, presets and the Slack MCP server. |
| `playgrounds` | Agents, worlds, playground tests and runs. |
| `cli-quickstart` | Playground commands from start to finish. |

`--json` prints `{"topics": [...], "topic": "...", "markdown": "..."}`. An unknown topic exits `2` and lists the topics:

```text Output theme={null}
error[USAGE]: unknown docs topic: nope
hint: available topics: setup, run, explain, compare, scenes, integrations, cloud, playgrounds, cli-quickstart, tools
```


## Related topics

- [CLI overview](https://docs.ancha.io/cli/overview.md)
- [For coding agents](https://docs.ancha.io/coding-agents.md)
- [Changelog](https://docs.ancha.io/changelog.md)
- [ancha doctor](https://docs.ancha.io/cli/doctor.md)
- [ancha execution](https://docs.ancha.io/cli/execution.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.