@yibie: LangChain 开源了 OpenWiki——一个专门给 agent 用的 CLI,自动为你的代码库写文档并持续维护。不是让你手写文档,是让 agent 写、agent 维护、agent 参考。 OpenWiki:LangChain 开…
摘要
LangChain 开源了 OpenWiki,一个专为 AI agent 设计的 CLI 工具,可自动为代码库生成并持续维护文档,支持多种模型和持续集成。
查看缓存全文
缓存时间: 2026/07/02 12:22
LangChain 开源了 OpenWiki——一个专门给 agent 用的 CLI,自动为你的代码库写文档并持续维护。不是让你手写文档,是让 agent 写、agent 维护、agent 参考。
OpenWiki:LangChain 开源的 Agent 自维护文档系统
LangChain 昨天发了个新项目,477 star,MIT 开源。OpenWiki 是一个 CLI,专门为 agent 设计——自动给代码库生成文档并持续更新。
安装: npm install -g openwiki
怎么用: openwiki –init 配置模型和 API key → openwiki 生成文档到 openwiki/ 目录 → 之后自动在 AGENTS.md / CLAUDE.md 里追加提示,让 coding agent 知道参考这个 wiki
关键设计: • 支持 GLM 5.2、Kimi K2.6、Sonnet 5 等,默认预配好的模型列表 • 支持 OpenRouter、Fireworks、Baseten、OpenAI、Anthropic • GitHub Action 集成——每天自动开 PR 更新文档 • 文档目录存在就做增量更新,不存在就从头创建
跟我们今天翻译的主题全部呼应: • Karpathy 的 LLM Knowledge Base(同样的概念,这次做成了自动化工具) • EXM7777 的 Agent OS 原则“keep memory in files“ • 20 个 Loop 模式里的 Memory Update Loop
这个工具把“让 AI 记住你的代码库“这件事从概念推进到了 npm install 一步。LangChain 说它 built specifically for agents——不是为人类写的 wiki。477 star 说明这件事正好是痛点。
原文:https://github.com/langchain-ai/openwiki…
#OpenWiki #LangChain #Agent文档
langchain-ai/openwiki
Source: https://github.com/langchain-ai/openwiki
OpenWiki
OpenWiki is a CLI that writes and maintains documentation for your codebase, built specifically for agents.

Install
npm install -g openwiki
Quick Start
Initialize OpenWiki, configure your model and API key, then generate documentation
openwiki --init
Then to ensure your documentation stays up-to-date, add the GitHub action to your repository to automatically open a PR once a day with documentation updates: openwiki-update.yml
Copy the contents of that file into .github/workflows/openwiki-update.yml in your repository.
Usage
Start the interactive CLI:
openwiki
Start OpenWiki with an initial request:
openwiki "Please generate documentation for this repository"
Run a single command and exit:
openwiki -p "Summarize what you can do"
Initialize OpenWiki:
openwiki --init
Update existing documentation:
openwiki --update
Show help:
openwiki --help
openwiki creates initial documentation in openwiki/ when no wiki exists. If openwiki/ already exists, it refreshes that documentation from repository changes. By default, the CLI stays open after each run so you can send follow-up messages. Use -p or --print for a one-shot non-interactive run that prints the final assistant output.
openwiki will automatically append prompting to your AGENTS.md and/or CLAUDE.md files to instruct your coding agent to reference it when searching for context. If the file does not already exist in your repository, OpenWiki will create it for you.
On the first interactive run, OpenWiki will have you configure your inference provider, API key, and LLM. You will also be able to set a LangSmith API key to trace your OpenWiki runs to a LangSmith tracing project named “openwiki” (optional).
These configuration options and secrets will be saved to ~/.openwiki/.env on your local machine.
Customizing
OpenWiki supports OpenRouter, Fireworks, Baseten, OpenAI and Anthropic out of the box. By default, there are a few models pre-defined (GLM 5.2, Kimi K2.6, Sonnet 5, etc) but for each inference provider, OpenWiki will allow you to specify your own custom model ID.
If there’s an inference provider or model you’d like to see added, please open a PR!
相似文章
OpenWiki:CLI工具,用于为你的代码库编写和维护代理文档
OpenWiki是LangChain的一个CLI工具,可自动生成和维护代码库的文档,专为AI代理设计。它支持多个推理提供商,并可与GitHub Actions集成以实现每日更新。
@LangChain:OpenWiki 的代码初始化提示词刚刚获得重大升级!现在它能生成更高质量的 wiki,覆盖更多你的代码…
OpenWiki 是一个 CLI 工具,用于生成和维护代码库的自更新 wiki。它的代码初始化提示词刚刚迎来重大升级,可生成更高质量的 wiki,覆盖更多代码库内容,并带来更好的评估分数和更高效的运行。该工具支持多种模型提供商、连接器以及交互式可视化器。
@LangChain:OpenWiki支持所有最常见的LLM提供商。立即尝试我们支持的众多提供商之一:https://github.c…
OpenWiki是LangChain的一款CLI工具,用于编写和维护代码库或个人知识的代理维基,支持所有常见的LLM提供商。
@LangChain:OpenWiki 0.4.0 新版发布:编程代理集成。更多来自 @colifran_
OpenWiki 0.4.0 添加了与 Claude、Codex 和 OpenCode 的编程代理集成,简化了开发者的设置过程。
@LangChain: 在17分钟里,@BraceSproul 全面介绍关于 OpenWiki 的所有你需要知道的内容,这是一个开源的自维护维基系统……
BraceSproul 的一段17分钟视频讲解了 OpenWiki,一个开源的自维护维基,涵盖了它的核心理念、功能,以及为什么为 AI 代理构建的文档与人类文档截然不同。