内容
<p align="center">
<a href="https://atlas.aziro.com/">
<img src="assets/og.png" alt="Atlas — 最准确的代码答案,以最少的代币" width="820">
</a>
</p>
<h1 align="center">Atlas</h1>
<p align="center">
<strong>停止将代码库粘贴到上下文窗口。</strong><br>
Atlas 为您和您的 AI 编码代理提供精确的、按 <code>文件:行</code> 引用的答案,关于您的代码 — 谁调用什么,什么会因更改而中断,哪些路由依赖于处理程序 — 只需花费很少的代币。
</p>
<p align="center">
<a href="https://github.com/aziron-ai/atlas/releases"><img src="https://img.shields.io/github/v/release/aziron-ai/atlas?label=release&color=2ea043" alt="最新版本"></a>
<a href="LICENSE"><img src="https://img.shields.io/badge/license-Apache--2.0-blue" alt="许可证"></a>
<img src="https://img.shields.io/badge/platform-macOS%20%7C%20Linux%20%7C%20Windows-lightgrey" alt="平台">
<img src="https://img.shields.io/badge/languages-40-8957e5" alt="语言">
<a href="https://atlas.aziro.com/#benchmarks"><img src="https://img.shields.io/badge/benchmarks-open%20%26%20reproducible-2ea043" alt="基准测试"></a>
</p>
<p align="center">
<a href="https://atlas.aziro.com/#docs/getting-started">文档</a> ·
<a href="https://atlas.aziro.com/#docs/installation">安装</a> ·
<a href="https://github.com/aziron-ai/atlas/releases">版本</a> ·
<a href="https://atlas.aziro.com/#benchmarks">基准测试</a> ·
<a href="https://github.com/aziron-ai/atlas/wiki">维基</a>
</p>
<p align="center">
<img src="assets/demo.gif" width="760"
alt="Atlas 索引 sirupsen/logrus 并回答 '谁调用 WithField',带有文件:行引用,毫秒级">
</p>
<p align="center">
⭐ <strong>如果 Atlas 为您节省代理代币(或您的耐心),一颗星星可以帮助其他人找到它。</strong>
</p>
---
## 为什么选择 Atlas
编码代理通过昂贵的方式回答代码问题:grep,然后将整个文件读入上下文窗口,然后进行猜测。它会消耗代币,稀释模型的注意力,但仍然会错过它从未打开的文件中的调用者。
Atlas 对您的仓库进行一次索引,并直接回答结构化问题 — 定义、调用者、引用、路由和变更影响 — 返回一个小且**引用**的代码片段,而不是整个文件。每个答案都指向 `文件:行`,因此您可以(或代理)验证证据。
它在**本地**运行,**确定**(循环中没有 LLM,因此工具本身消耗零代币),并通过 MCP 连接到 Claude、Codex、Cursor、Gemini 和 Copilot。
## 数据
在公共基准测试上测量 — 222 个单元格,666 个真实的 LLM 评分模型调用,跨 37 种语言。完整的方法论和原始工件已[发布并可复制](https://atlas.aziro.com/#benchmarks)。
| 方法 | 答案准确率(F1) | 查询代币/查询 |
| --- | --- | --- |
| 读取整个文件 *(准确率上限)* | 1.00 | 157 |
| 图形工具 | 0.54 | 97 |
| **Atlas** | **0.76** — **28 种语言上的 1.00** | **21** |
<p align="center">
<strong>+40%</strong> 答案准确率 ·
<strong>36×</strong> 更少的查询代币 ·
<strong>17×</strong> 更快的查询 ·
<strong>2.3×</strong> 更快的冷索引
</p>
在其 28 种支持的语言中,Atlas 匹配*原始文件准确率上限*(F1 1.00),同时使用 **~6× 更少的代币** — 并在具有数万调用者的符号上以 **~7 毫秒中位数** 回答 `谁调用 X`。
### 为什么不直接读取文件?
询问 **"谁调用 `WithField`?"** 关于 [sirupsen/logrus](https://github.com/sirupsen/logrus),针对 `gopls` 调用层次结构作为真实性标准:
| 方法 | 代币进入模型 | 准确率(F1) |
| --- | ---: | ---: |
| 转储原始文件 | 2,227 | 0.02 |
| 图形工具 | 98 | 0.08 |
| **Atlas** | **169** | **0.98** |
生产函数具有跨多个文件的调用者;原始转储会让模型淹没在噪音中,并且仍然会错过调用者。Atlas 返回完整的、精确的调用者集作为结构化、引用的上下文 — **~13× 更少的代币和更准确**。
并且它在真正的代理循环中会产生影响。在同一个仓库中,19 个问题,Claude:
| 模式 | 总代币 | 回合 | 答案 F1 | 墙时间 |
| --- | ---: | ---: | ---: | ---: |
| grep-and-read 基线 | 144,385 | 4.9 | 0.57 | 19.9 秒 |
| **使用 Atlas** | **61,561** | **2.0** | **0.88** | **8.3 秒** |
## 快速入门
使用 Homebrew 安装:
```sh
brew install --cask aziron-ai/atlas/atlas
```
... 或 npm 包装器:
```sh
npm install -g @aziron/atlas
```
索引一个仓库并将 Atlas 连接到您的编码助手:
```sh
cd /path/to/repository
atlas index .
atlas bootstrap --dry-run # 预览助手配置更改
atlas bootstrap # 注册 MCP 集成
atlas status
```
就这样。Atlas 现在可以回答问题,例如:
```sh
atlas search "checkout flow" --format plain # 它在哪里实现?
atlas symbol CreateOrder # 定义 + 调用者 + 被调用者
atlas callers CreateOrder --limit 25 # 谁调用它?
atlas impact --paths services/cart.go # 如果更改会发生什么?
```
相同的答案可通过 Atlas 的 MCP 工具提供给您的编码助手,并带有每个结果的 `文件:行` 引用。
参阅 [快速入门](https://atlas.aziro.com/#docs/getting-started) 以获取引导式首次索引和首次查询。
## Atlas 提供什么
| 任务 | 功能 |
| --- | --- |
| 查找相关代码 | 代码感知搜索和限定上下文 |
| 了解符号 | 定义、调用者、被调用者和引用 |
| 审查更改 | 仓库和跨仓库影响分析 |
| 跟踪服务依赖关系 | 路由、消费者和依赖关系 |
| 支持编码代理 | 带有源和行引用的 MCP 工具 |
| 操作本地索引 | CLI 状态、仪表板和 HTTP API |
Atlas 默认在本地运行,并将其索引存储在仓库工作区中。不需要服务器来支持本地索引、CLI 查询或 stdio MCP 使用。
## 接口
- `atlas` 命令行界面
- **Claude、Codex、Cursor、Gemini 和 GitHub Copilot** 的 MCP 集成
- 本地仪表板和 HTTP API
- 发布存档和原生 Linux 软件包
集成行为因客户端而异 — 遵循[AI 助手设置](https://atlas.aziro.com/#docs/assistants)以获取支持的配置。
## 安装矩阵
| 渠道 | 平台 |
| --- | --- |
| Homebrew cask | macOS 和 Linux,amd64 和 arm64 |
| npm `@aziron/atlas` | macOS/Linux x64 和 arm64;Windows x64 |
| 发布存档 | macOS/Linux amd64 和 arm64;Windows amd64 |
| Linux 软件包 | `.deb`、`.rpm` 和 `.apk`,适用于 amd64 和 arm64 |
Homebrew 和 npm 安装运行 `atlas bootstrap` 以注册支持的本地助手集成。先使用 `atlas bootstrap --dry-run` 预览,或在自动化中跳过:
```sh
ATLAS_SKIP_BOOTSTRAP=1 npm install -g @aziron/atlas
```
校验和和每个存档的 SBOM 均附在每个 [GitHub 版本](https://github.com/aziron-ai/atlas/releases) 中。
## 文档
- [快速入门](https://atlas.aziro.com/#docs/getting-started)
- [安装](https://atlas.aziro.com/#docs/installation)
- [索引和重新索引](https://atlas.aziro.com/#docs/indexing)
- [CLI 参考](https://atlas.aziro.com/#docs/cli)
- [AI 助手设置](https://atlas.aziro.com/#docs/assistants)
- [MCP 工具](https://atlas.aziro.com/#docs/mcp)
- [仪表板和 HTTP API](https://atlas.aziro.com/#docs/service)
- [配置](https://atlas.aziro.com/#docs/configuration)
- [隐私和数据处理](https://atlas.aziro.com/#docs/privacy)
- [支持的语言](https://atlas.aziro.com/#docs/languages)
- [基准测试和方法论](https://atlas.aziro.com/#docs/benchmarks)
- [故障排除](https://atlas.aziro.com/#docs/troubleshooting)
完整指南也镜像在 [GitHub Wiki](https://github.com/aziron-ai/atlas/wiki) 中。
## 基准测试和数据
[基准测试浏览器](https://atlas.aziro.com/#benchmarks) 展示了具有局限性和证据级别的已发布准确率、代币使用和延迟测量。底层数据可下载:
- [处理后的站点数据](data/site-data.json)
- [原始基准测试工件](data/raw/)
- [代理基准测试复制指南](agent-bench/README.md)
结果描述了已发布的测试条件,不保证每个仓库、语言、机器或编码助手。
## 数据处理
索引和查询默认在本地运行。MCP 客户端或编码助手可能会将其接收到的代码片段发送到其配置的模型提供商,但受该客户端的数据策略约束。网络监听器和可选的连接功能需要额外的配置。请在启用网络访问或组织连接功能之前查看 [隐私和数据处理](https://atlas.aziro.com/#docs/privacy)。
## 星历史
<a href="https://www.star-history.com/#aziron-ai/atlas&Date">
<img src="https://api.star-history.com/svg?repos=aziron-ai/atlas&type=Date" alt="Atlas 星历史" width="640">
</a>
## 仓库范围
此公共仓库分发 Atlas 发布二进制文件、消费者文档、基准测试网站和可下载的基准测试工件。Atlas CLI 源代码树未在此处发布。
## 许可证
Atlas 在 [Apache License 2.0](LICENSE) 下分发。