# Dirac

> A long-running coding agent for VS Code, the terminal and ACP editors

- Category: AI Coding / Autonomous Coding Agents
- Language: TypeScript
- Licence: Apache-2.0
- Repository: https://github.com/dirac-run/dirac
- Website: https://dirac.run/
- Canonical page: https://ai-tldr.dev/tools/dirac/
- Updated: 2026-04-28

## In short

Dirac is an open-source coding agent built for long-running software-engineering work rather than one-shot edits. It sits in the Autonomous Coding Agents category of the AI Coding tools and is open-source, written in TypeScript and licensed Apache-2.0. To get started: install the CLI.

## Overview

Dirac is an open-source coding agent built for long-running software-engineering work rather than one-shot edits. It runs in VS Code and Open VSX editors, from a terminal CLI, or as an external agent inside any client that speaks the Agent Client Protocol (ACP), including JetBrains IDEs and Zed. Provider configuration is stored by Dirac itself, so the same credentials and model choices follow you between those interfaces.

The project's focus is efficiency: instead of brittle search-and-replace blocks, Dirac edits files through a stable line-anchor protocol so a model can name an exact source range and replace only that range even after nearby lines shift. It also reads and rewrites code structurally through syntax trees — `inspect_ast` can return an outline of many files or one exact implementation, and `edit_ast` can replace a single function or rename indexed references across a directory — which keeps whole files out of the context window.

Dirac is a fork of Cline released under the Apache License 2.0, built by Dirac Delta Labs. It supports dozens of providers and hundreds of models through API keys, subscription-backed accounts, cloud platforms such as AWS Bedrock and Vertex AI, and any OpenAI-compatible endpoint, so the model and the credentials are yours to choose.

## What it does

- Goal mode: give Dirac an objective with `/goal` and it creates and coordinates its own tasks toward it, pausing when it needs your input
- Hash-anchored file editing — a stable line-anchor protocol that replaces an exact source range instead of matching text, reducing edit payloads and retries
- AST inspection and manipulation: outline files or fetch one implementation, replace a function by symbol, or rename indexed references in a single call
- A separate cheaper Utility model handles context compaction, task handoffs, commit messages and first-pass permission decisions
- Self-extension with `/new-tool <description>`: Dirac writes, compiles, validates and smoke-tests a typed tool you can use in the same conversation
- Continuous steering — send a message mid-task and it is delivered with the next tool response instead of cancelling the run

## Getting started

Dirac ships as a VS Code / Open VSX extension and as an npm-installed CLI. The CLI requires Node.js 22.13 through 24.x; Node.js 25 is not supported.

1. Install the CLI

   Install the package globally, then authenticate against the provider you want to use.

```bash
npm install -g dirac-cli
dirac auth
```

2. Run your first task

   Pass a prompt directly, or start the interactive composer with no arguments.

```bash
dirac "Analyze the architecture of this project"
```

3. Other ways to start a run

   Plan mode drafts an approach first, --yolo runs unattended with plain output, and you can pipe context straight in.

```bash
dirac --plan "Design this feature"
dirac --yolo "Fix the tests"
git diff | dirac "Review this"
dirac history
```

4. Use it in an editor instead

   Install Dirac from the Visual Studio Marketplace or Open VSX and open its sidebar, or add it from your editor's ACP Registry (JetBrains 2025.3+ under Settings → Tools → AI Assistant → Agents, or Zed under Agent Settings → External Agents). You can also run `dirac --acp` manually.

## When to use it

- Hand an agent a multi-hour refactor and let Goal mode keep working while you check in, steer or pause it
- Make precise structural changes — rename a symbol across an indexed codebase, or replace one function — without the agent reading whole files
- Work from whichever surface you are already in: VS Code, a terminal, or a JetBrains/Zed session over ACP, with one provider configuration
- Cut token spend on routine agent overhead by routing compaction, handoffs and permission checks to a cheaper Utility model

## Version history

- 2026-04-28: AI/TLDR covered Dirac's arrival as an open-source coding agent: an Apache-2.0 fork of Cline that runs in VS Code, a terminal CLI and ACP-compatible editors, with hash-anchored editing, AST inspection and a walk-away Goal mode.
