OpenWiki:用于编写和维护代码库智能体文档的命令行工具
OpenWiki: CLI that writes and maintains agent documentation for your codebase

原始链接: https://github.com/langchain-ai/openwiki

OpenWiki 是一款命令行工具,旨在为 AI 智能体自动化创建和维护代码库文档。 **主要功能:** * **自动更新:** 使用提供的 GitHub Action,每天自动提交包含文档更新的 PR。 * **智能体集成:** OpenWiki 会自动更新 `AGENTS.md` 或 `CLAUDE.md`,确保您的编码智能体始终引用最新的代码库上下文。 * **灵活的交互界面:** 支持用于追问的交互模式,以及用于快速任务的一次性模式(`-p`)。 * **简单的配置:** 通过 CLI 即可轻松初始化,设置推理提供商(如 OpenAI、Anthropic、OpenRouter)及 API 密钥,并将其存储在本地。此外,还支持可选的 LangSmith 追踪功能。 * **智能同步:** 在 `openwiki/` 目录中初始化文档,并根据代码库的变化智能更新现有内容。 OpenWiki 具有良好的扩展性,允许用户指定自定义模型 ID 或请求对新推理提供商的支持。它是保持文档与代码同步更新并发挥实际作用的理想解决方案。

抱歉。
相关文章

原文

OpenWiki is a CLI that writes and maintains documentation for your codebase, built specifically for agents.

OpenWiki

Initialize OpenWiki, configure your model and API key, then generate documentation

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.

Start the interactive CLI:

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:

Update existing documentation:

Show 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.

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!

联系我们 contact @ memedata.com