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

# Agno CLI

> Scaffold, run, and connect an AgentOS from the terminal with the agno command.

```bash theme={null}
agno create my-os
cd my-os
cp example.env .env   # fill in your secrets
agno up
agno connect
```

The `agno` command scaffolds AgentOS projects, runs them with Docker Compose, connects your coding agents over MCP, and manages service-account tokens. Every command takes `--json` and emits a single JSON document on stdout, so coding agents and scripts can drive it.

## Install

The CLI ships with the SDK, so installing `agno` 2.7 or later puts the `agno` command on your PATH.

```bash theme={null}
pip install -U agno
```

The CLI is also published standalone as `agnoctl`. It depends on `typer`, `rich`, and `httpx` only, so it runs on machines without the SDK:

```bash theme={null}
uvx agnoctl connect
```

`agno` and `agnoctl` are the same CLI under two names.

## Commands

| Command                                  | What it does                                        | Guide                                         |
| ---------------------------------------- | --------------------------------------------------- | --------------------------------------------- |
| `agno create <name>`                     | Scaffold a project from a starter template          | [Create a project](/agent-os/cli/create)      |
| `agno connect`                           | Connect coding agents to a running AgentOS over MCP | [Connect your clients](/agent-os/cli/connect) |
| `agno disconnect`                        | Remove AgentOS MCP entries from client configs      | [Connect your clients](/agent-os/cli/connect) |
| `agno up` / `down` / `restart`           | Run the project with Docker Compose                 | [Operate your AgentOS](/agent-os/cli/operate) |
| `agno status`                            | Show the discovered AgentOS and connected clients   | [Operate your AgentOS](/agent-os/cli/operate) |
| `agno tokens create` / `list` / `revoke` | Manage service-account tokens                       | [Manage tokens](/agent-os/cli/tokens)         |

## How the CLI Finds Your AgentOS

`connect`, `status`, and `tokens` need a running AgentOS. They resolve its URL in this order:

| Priority | Source                              | Example                                                                |
| -------- | ----------------------------------- | ---------------------------------------------------------------------- |
| 1        | `--url` flag                        | `agno connect --url https://os.example.com`                            |
| 2        | `AGENTOS_URL` environment variable  | `export AGENTOS_URL=https://os.example.com`                            |
| 3        | `AGENTOS_URL` in a project env file | `AGENTOS_URL=https://os.example.com` in `.env.production`, then `.env` |
| 4        | Localhost probe                     | Ports 7777, 7778, 7779, 8000                                           |

The probe covers `AgentOS.serve()`'s default port (7777), common bump-up ports, and a bare uvicorn setup (8000). If your AgentOS runs on any other host or port, point the CLI at it with `--url` or `AGENTOS_URL`.

## Developer Resources

* [agnoctl reference](/reference/cli/agnoctl): full flag tables, environment variables, exit codes, and JSON output schemas
* [Starter templates](/deploy/introduction)
