plandex-ai--plandex
241 行
10 KiB
Markdown
241 行
10 KiB
Markdown
<!-- WEHUB_ZH_README -->
|
||
> [!NOTE]
|
||
> 本文档由 WeHub 基于上游 README 翻译整理,属于社区翻译,非官方中文文档。
|
||
> [English](./README.en.md) · [原始项目](https://github.com/plandex-ai/plandex) · [上游 README](https://github.com/plandex-ai/plandex/blob/HEAD/README.md)
|
||
> 原作者、版权与许可证归属以原始项目及本仓库 LICENSE 文件为准。
|
||
|
||
<h1 align="center">
|
||
<a href="https://plandex.ai">
|
||
<picture>
|
||
<source media="(prefers-color-scheme: dark)" srcset="images/plandex-logo-dark-v2.png"/>
|
||
<source media="(prefers-color-scheme: light)" srcset="images/plandex-logo-light-v2.png"/>
|
||
<img width="400" src="images/plandex-logo-dark-bg-v2.png"/>
|
||
</a>
|
||
<br />
|
||
</h1>
|
||
<br />
|
||
|
||
<div align="center">
|
||
|
||
<p align="center">
|
||
<!-- Call to Action Links -->
|
||
<a href="#install">
|
||
<b>30 秒安装</b>
|
||
</a>
|
||
·
|
||
<a href="https://plandex.ai">
|
||
<b>官网</b>
|
||
</a>
|
||
·
|
||
<a href="https://docs.plandex.ai/">
|
||
<b>文档</b>
|
||
</a>
|
||
·
|
||
<a href="#examples-">
|
||
<b>示例</b>
|
||
</a>
|
||
·
|
||
<a href="https://docs.plandex.ai/hosting/self-hosting/local-mode-quickstart">
|
||
<b>本地自托管模式</b>
|
||
</a>
|
||
</p>
|
||
|
||
<br>
|
||
|
||
[](https://discord.gg/plandex-ai)
|
||
[](https://github.com/plandex-ai/plandex)
|
||
[](https://twitter.com/PlandexAI)
|
||
|
||
</div>
|
||
|
||
<p align="center">
|
||
<!-- Badges -->
|
||
<a href="https://github.com/plandex-ai/plandex/pulls"><img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs Welcome" /></a> <a href="https://github.com/plandex-ai/plandex/releases?q=cli"><img src="https://img.shields.io/github/v/release/plandex-ai/plandex?filter=cli*" alt="Release" /></a>
|
||
<a href="https://github.com/plandex-ai/plandex/releases?q=server"><img src="https://img.shields.io/github/v/release/plandex-ai/plandex?filter=server*" alt="Release" /></a>
|
||
|
||
<!-- <a href="https://github.com/your_username/your_project/issues">
|
||
<img src="https://img.shields.io/github/issues-closed/your_username/your_project.svg" alt="Issues Closed" />
|
||
</a> -->
|
||
|
||
</p>
|
||
|
||
<br />
|
||
|
||
<div align="center">
|
||
<a href="https://trendshift.io/repositories/8994" target="_blank"><img src="https://trendshift.io/api/badge/repositories/8994" alt="plandex-ai%2Fplandex | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
|
||
</div>
|
||
|
||
<br>
|
||
|
||
<h1 align="center" >
|
||
专为大型任务和真实世界项目设计的 AI 编程代理(agent)。<br/><br/>
|
||
</h1>
|
||
|
||
<!-- <h2 align="center">
|
||
Designed for large tasks and real world projects.<br/><br/>
|
||
</h2> -->
|
||
<br/>
|
||
|
||
<div align="center">
|
||
<a href="https://www.youtube.com/watch?v=SFSu2vNmlLk">
|
||
<img src="images/plandex-v2-yt.png" alt="Plandex v2 演示视频" width="800">
|
||
</a>
|
||
</div>
|
||
|
||
<br/>
|
||
|
||
💻 Plandex 是一款基于终端的 AI 开发工具,能够**规划并执行**跨越多个步骤、涉及数十个文件的大型编码任务。它可直接处理多达 200 万 token 的上下文(每个文件约 10 万),并可通过 tree-sitter 项目地图(project map)为包含 2000 万 token 或更多的目录建立索引。
|
||
|
||
🔬 **累积 diff 审查沙箱(sandbox)** 会将 AI 生成的变更与项目文件隔离,直到你确认可以合并。命令执行受到管控,便于你轻松回滚和调试。Plandex 帮助你充分发挥 AI 的潜力,同时避免在项目里留下一团糟。
|
||
|
||
🧠 **组合多家顶尖模型**:来自 Anthropic、OpenAI、Google 以及开源提供商的模型,通过稳健的终端工作流构建完整功能与应用。
|
||
|
||
🚀 Plandex 具备<strong>完全自主</strong>能力——可加载相关文件、规划并实现变更、执行命令并自动调试——同时也高度灵活、可配置,在需要时让开发者获得细粒度控制和逐步审查流程。
|
||
|
||
💪 Plandex 针对<strong>大型项目与大型文件</strong>做了韧性设计。若你发现其他工具在项目超过一定规模或变更过于复杂时就力不从心,不妨试试 Plandex。
|
||
|
||
## 适用于大型项目的智能上下文管理
|
||
|
||
- 🐘 **200 万 token 有效上下文窗口**:使用默认模型包(model pack)时,Plandex 每步仅加载所需内容。
|
||
|
||
- 🗄️ **在大型项目与大型文件中依然可靠。** 轻松生成、审查、修订并应用跨越数十个文件的变更。
|
||
|
||
- 🗺️ **快速生成项目地图**并通过 tree-sitter 进行语法校验。支持 30+ 种语言。
|
||
|
||
- 💰 **上下文缓存(context caching)** 全面用于 OpenAI、Anthropic 和 Google 模型,降低成本与延迟。
|
||
|
||
## 严密掌控或完全自主——由你决定
|
||
|
||
- 🚦 **可配置自主性:** 根据任务在全自动模式与细粒度控制之间切换。
|
||
|
||
- 🐞 **终端命令自动调试**(如构建、linter、测试、部署和脚本)。若已安装 Chrome,还可自动调试浏览器应用。
|
||
|
||
## 助你产出可上线成果的工具
|
||
|
||
- 💬 **项目感知聊天模式**,在动手实现前帮你完善想法;也适合提问和了解代码库。
|
||
|
||
- 🧠 **轻松试用并组合多家提供商的模型**。精选模型包在能力、成本与速度之间提供不同权衡,另有开源及厂商专属包。
|
||
|
||
- 🛡️ **可靠的文件编辑**,优先保证正确性。多数编辑快速且低成本,必要时 Plandex 会校验语法与逻辑,并在出问题时提供多层回退。
|
||
|
||
- 🔀 **完善的版本控制**,覆盖计划的每次更新,包括用于探索多条路径或对比不同模型的分支。
|
||
|
||
- 📂 **Git 集成**,支持生成提交信息及可选的自动提交。
|
||
|
||
## 开发者友好,安装简单
|
||
|
||
- 🧑💻 **REPL 模式**,为命令与文件加载提供模糊自动补全。在任何项目中运行 `plandex` 即可开始。
|
||
|
||
- 🛠️ **CLI 界面**,便于脚本化或将数据管道输入上下文。
|
||
|
||
- 📦 **一行命令、零依赖 CLI 安装**。Docker 化本地模式便于自托管服务器。另有云托管选项,提升可靠性与便利性。
|
||
|
||
## 工作流 🔄
|
||
|
||
<img src="images/plandex-workflow.png" alt="Plandex 工作流" width="100%"/>
|
||
|
||
## 示例 🎥
|
||
|
||
<br/>
|
||
|
||
<div align="center">
|
||
<a href="https://www.youtube.com/watch?v=g-_76U_nK0Y">
|
||
<img src="images/plandex-browser-debug-yt.png" alt="Plandex 浏览器调试示例" width="800">
|
||
</a>
|
||
</div>
|
||
|
||
<br/>
|
||
|
||
## 安装 📥
|
||
|
||
```bash
|
||
curl -sL https://plandex.ai/install.sh | bash
|
||
```
|
||
|
||
**注意:** Windows 通过 [WSL](https://learn.microsoft.com/en-us/windows/wsl/install). 支持;Plandex 仅在 WSL shell 中能在 Windows 上正常工作。它无法在 Windows CMD 提示符或 PowerShell 中运行。
|
||
|
||
[更多安装选项。](https://docs.plandex.ai/install)
|
||
|
||
## 托管 ⚖️
|
||
|
||
| 选项 | 说明 |
|
||
| -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||
| **Plandex Cloud** | 自 2025 年 10 月 3 日起逐步关停,不再接受新用户。<a href="https://plandex.ai/blog/winding-down">了解更多。</a> |
|
||
| **自托管/本地模式** | • 使用 Docker 在本地运行 Plandex,或部署在你自己的服务器上。<br/>• 使用你自己的 [OpenRouter.ai](https://openrouter.ai) 密钥(或[其他模型提供商](https://docs.plandex.ai/models/model-providers) 账户与 API 密钥)。<br/>• 按照[本地模式快速入门](https://docs.plandex.ai/hosting/self-hosting/local-mode-quickstart) 开始操作。 |
|
||
|
||
## Provider keys 🔑
|
||
|
||
<!-- 若你在上文选择了「自带 API Key」(BYO API Key)方案(无论云端还是自托管),你需要为正在使用的 [模型提供商](https://docs.plandex.ai/models/model-providers) 设置 API 密钥: -->
|
||
|
||
```bash
|
||
export OPENROUTER_API_KEY=... # 若使用 OpenRouter.ai
|
||
```
|
||
|
||
<br/>
|
||
|
||
## Claude Pro/Max subscription 🖇️
|
||
|
||
若你拥有 Claude Pro 或 Max 订阅,Plandex 在调用 Anthropic 模型时可以使用该订阅。首次运行 Plandex 时,系统会询问你是否要连接订阅。
|
||
|
||
<br/>
|
||
|
||
## Get started 🚀
|
||
|
||
首先,在你想要完成任务或与项目交流的 **项目目录(project directory)** 中执行 `cd`。若你正在启动一个新项目,请先用 `mkdir your-project-dir` 创建新目录。
|
||
|
||
```bash
|
||
cd your-project-dir
|
||
```
|
||
|
||
对于新项目,你可能还想初始化一个 git 仓库。Plandex 不要求项目必须位于 git 仓库中,但如果你使用 git,它能很好地与之集成。
|
||
|
||
```bash
|
||
git init
|
||
```
|
||
|
||
现在在你的项目中启动 Plandex REPL:
|
||
|
||
```bash
|
||
plandex
|
||
```
|
||
|
||
或简写为:
|
||
|
||
```bash
|
||
pdx
|
||
```
|
||
|
||
<!-- ☁️ _若你使用的是 Plandex Cloud,此时系统会提示你开始试用。_
|
||
|
||
然后快速浏览一下 REPL 的帮助文本,你就可以开始了。REPL 默认以 _聊天模式(chat mode)_ 启动,适合在着手实现之前先梳理想法。任务明确后,Plandex 会提示你切换到 _tell 模式(tell mode)_,以制定详细计划并开始编写代码。 -->
|
||
|
||
<br/>
|
||
|
||
## Docs 🛠️
|
||
|
||
### [👉 完整文档。](https://docs.plandex.ai/)
|
||
|
||
<br/>
|
||
|
||
## Discussion and discord 💬
|
||
|
||
欢迎随时提供反馈、提问、报告 bug,或只是来聊聊天:
|
||
|
||
- [Discord](https://discord.gg/plandex-ai)
|
||
- [Discussions](https://github.com/plandex-ai/plandex/discussions)
|
||
- [Issues](https://github.com/plandex-ai/plandex/issues)
|
||
|
||
## Follow and subscribe
|
||
|
||
- [Follow @PlandexAI](https://x.com/PlandexAI)
|
||
- [Follow @Danenania](https://x.com/Danenania)(Plandex 的创作者)
|
||
- [Subscribe on YouTube](https://x.com/PlandexAI)
|
||
|
||
<br/>
|
||
|
||
## Contributors 👥
|
||
|
||
⭐️ 欢迎为 Plandex star、fork、探索并贡献代码。还有很多工作要做,也有许多可以改进之处。
|
||
|
||
[这是搭建开发环境的概览。](https://docs.plandex.ai/development)
|