Title: CLI commands · Codemany docs
URL: https://codemany.com/docs/reference/cli
Description: Every codemany command, from codemany --help: setup and the service, status, doctor and capacity, drain and resume, isolation, integrations, machines and pairing, licenses, the vault, analytics and more.
All pages as Markdown: https://codemany.com/llms.txt

---

[Reference](https://codemany.com/docs#reference)

# CLI commands

`codemany` is the daemon and its command line. On a Mac it is bundled in Codemany.app; on Linux it is the package itself. `codemany help` prints this list.

## Set up and run

```
codemany setup --target owner/repo|org:name [--size N [--overcommit]] [--labels a,b]
               [--listen addr | --localhost-only] [--config path] [--token-from-gh | --token-stdin] [--force]
               [--isolation host|user|vm [--vm-image path]]
```

Writes the config: what to serve, how many runners (`--size` defaults to what the machine supports), extra labels, where the dashboard listens, and the GitHub token. `--isolation` defaults to `host`; omitted on a re-run, the current mode is kept.

| Command | What it does |
| --- | --- |
| `codemany serve [--config path] [--log-files] [--setup-listen addr]` | Runs the daemon. Without a config it serves first-run setup |
| `codemany setup-link [--port N]` | Prints the first-run setup link |
| `codemany install-service [--config path] [--setup-listen addr]` | Installs and starts the service (standalone binary only; Codemany.app manages its own) |
| `codemany uninstall-service` | Stops and removes the service |
| `sudo codemany system-setup [--user name] [--user-isolation [--slots N]] [--uninstall]` | Linux: the keep-awake permission (the .deb and install.sh run it) and, with `--user-isolation`, the helper for isolation `user` |
| `codemany version` | Prints the version |

## Check

| Command | What it does |
| --- | --- |
| `codemany status [--url http://127.0.0.1:8825]` | The runners and their state |
| `codemany doctor [--json] [--config path]` | Health checks, and the tools runner jobs get on this machine with their labels |
| `codemany capacity [--json]` | How many runners this machine supports, and what limits it |

## Control

| Command | What it does |
| --- | --- |
| `codemany drain [--wait] [--timeout 30m] [--url …] [--config path]` | Stops taking new jobs; `--wait` waits for running ones to finish |
| `codemany resume [--url …] [--config path]` | Takes jobs again |
| `codemany admin-token [--rotate] [--config path]` | The token for drain, resume and recycle from a browser or the LAN |

`drain` and `resume` send the local admin token; set `$CODEMANY_ADMIN_TOKEN` to control another machine. Restart without cutting a job short: `codemany drain --wait && systemctl --user restart codemany && codemany resume`.

## Runners

| Command | What it does |
| --- | --- |
| `codemany isolation [status\|host\|user\|vm\|vm-image\|remove-users] [--json] [--vm-image path] [--config path]` | Runner isolation: `host` (default), `user` or `vm`. See [Isolation](https://codemany.com/docs/runners/isolation) |
| `codemany integrations list\|install <id>\|update <id>\|start <id>\|prewarm\|cancel <id>` | Docker, Homebrew packages and the tool cache. See [Tools and caching](https://codemany.com/docs/runners/tools) |

## Fleet and license

| Command | What it does |
| --- | --- |
| `codemany machines [list \| add ADDRESS CODE \| rename ID NAME \| remove ID]` | This machine's fleet. See [The fleet](https://codemany.com/docs/machines) |
| `codemany pair` | Prints the one-time code another Codemany needs to add this machine |
| `codemany license activate --owner ID [--token-stdin]` | Takes a seat of an owner's subscription, without a screen |

## Privacy and secrets

| Command | What it does |
| --- | --- |
| `codemany analytics [status\|on\|off] [--json] [--config path]` | Anonymous usage stats, on by default. [Privacy](https://codemany.com/privacy) lists what is sent |
| `codemany featured [status\|on\|off] [--json] [--config path]` | Show your GitHub account and organisations on codemany.com (off by default) |
| `codemany vault [status\|keyring\|file]` | Linux: keep secrets in the 0600 file (the default) or the desktop keyring, locked until you log in |

[Previous Security model](https://codemany.com/docs/security)[Next FAQ](https://codemany.com/docs/reference/faq)
