# Options overview

Every axle command and option.

| Command                                                                             | What it does                                                                             |
| ----------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| [`axle create [<folder>]`](https://axlers.dev/docs/reference/create.md)                                 | creates a new monorepo from a template, asking what it should hold                       |
| [`axle init`](https://axlers.dev/docs/reference/init.md)                                                | adds Axle to a repository, or moves it from another build tool                           |
| [`axle list`](https://axlers.dev/docs/reference/list.md)                                                | lists the packages in the repository                                                     |
| [`axle list --json`](https://axlers.dev/docs/reference/list.md#json-output)                             | the same list as JSON, for tools and editors                                             |
| [`axle list --tasks`](https://axlers.dev/docs/reference/list.md#choosing-what-to-list)                  | lists every task and its command                                                         |
| [`axle run <task>`](https://axlers.dev/docs/reference/run.md)                                           | runs scripts in every package that has them                                              |
| [`axle exec <command>`](https://axlers.dev/docs/reference/exec.md)                                      | runs any command in each package's folder                                                |
| [`axle watch <task>`](https://axlers.dev/docs/reference/watch.md)                                       | runs tasks, then runs again what each change affects                                     |
| [`axle graph [<task>]`](https://axlers.dev/docs/reference/graph.md)                                     | shows how packages depend on each other, or the order tasks run in                       |
| [`axle graph --web`](https://axlers.dev/docs/reference/graph.md#in-the-browser)                         | opens the graph as an interactive page in the browser                                    |
| [`axle affected`](https://axlers.dev/docs/reference/affected.md)                                        | lists the packages a change affects                                                      |
| [`axle why affected <package>`](https://axlers.dev/docs/reference/affected.md)                          | explains why a package is affected                                                       |
| [`axle affected --exit-code`](https://axlers.dev/docs/reference/affected.md#deciding-whether-to-deploy) | exits with 1 when a package is affected, so a hosting service can skip a build           |
| [`axle generate [<generator>]`](https://axlers.dev/docs/reference/generate.md)                          | creates a package or files from a generator, or lists the generators                     |
| [`axle generate ci`](https://axlers.dev/docs/reference/generate.md#ci-workflows)                        | writes a CI workflow that runs the tasks each change affects                             |
| [`axle sync`](https://axlers.dev/docs/reference/sync.md)                                                | updates files that follow from the graph, such as TypeScript project references          |
| [`axle boundaries`](https://axlers.dev/docs/reference/boundaries.md)                                    | checks which projects depend on which, and what each file imports                        |
| [`axle release`](https://axlers.dev/docs/reference/release.md)                                          | gives changed packages new versions, changelogs and tags in one commit                   |
| [`axle release add`](https://axlers.dev/docs/reference/release.md#versions-from-change-files)           | writes a change file for the next release                                                |
| [`axle release publish`](https://axlers.dev/docs/reference/release.md#publishing)                       | publishes the released packages and creates their GitHub or GitLab releases              |
| [`axle prune <package>...`](https://axlers.dev/docs/reference/prune.md)                                 | writes a smaller copy of the repository with only those packages, for Docker             |
| [`axle migrate`](https://axlers.dev/docs/reference/migrate.md)                                          | updates `axle.toml`, its presets and plugin settings to this version                     |
| [`axle migrate --upgrade`](https://axlers.dev/docs/reference/migrate.md#upgrading-tools)                | also moves the tools plugins know about to new versions, with the code changes they need |
| [`axle import <repository> <folder>`](https://axlers.dev/docs/reference/import.md)                      | brings another Git repository into a folder, keeping its history                         |
| [`axle show <package>`](https://axlers.dev/docs/reference/show.md)                                      | shows a package's settings and where each came from                                      |
| [`axle why miss <task>`](https://axlers.dev/docs/reference/cache.md#why-a-task-ran)                     | explains why a task ran instead of coming from the cache                                 |
| [`axle cache status`](https://axlers.dev/docs/reference/cache.md#axle-cache-status)                     | shows where the cache is and how big it is                                               |
| [`axle cache clean`](https://axlers.dev/docs/reference/cache.md#axle-cache-clean)                       | removes entries from the local cache, or with `--remote` from the remote cache           |
| [`axle link <url>`](https://axlers.dev/docs/reference/remote-cache.md#connecting-a-repository)          | connects the repository to a remote cache in `axle.toml`                                 |
| [`axle unlink`](https://axlers.dev/docs/reference/remote-cache.md#connecting-a-repository)              | disconnects the repository from its remote cache in `axle.toml`                          |
| [`axle login`](https://axlers.dev/docs/reference/remote-cache.md#logging-in)                            | saves a token for a remote cache server, after checking it                               |
| [`axle logout`](https://axlers.dev/docs/reference/remote-cache.md#logging-in)                           | forgets the token saved for a remote cache server                                        |
| [`axle lsp`](https://axlers.dev/docs/reference/lsp.md)                                                  | the language server for `axle.toml`, which editors start                                 |
| [`axle daemon`](https://axlers.dev/docs/reference/daemon.md)                                            | keeps the repository loaded for an editor, which starts it                               |
| [`axle mcp`](https://axlers.dev/docs/reference/mcp.md)                                                  | the MCP server for AI coding agents, which they start                                    |
| [`axle setup agents`](https://axlers.dev/docs/reference/mcp.md#setting-up-agents)                       | configures AI coding agents to use Axle's MCP server, and tells them how                 |
| [`axle add <plugin>`](https://axlers.dev/docs/reference/plugins.md#adding-a-plugin)                     | adds a plugin to `axle.toml`, downloading it and recording its hash                      |
| [`axle plugins`](https://axlers.dev/docs/reference/plugins.md#finding-plugins)                          | lists the official and community plugins, and the ones in use                            |
| [`axle info`](https://axlers.dev/docs/reference/info.md)                                                | shows Axle's version, the system and the repository's setup, for bug reports             |
| [`axle docs <words>`](https://axlers.dev/docs/reference/docs.md)                                        | finds the pages of the documentation about something, with their Markdown                |
| [`axle completion <shell>`](https://axlers.dev/docs/reference/completion.md)                            | prints the script that completes Axle's commands and options in a shell                  |
| `axle --version`, `axle -V`                                                         | prints the installed Axle version                                                        |
| `axle --help`, `axle -h`                                                            | shows how to use Axle                                                                    |

Settings that come from the environment are listed in [system environment variables](https://axlers.dev/docs/reference/system-environment-variables.md), and what Axle can't find out by itself goes in [axle.toml](https://axlers.dev/docs/reference/configuration.md).

## Exit codes

| Code  | Meaning                                                                                                                                                                                        |
| ----- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `0`   | the command worked                                                                                                                                                                             |
| `1`   | Axle couldn't do it, and printed an error saying what                                                                                                                                          |
| other | `axle run` and `axle exec` exit with the first failing command's exit code, or 130 after Ctrl+C. A failing `before` hook's exit code also ends the run. `axle watch` exits with 0 after Ctrl+C |

Some commands exit with 1 by design, to fail a CI step: [`axle affected --exit-code`](https://axlers.dev/docs/reference/affected.md#deciding-whether-to-deploy) when a package is affected, [`axle boundaries`](https://axlers.dev/docs/reference/boundaries.md) when it finds a problem, and [`axle sync --check`](https://axlers.dev/docs/reference/sync.md) and [`axle migrate --check`](https://axlers.dev/docs/reference/migrate.md) when files are out of date.
