[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-75011":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":23,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":26,"readmeContent":27,"aiSummary":28,"trendingCount":16,"starSnapshotCount":16,"syncStatus":29,"lastSyncTime":30,"discoverSource":31},75011,"dirac","dirac-run\u002Fdirac","dirac-run","Coding Agent singularly focused efficiency and context curation. Reduces API costs by 50-80% vs other agent AND improves the code quality at the same time. Uses Hash Anchored edits, massively parallel operations, AST manipulation and many many other optimizations.  https:\u002F\u002Fdirac.run\u002F","",null,"TypeScript",1290,71,3,26,0,9,23,122,27,93.07,"Apache License 2.0",false,"master",[],"2026-06-12 04:01:16","# Dirac - Accurate & Highly Token Efficient Open Source AI Agent\n\n> **Dirac topped the [Terminal-Bench-2 leaderboard](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fharborframework\u002Fterminal-bench-2-leaderboard\u002Fdiscussions\u002F145) for `gemini-3-flash-preview` with a 65.2% score!**\n\n\nIt is a well studied phenomenon that any given model's reasoning ability degrades with the context length. If we can keep context tightly curated, we improve both accuracy and cost while making larger changes tractable in a single task. \n\nDirac is an open-source coding agent built with this in mind. It reduces API costs by **64.8%** on average while producing better and faster work. Using hash-anchored parallel edits, AST manipulation, and a suite of advanced optimizations. Oh, and no MCP.\n\nOur goal: Optimize for bang-for-the-buck on tooling with bare minimum prompting instead of going blindly minimalistic.\n\n## 📊 Evals\n\nDirac is benchmarked against other leading open-source agents on complex, real-world refactoring tasks. Dirac consistently achieves 100% accuracy at a fraction of the cost. These evals are run on public github repos and should be reproducible by anyone. \n\n> 🏆 **TerminalBench 2.0 Leaderboard**: Dirac recently topped the [Terminal-Bench-2 leaderboard](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fharborframework\u002Fterminal-bench-2-leaderboard\u002Fdiscussions\u002F145) with a **65.2%** score using `gemini-3-flash-preview`. This outperforms both Google's official baseline (**47.6%**) and the top closed-source agent Junie CLI (**64.3%**). This was achieved without any benchmark-specific info or any `AGENTS.md` files being inserted.\n\n\n> **Note on the cost table below**: A bug was discovered in Cline, the parent repo, after running these evals ([issue #10314](https:\u002F\u002Fgithub.com\u002Fcline\u002Fcline\u002Fissues\u002F10314)). We have submitted a [PR #10315](https:\u002F\u002Fgithub.com\u002Fcline\u002Fcline\u002Fpull\u002F10315) to fix this. This bug caused the evals for Dirac and Cline to slightly underreport the numbers ($0.03 vs $0.05 per million token cache read). Although there won't be a large difference, we will update the evals soon.\n\nAll tasks for all models used `gemini-3-flash-preview` with thinking set to `high`\n\n| Task (Repo) | Files* | Cline | Kilo | Ohmypi | Opencode | Pimono | Roo | **Dirac** |\n| :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |\n| Task1 ([transformers](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftransformers)) | 8 | 🟢 [(diff)](evals\u002Fcline\u002Fcline_refactor_DynamicCache) [$0.37] | 🔴 [(diff)](evals\u002Fkilo\u002Fkilo_code_refactor_DynamicCache_FAILURE) [N\u002FA] | 🟡 [(diff)](evals\u002Fohmypi\u002Fohmypi_refactor_DynamicCache) [$0.24] | 🟢 [(diff)](evals\u002Fopencode\u002Fopencode_refactor_DynamicCache) [$0.20] | 🟢 [(diff)](evals\u002Fpimono\u002Fpimono_refactor_DynamicCache) [$0.34] | 🟢 [(diff)](evals\u002Froo\u002Froo_code_refactor_DynamicCache) [$0.49] | **🟢 [(diff)](evals\u002Fdirac\u002Fdirac_refactor_DynamicCache) [$0.13]** |\n| Task2 ([vscode](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fvscode)) | 21 | 🟢 [(diff)](evals\u002Fcline\u002Fcline_refactor_IOverlayWidget) [$0.67] | 🟡 [(diff)](evals\u002Fkilo\u002Fkilo_code_refactor_IOverlayWidget) [$0.78] | 🟢 [(diff)](evals\u002Fohmypi\u002Fohmypi_refactor_IOverlayWidget) [$0.63] | 🟢 [(diff)](evals\u002Fopencode\u002Fopencode_refactor_IOverlayWidget) [$0.40] | 🟢 [(diff)](evals\u002Fpimono\u002Fpimono_refactor_IOverlayWidget) [$0.48] | 🟡 [(diff)](evals\u002Froo\u002Froo_code_refactor_IOverlayWidget) [$0.58] | **🟢 [(diff)](evals\u002Fdirac\u002Fdirac_refactor_IOverlayWidget) [$0.23]** |\n| Task3 ([vscode](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fvscode)) | 12 | 🟡 [(diff)](evals\u002Fcline\u002Fcline_refactor_addLogging) [$0.42] | 🟢 [(diff)](evals\u002Fkilo\u002Fkilo_code_refactor_addLogging) [$0.70] | 🟢 [(diff)](evals\u002Fohmypi\u002Fohmypi_refactor_addLogging) [$0.64] | 🟢 [(diff)](evals\u002Fopencode\u002Fopencode_refactor_addLogging) [$0.32] | 🟢 [(diff)](evals\u002Fpimono\u002Fpimono_refactor_addLogging) [$0.25] | 🟡 [(diff)](evals\u002Froo\u002Froo_code_refactor_addLogging) [$0.45] | **🟢 [(diff)](evals\u002Fdirac\u002Fdirac_refactor_addLogging) [$0.16]** |\n| Task4 ([django](https:\u002F\u002Fgithub.com\u002Fdjango\u002Fdjango)) | 14 | 🟢 [(diff)](evals\u002Fcline\u002Fcline_refactor_datadict) [$0.36] | 🟢 [(diff)](evals\u002Fkilo\u002Fkilo_code_refactor_datadict) [$0.42] | 🟡 [(diff)](evals\u002Fohmypi\u002Fohmypi_refactor_datadict) [$0.32] | 🟢 [(diff)](evals\u002Fopencode\u002Fopencode_refactor_datadict) [$0.24] | 🟡 [(diff)](evals\u002Fpimono\u002Fpimono_refactor_datadict) [$0.24] | 🟢 [(diff)](evals\u002Froo\u002Froo_code_refactor_datadict) [$0.17] | **🟢 [(diff)](evals\u002Fdirac\u002Fdirac_refactor_datadict) [$0.08]** |\n| Task5 ([vscode](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fvscode)) | 3 | 🔴 [(diff)](evals\u002Fcline\u002Fcline_refactor_extensionswb_service_FAILURE) [N\u002FA] | 🟢 [(diff)](evals\u002Fkilo\u002Fkilo_code_refactor_extensionswb_service) [$0.71] | 🟢 [(diff)](evals\u002Fohmypi\u002Fohmypi_refactor_extensionswb_service) [$0.43] | 🟢 [(diff)](evals\u002Fopencode\u002Fopencode_refactor_extensionswb_service) [$0.53] | 🟢 [(diff)](evals\u002Fpimono\u002Fpimono_refactor_extensionswb_service) [$0.50] | 🟢 [(diff)](evals\u002Froo\u002Froo_code_refactor_extensionswb_service) [$0.36] | **🟢 [(diff)](evals\u002Fdirac\u002Fdirac_refactor_extensionswb_service) [$0.17]** |\n| Task6 ([transformers](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftransformers)) | 25 | 🟢 [(diff)](evals\u002Fcline\u002Fcline_refactor_latency) [$0.87] | 🟡  [(diff)](evals\u002Fkilo\u002Fkilo_code_refactor_latency_WRONG) [$1.51] | 🟢 [(diff)](evals\u002Fohmypi\u002Fohmypi_refactor_latency) [$0.94] | 🟢 [(diff)](evals\u002Fopencode\u002Fopencode_refactor_latency) [$0.90] | 🟢 [(diff)](evals\u002Fpimono\u002Fpimono_refactor_latency) [$0.52] | 🟢 [(diff)](evals\u002Froo\u002Froo_code_refactor_latency) [$1.44] | **🟢 [(diff)](evals\u002Fdirac\u002Fdirac_refactor_latency) [$0.34]** |\n| Task7 ([vscode](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fvscode)) | 13 | 🟡 [(diff)](evals\u002Fcline\u002Fcline_refactor_sendRequest_2missing) [$0.51] | 🟢 [(diff)](evals\u002Fkilo\u002Fkilo_code_refactor_sendRequest) [$0.77] | 🟢 [(diff)](evals\u002Fohmypi\u002Fohmypi_refactor_sendRequest) [$0.74] | 🟢 [(diff)](evals\u002Fopencode\u002Fopencode_refactor_sendRequest) [$0.67] | 🟡 [(diff)](evals\u002Fpimono\u002Fpimono_refactor_sendRequest) [$0.45] | 🟢 [(diff)](evals\u002Froo\u002Froo_code_refactor_sendRequest) [$1.05] | **🟢 [(diff)](evals\u002Fdirac\u002Fdirac_refactor_sendRequest) [$0.25]** |\n| Task8 ([transformers](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftransformers)) | 3 | 🟢 [(diff)](evals\u002Fcline\u002Fcline_refactor_stoppingcriteria) [$0.25] | 🟢 [(diff)](evals\u002Fkilo\u002Fkilo_code_refactor_stoppingcriteria) [$0.19] | 🟢 [(diff)](evals\u002Fohmypi\u002Fohmypi_code_refactor_stoppingcriteria) [$0.17] | 🟢 [(diff)](evals\u002Fopencode\u002Fopencode_refactor_stoppingcriteria) [$0.26] | 🟢 [(diff)](evals\u002Fpimono\u002Fpimono_code_refactor_stoppingcriteria) [$0.23] | 🟢 [(diff)](evals\u002Froo\u002Froo_code_refactor_stoppingcriteria) [$0.29] | **🟢 [(diff)](evals\u002Fdirac\u002Fdirac_refactor_stoppingcriteria) [$0.12]** |\n| **Total Correct** | | 5\u002F8 | 5\u002F8 | 6\u002F8 | 8\u002F8 | 6\u002F8 | 6\u002F8 | **8\u002F8** |\n| **Avg Cost** | | $0.49 | $0.73 | $0.51 | $0.44 | $0.38 | $0.60 | **$0.18** |\n\n> 🟢 Success \\| 🟡 Incomplete \\| 🔴 Failure\n\n> **Cost Comparison**: Dirac is **64.8% cheaper** than the competition (a **2.8x** cost reduction).\n>\n> \\* Expected number of files to be modified\u002Fcreated to complete the task.\n>\n> See [evals\u002FREADME.md](evals\u002FREADME.md) for detailed task descriptions and methodology.\n\n\n## 🚀 Key Features\n\n- **Hash-Anchored Edits**: Dirac uses stable line hashes to target edits with extreme precision, avoiding the \"lost in translation\" issues of traditional line-number based editing.\n  ![Hash-Anchored Edits](https:\u002F\u002Fwww.dirac.run\u002Fstatic\u002Fimages\u002Fmultiple_edit.png)\n- **AST-Native Precision**: Built-in understanding of language syntax (TypeScript, Python, C++, etc.) allows Dirac to perform structural manipulations like function extraction or class refactoring with 100% accuracy.\n  ![AST-Native Precision](https:\u002F\u002Fwww.dirac.run\u002Fstatic\u002Fimages\u002Fparallel_AST_edit.png)\n- **Multi-File Batching**: Dirac can process and edit multiple files in a single LLM roundtrip, significantly reducing latency and API costs.\n  ![Multi-File Batching](https:\u002F\u002Fwww.dirac.run\u002Fstatic\u002Fimages\u002Fmulti_function_read.png)\n- **High-Bandwidth Context**: Optimized context curation keeps the agent lean and fast, ensuring the LLM always has the most relevant information without wasting tokens.\n- **Autonomous Tool Use**: Dirac can read\u002Fwrite files, execute terminal commands, use a headless browser, and more - all while keeping you in control with an approval-based workflow.\n- **Skills & AGENTS.md**: Customize Dirac's behavior with project-specific instructions using `AGENTS.md` files. It also seamlessly picks up Claude's skills by automatically reading from `.ai`, `.claude`, and `.agents` directories.\n- **Native Tool Calling Only**: To ensure maximum reliability and performance, Dirac exclusively supports models with native tool calling enabled. (Note: MCP is not supported).\n\n## 📦 Installation\n\n### VS Code Extension\nInstall Dirac from the [VS Code Marketplace](https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=dirac-run.dirac).\n\n### CLI (Terminal)\nInstall the Dirac CLI globally using npm:\n```bash\nnpm install -g dirac-cli\n```\n\n> **Note**: Node.js v25 is currently not supported due to an upstream V8 Turboshaft compiler bug that causes out-of-memory crashes during WASM initialization. Please use Node.js v20, v22, or v24 (LTS versions).\n\n## 🚀 CLI Quick Start \n\n1. **Authenticate**:\n   ```bash\n   dirac auth\n   ```\n2. **Run your first task**:\n   ```bash\n   dirac \"Analyze the architecture of this project\"\n   ```\n\n### Configuration (Environment Variables)\nYou can provide API keys via environment variables to skip the `dirac auth` step. This is ideal for CI\u002FCD or non-persistent environments.\n\nFor provider-specific setup (e.g. [AWS Bedrock](docs\u002Fproviders\u002FREADME.md#aws-bedrock), [Google Cloud Vertex AI](docs\u002Fproviders\u002FREADME.md#google-cloud-vertex-ai)), see the [Provider Settings](docs\u002Fproviders\u002FREADME.md) guide.\n\nCommon API Keys:\n\n- `ANTHROPIC_API_KEY`\n- `OPENAI_API_KEY`\n- `OPENROUTER_API_KEY`\n- `GEMINI_API_KEY`\n- `GROQ_API_KEY`\n- `MISTRAL_API_KEY`\n- `XAI_API_KEY` (x.ai)\n- `HF_TOKEN` (HuggingFace)\n- ... and others (see `src\u002Fshared\u002Fstorage\u002Fenv-config.ts` for the full list).\n\n#### Using Any OpenAI compatible endpoint\n\nYou can use any OpenAI-compatible provider (e.g., DeepSeek, DeepInfra, OpenRouter, or your own local proxy) by providing the base URL and model ID.\n\n**Environment Variables:**\n- `OPENAI_API_BASE`: Your API base URL (e.g., `https:\u002F\u002Fapi.deepseek.com\u002Fv1`).\n- `OPENAI_API_KEY` (or `OPENAI_COMPATIBLE_CUSTOM_KEY`): Your API key.\n- `CUSTOM_HEADERS`: Optional custom headers (e.g., `\"Authorization=Bearer token,X-Account-Id=123\"` or JSON format).\n\n**CLI Example:**\n```bash\n# Using environment variables\nexport OPENAI_API_BASE=\"https:\u002F\u002Fapi.yourprovider.com\u002Fv1\"\nexport OPENAI_API_KEY=\"your-api-key\"\nexport CUSTOM_HEADERS=\"Authorization=Bearer XXX\"\n\ndirac \"explain Dirac Delta function\" \\\n  # --provider is now optional if OPENAI_API_BASE is set\n  --model \"your-model-id\"\n```\n\n**CLI Flag Example:**\n```bash\ndirac \"explain Dirac Delta function\" \\\n  --provider \"https:\u002F\u002Fapi.deepseek.com\u002Fv1\" \\\n  --model \"deepseek-v4-pro\" \\\n  --headers \"X-Custom-Header=Value\"\n```\n\n\n### Common Commands\n- `dirac \"prompt\"`: Start an interactive task.\n- `dirac -p \"prompt\"`: Run in **Plan Mode** to see the strategy before executing.\n- `dirac -y \"prompt\"`: **Yolo Mode** (auto-approve all actions, great for simple fixes).\n- `git diff | dirac \"Review these changes\"`: Pipe context directly into Dirac.\n- `dirac history`: View and resume previous tasks.\n\n\n## 🛠️ Getting Started\n\n1. Open the Dirac sidebar in VS Code.\n2. Configure your preferred AI provider (Anthropic, OpenAI, OpenRouter, etc.).\n3. Start a new task by describing what you want to build or fix.\n4. Watch Dirac go!\n\n\n## 📈 Star History\n\n\u003Ca href=\"https:\u002F\u002Fstar-history.com\u002F#dirac-run\u002Fdirac&Date\">\n  \u003Cpicture>\n    \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"https:\u002F\u002Fapi.star-history.com\u002Fsvg?repos=dirac-run\u002Fdirac&type=Date&theme=dark\" \u002F>\n    \u003Csource media=\"(prefers-color-scheme: light)\" srcset=\"https:\u002F\u002Fapi.star-history.com\u002Fsvg?repos=dirac-run\u002Fdirac&type=Date\" \u002F>\n    \u003Cimg alt=\"Star History Chart\" src=\"https:\u002F\u002Fapi.star-history.com\u002Fsvg?repos=dirac-run\u002Fdirac&type=Date\" \u002F>\n  \u003C\u002Fpicture>\n\u003C\u002Fa>\n\n\n## 📄 License\n\nDirac is **open source** and licensed under the [Apache License 2.0](LICENSE).\n\n## 🤝 Acknowledgments\n\nDirac is a fork of the excellent [Cline](https:\u002F\u002Fgithub.com\u002Fcline\u002Fcline) project. We are grateful to the Cline team and contributors for their foundational work.\n\n---\n\nBuilt with ❤️ by [Max Trivedi](https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Fmax-trivedi-49993aab\u002F) at [Dirac Delta Labs](https:\u002F\u002Fdirac.run)\n","Dirac是一个专注于提高编码效率和上下文管理的开源AI代理。它通过哈希锚定编辑、大规模并行操作、抽象语法树（AST）操纵等技术，平均降低64.8%的API成本，同时提升代码质量和处理速度。Dirac适用于需要高效重构和优化代码的场景，尤其在大型项目中表现优异。该项目使用TypeScript编写，已在多个公开GitHub仓库上进行了基准测试，并在Terminal-Bench-2排行榜上以65.2%的成绩领先其他开源代理，证明了其在复杂任务中的准确性和经济性。",2,"2026-06-11 03:51:57","high_star"]