Configs2026年7月7日·1 分钟阅读

OpenWiki — AI-Maintained Documentation CLI by LangChain

A command-line tool by LangChain that uses AI agents to automatically write and maintain documentation for your codebase.

Agent 就绪

这个资产会安全暂存

这个资产会先安全暂存。复制的指令会要求 Agent 读取暂存文件,并在激活脚本、MCP 配置或全局配置前先确认。

Stage only · 29/100策略:需暂存
Agent 入口
任意 MCP/CLI Agent
类型
CLI Tool
安装
Single
信任
信任等级:Established
入口
OpenWiki Overview
安全暂存命令
npx -y tokrepo@latest install 804ba131-79bd-11f1-9bc6-00163e2b0d79 --target codex

先暂存文件;激活前需要读取暂存 README 和安装计划。

Introduction

OpenWiki is an open-source CLI tool from LangChain that automates the creation and maintenance of codebase documentation. It analyzes your source code, generates structured documentation in Markdown, and keeps it in sync as code evolves — replacing the manual burden of writing and updating docs with an AI-driven workflow.

What OpenWiki Does

  • Scans your codebase to understand module boundaries, public APIs, and architectural patterns
  • Generates structured Markdown documentation covering modules, functions, and data flows
  • Detects code changes and incrementally updates affected documentation sections
  • Produces a navigable wiki structure suitable for GitHub wikis, MkDocs, or static site generators
  • Integrates with AI coding agents as a skill for documentation-on-demand workflows

Architecture Overview

OpenWiki is a TypeScript CLI that combines static analysis with LLM-powered content generation. It first builds a code graph by parsing source files using language-aware parsers, identifying exports, dependencies, and call relationships. This graph is then fed to an LLM as structured context, which generates documentation for each module. Incremental updates diff the current code graph against the last documented state and re-generate only changed sections.

Self-Hosting & Configuration

  • Install globally via npm or use npx for one-off runs
  • Configure documentation scope, output directory, and language in openwiki.config.json
  • Set your preferred LLM provider and API key as environment variables
  • Customize output templates for different documentation styles
  • Run in CI to automatically update docs on every push

Key Features

  • Incremental documentation updates that re-generate only what changed
  • Language-aware parsing for TypeScript, Python, Go, Rust, and more
  • Structured output compatible with GitHub wikis, MkDocs, and Docusaurus
  • Agent skill mode for on-demand documentation within coding sessions
  • Configurable depth and detail level per module or directory

Comparison with Similar Tools

  • TypeDoc / JSDoc — generate API docs from code comments; OpenWiki writes prose documentation from code structure
  • Mintlify — AI-powered docs platform (SaaS); OpenWiki is a local CLI with no vendor dependency
  • DeepWiki — turns repos into wikis; OpenWiki focuses on incremental maintenance rather than one-shot generation
  • Docusaurus — a static documentation framework; OpenWiki generates the content, Docusaurus renders it

FAQ

Q: Does OpenWiki require an LLM API key? A: Yes. It uses an LLM to generate documentation content. You configure your preferred provider (OpenAI, Anthropic, etc.) via environment variables.

Q: Can it document private/internal code? A: Yes. All analysis runs locally. Only the code context sent to the LLM leaves your machine, and you control what gets included.

Q: How does incremental update work? A: OpenWiki tracks a hash of each documented code unit. On update, it re-parses the codebase, identifies changed units, and regenerates only their documentation.

Q: Which languages are supported? A: TypeScript, JavaScript, Python, Go, Rust, and Java have first-class parser support. Other languages get basic file-level documentation.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产