# CLI Overview

> Quick reference for the 10xgraph CLI from the 10xgraph-api package: init, dev, build, worker, scheduler, test, eval, config and audit, and what each does.

Source: https://10xgraph.com/docs/server/cli
Last updated: 2026-11-25

The `10xgraph` command (package `10xgraph-api`) scaffolds, runs, tests, evaluates and packages a 10xGraph project.

## Install the CLI

```bash
pip install 10xgraph-api
```

Verify the installation:

```bash
10xgraph --help
```

The CLI requires Python 3.12+. It depends on the core framework (`10xgraph`), which is installed automatically.

## What each command does

| Command | Purpose |
| --- | --- |
| [`10xgraph init`](/docs/server/project-setup) | Scaffold a new agent project interactively |
| [`10xgraph dev`](/docs/server/run-the-server) | Start the development server with reload and open the [playground](/docs/server/playground) (`--no-open` to skip) |
| [`10xgraph build`](/docs/server/deploy) | Generate Docker files, with worker and scheduler services for background jobs |
| [`10xgraph worker`](/docs/server/background-tasks) | Run background tasks |
| [`10xgraph scheduler`](/docs/server/background-tasks) | Send scheduled tasks |
| [`10xgraph skills`](/docs/integrations/coding-assistants) | Install coding-agent skills (Claude, Codex, GitHub) |
| [`10xgraph test`](/docs/testing/run-tests) | Run the project test suite (pytest wrapper) |
| [`10xgraph eval`](/docs/testing/run-evals) | Run agent evaluations and generate reports |
| `10xgraph audit` | Verify environment and project compatibility |
| `10xgraph config` | Edit `10xgraph.json` in a browser UI |
| `10xgraph demo` | Preview CLI animations |
| `10xgraph version` | Show CLI and core framework versions |

Each command accepts `--help` to show its full options. Detailed flags and parameters are documented in the [CLI commands reference](/docs/reference/api-cli/commands).

## Development workflow

### Create a new project

Start with `10xgraph init` to scaffold your agent project. It asks for the setup (Quick or Full), the agent name and the AI provider; Full also asks for storage, auth, a background worker and extras. See [Initialize a project](/docs/server/project-setup).

If any file init would write already exists, it asks before overwriting (default No) and writes nothing on No. Without a terminal (`--yes`, `--non-interactive`, CI) it stops before writing and lists the files; pass `--force` to overwrite them. `--dry-run` marks the files that already exist.

```bash
10xgraph init
```

The scaffold generates a `10xgraph.json` configuration file, graph code, and optional evals and tests. Every question has a matching flag, and flags such as `--auth`, `--cache-store`, `--rate-limit` and `--token-revocation` override parts of the Full setup, so the same scaffold can be reproduced in CI or by coding agents without interaction:

```bash
10xgraph init --name MyAgent --mode full --provider google --auth jwt --storage postgres --yes --non-interactive
```

`--mode quick|full` picks the setup. `--template quick-start|production` still works as an alias of `--mode`.

### Run locally during development

`10xgraph dev` is the usual choice while building your agent. It starts the server on `127.0.0.1:8000`, enables auto-reload on file changes, and opens the hosted playground in your browser once the API responds.

```bash
10xgraph dev
```

Change any of these with flags:

```bash
10xgraph dev --no-open --port 9000 --no-reload
```

`10xgraph dev` is the only server command. It reloads on file changes by default and opens the playground unless you pass `--no-open`. Production runs Gunicorn in the image that `10xgraph build` generates (one Uvicorn process with `--k8s`).

### Test and evaluate

After building a graph, run your test suite with `10xgraph test`. It wraps pytest and reads optional defaults from `10xgraph.json`:

```bash
10xgraph test                          # Run all tests
10xgraph test --coverage               # Report code coverage
10xgraph test -k "test_routing"        # Run tests matching a pattern
```

Evaluate your agent's behavior with `10xgraph eval`. The command discovers eval files, runs all cases, and writes JSON and HTML reports to `eval_reports/`, then opens the HTML report in your browser:

```bash
10xgraph eval                          # Run all evals
10xgraph eval --parallel               # Run cases concurrently
10xgraph eval --threshold 0.9         # Fail if pass rate below 90%
```

Pass `--no-open` to skip the browser (it is also skipped with `--no-report`, `-q`, `--format json`, `--non-interactive`, when `CI` is set, or when stdout is not a terminal). The playground can still open the JSON report: Evals > Open report file.

See [Run tests](/docs/testing/run-tests) and [Run evaluations](/docs/testing/run-evals) for detailed guides.

## Deployment and operations

### Containerize for production

`10xgraph build` generates a Dockerfile that runs your agent on Gunicorn with Uvicorn workers (`WEB_CONCURRENCY` sets the worker count). Optionally generate docker-compose.yml for local multi-service deployments or k8s.yaml for Kubernetes:

```bash
10xgraph build                         # Generate Dockerfile
10xgraph build --docker-compose        # Also generate docker-compose.yml
10xgraph build --k8s                   # Also generate k8s.yaml (Deployment + Service)
10xgraph build --worker --scheduler    # Also run the background worker and scheduler
10xgraph build --python-version 3.12   # Specify Python version (default: 3.13)
```

See [Deployment guide](/docs/server/deploy) for more.

### Configure the server

`10xgraph config` opens a browser-based editor for `10xgraph.json`. It validates every field using the same parser the server uses, preserves unknown keys, and keeps secrets in your `.env` file:

```bash
10xgraph config                        # Edit ./10xgraph.json (created on first save)
10xgraph config --port 8765 --no-open  # Use a custom port, don't open browser
```

See the [command reference](/docs/reference/api-cli/commands#config).

The editor is loopback-only for security. See [Configure the server](/docs/server/configure) for the full configuration schema.

### Verify the environment

Before deploying, use `10xgraph audit` to run a read-only check: the Python interpreter, installed packages, evaluation API compatibility, `10xgraph.json` syntax and agent key, remote-tool definitions, and whether port 8000 is free. The check exits with code 1 on failure (helping with CI gates) and 0 on warnings only:

```bash
10xgraph audit                         # Run all checks
10xgraph audit --config production.json
10xgraph --format json audit           # Machine-readable output for CI
```

## Additional commands

### Install coding-agent skills

`10xgraph skills` installs bundled skills for Codex, Claude Code, and GitHub. Install skills interactively or by agent name:

```bash
10xgraph skills                        # Interactive menu
10xgraph skills --agent claude         # Install Claude skill
10xgraph skills --all                  # Install for all agents
10xgraph skills --validate ./skills    # Check skills against the spec
```

See [Integrate with coding assistants](/docs/integrations/coding-assistants).

### Show version information

`10xgraph version` prints the CLI and core framework versions. Both are resolved from installed package metadata (not from files):

```bash
10xgraph version
```

Output example:

```
10xgraph-api
  Version: 1.0.0
10xgraph (core)
  Version: 1.0.0
```

### Preview animations

`10xgraph demo` previews CLI animations without changing your project:

```bash
10xgraph demo --style eval
```

Styles: `typing`, `network`, `init`, `build`, `eval`, or `all` (default).

## Global options

Root flags apply to every command and go before the command name:

```bash
10xgraph --format json audit           # Output as JSON
10xgraph --no-color dev                # Disable color
10xgraph --cwd ../other-agent eval     # Run in a different directory
10xgraph --yes init --non-interactive   # Accept defaults, fail instead of prompting
```

Every global flag, with defaults, is listed in [Global options](/docs/reference/api-cli/commands#global-options).

Flags specific to a command (like `--coverage` for `test`) are documented in that command's help:

```bash
10xgraph eval --help
```
