# Environment

URL: https://docs.hanzo.ai/docs/cli/environment

> The `hanzo environment` commands.

Also for this capability: [API](https://docs.hanzo.ai/docs/openapi/environment) · **CLI** · [MCP](https://docs.hanzo.ai/docs/mcp-tools/environment) · [SDKs](https://docs.hanzo.ai/docs/sdks)

What a codebase is before its agent starts: the commands that install it, the command that starts it, and the secrets it reads.

[API reference →](https://docs.hanzo.ai/docs/openapi/environment)

```bash
hanzo environment list
```

Every command takes `--json` for the raw response and `--help` for its own flags. Sign in once with `hanzo auth login`; the commands below use that session, and the org they act in is the one it carries.

| Command                        | What it does                                                 |
| ------------------------------ | ------------------------------------------------------------ |
| `hanzo environment get <repo>` | Reads one codebase's environment.                            |
| `hanzo environment list`       | Lists every codebase in your org that has an environment.    |
| `hanzo environment rm <repo>`  | Forgets one codebase's environment, and its secrets with it. |
| `hanzo environment set <repo>` | Saves one codebase's install and start scripts.              |

### Secrets

| Command                                       | What it does                        |
| --------------------------------------------- | ----------------------------------- |
| `hanzo environment secrets rm <repo> <name>`  | Removes one secret from a codebase. |
| `hanzo environment secrets set <repo> <name>` | Sets one secret on a codebase.      |
