# Editor integration

The Axle extension for VS Code and compatible editors, and the plugin for JetBrains IDEs.

The Axle extension shows every task in your repository, runs them, says which would come from the cache and draws the task graph. It asks the `axle` binary for all of it, so the editor and the terminal always agree.

Install **Axle** from the VS Code Marketplace, or from Open VSX in Cursor, VSCodium and Windsurf. For JetBrains IDEs, see [below](#jetbrains-ides).

## The Axle sidebar

The Axle icon in the activity bar opens a list of every package and project, and under each its tasks: the scripts in its `package.json` and the commands in its `axle.toml`. Each task's icon says what a run would do now:

- a check mark: it would come from the cache;
- a circle: it would run, because something changed since it last ran or it never has;
- a clock: it waits for its dependencies to run before Axle can tell;
- a slashed circle: caching is off for it;
- a server: it keeps running, like a development server.

Beside each task are the time it took and when it last ran, such as `cached · 3.1s, 2 h ago`. Hovering over it shows its [description](https://axlers.dev/docs/reference/configuration.md#tasks), its command and what a run would do. Click a task to open where it is defined, or its run button to run it. Right-click it to run it without its dependencies, draw its graph, or ask [`axle why miss`](https://axlers.dev/docs/reference/cache.md#why-a-task-ran) why it missed the cache. The settings button beside a package shows [`axle show`](https://axlers.dev/docs/reference/show.md) for it.

The list updates as you save: the extension starts [`axle daemon`](https://axlers.dev/docs/reference/daemon.md), which watches the repository and says when files change, so a task you just changed shows a circle again. It also refreshes after every run.

## Running tasks

**Run with Axle** appears above each script in a package's `package.json`, with when it last ran beside it. Runs are VS Code tasks of `axle run <task> --summarize`, each in a terminal named after the task, so Axle looks and behaves exactly as when you type the command: its [terminal UI](https://axlers.dev/docs/reference/run.md#terminal-ui) for several tasks, colours, typing into interactive tasks, and Ctrl+C to stop.

Axle's tasks are also in **Tasks: Run Task**, and you can keep one in `.vscode/tasks.json`:

```json
{
    "version": "2.0.0",
    "tasks": [{ "type": "axle", "task": "web#build", "group": "build" }]
}
```

Add `"only": true` to run it without its dependencies.

The status bar shows how the last run went, such as `12 tasks, 9 cached, saved 41s`, or the task that failed. Clicking it opens that run's report. It updates after any run with `--summarize`, including one you type in a terminal yourself.

## Editing axle.toml

The extension starts [`axle lsp`](https://axlers.dev/docs/reference/lsp.md), Axle's language server, for every `axle.toml`. As you type, it underlines the mistakes `axle run` would stop at, each linking to its message page. It completes keys and their values, and task names such as `^build` or `web#build` in `dependsOn`. Hovering over a key says what it does, and hovering over a task name says what it runs and gives its description. **Go to Definition** on a task name opens its script in `package.json`.

## Commands

| Command                   | What it does                                                                                                                                                                            |
| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Axle: Show Task Graph** | Asks for task names and draws their [graph](https://axlers.dev/docs/reference/graph.md): each task in the column after what it waits for. Click a task to open where it is defined; its run button runs it. |
| **Axle: Generate…**       | Opens a form for any [generator](https://axlers.dev/docs/reference/generate.md): pick one, fill in its values, with their choices, defaults and checks, preview every file as a diff, then generate.        |
| **Axle: Show Settings**   | Shows the settings of the package of the file you're in, as `axle show` prints them.                                                                                                    |
| **Axle: Set Up Axle**     | Runs [`axle init`](https://axlers.dev/docs/reference/init.md), then installs the dependency it added.                                                                                                       |
| **Axle: Refresh**         | Asks Axle about the repository again.                                                                                                                                                   |
| **Axle: Show Version**    | Shows the extension's version.                                                                                                                                                          |

## Setting up

In a repository with a `package.json` but no Axle, the sidebar offers **Set Up Axle**. It runs `axle init` through your package manager's one-off runner, such as `pnpm dlx`, and then installs the dependencies, so one click is enough.

## JetBrains IDEs

The Axle plugin, from the JetBrains Marketplace under **Settings | Plugins**, brings the same to IntelliJ IDEA, WebStorm and the other JetBrains IDEs, from version 2026.3:

- The **Axle tool window** lists every package and its tasks with the same icons, timings and tooltips as the sidebar above, updated as you save through `axle daemon`. Double-click a task to open where it is defined. Its toolbar and right-click menu run a task, run it without its dependencies, explain a cache miss, show a package's settings and draw the graph.
- A **gutter icon** beside each script in `package.json` runs it with Axle, and its tooltip says when it last ran.
- **Runs** appear in the Run tool window, through an **Axle** run configuration of `axle run <task> --summarize`. Save one from the run's menu to keep it, or create one under **Run | Edit Configurations**, with a task name and whether to run it without its dependencies.
- **Show Task Graph** draws the graph in a tab of the tool window. Click a task to open where it is defined; its run button runs it.
- **Generate…**, in the tool window and the **Tools | Axle** menu, opens the same form as a dialog.
- **`axle.toml`** gets errors, completion, hover and go to definition from `axle lsp`, through the IDE's own support for language servers.
- In a repository without Axle, a notification offers **Set Up Axle**.

The plugin's settings are under **Settings | Tools | Axle**.

## Which Axle it uses

The extension and the plugin use, in order:

1. the `axle.path` setting in VS Code, or the binary under **Settings | Tools | Axle** in a JetBrains IDE, absolute or relative to the repository;
2. the `AXLE_BINARY` environment variable;
3. the Axle the repository installs with the `@axle-rs/axle` package;
4. `axle` on the `PATH`.

So they run the same version as the repository's scripts and CI. When Axle reports an error, the editor shows its message with a link to its message page. If the extension or plugin is older than the Axle it runs, it says to update it.

In a workspace with several folders, the extension reads the first one.
