OpenWiki: CLI that writes and maintains agent documentation for your codebase
Summary
OpenWiki is a CLI tool from LangChain that automatically generates and maintains documentation for your codebase, designed for AI agents. It supports multiple inference providers and can be integrated with GitHub Actions for daily updates.
View Cached Full Text
Cached at: 07/01/26, 11:03 PM
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!
Similar Articles
@yibie: LangChain open-sourced OpenWiki—a CLI built for agents that automatically writes and maintains docs for your codebase. Not for you to write docs by hand, but for agents to write, maintain, and reference. OpenWiki: LangChain open…
LangChain has open-sourced OpenWiki, a CLI tool designed for AI agents that automatically generates and continuously maintains documentation for codebases, supporting multiple models and continuous integration.
@BraceSproul: https://x.com/BraceSproul/status/2072375136368660515
OpenWiki is an open source agent and CLI that automatically generates and maintains documentation for codebases, helping coding agents understand repo structure and logic.
@BraceSproul: https://x.com/BraceSproul/status/2075276912134631484
OpenWiki 0.1.0 introduces OpenWiki Brains, a tool that creates and maintains a local wiki from sources like Gmail, Notion, git repos, and web search, giving AI agents proactive, durable memory without manual updates.
@nickgomez: Introducing @OpenKnowledge, the best markdown IDE for humans and agents. Open source. Local and private. LLM-wiki ready…
Introducing OpenKnowledge, an open-source, local and private markdown IDE for humans and AI agents, compatible with Claude, Codex, and other agents.
@tom_doerr: Generates documentation and architectural diagrams for codebases https://github.com/FSoft-AI4Code/CodeWiki…
CodeWiki is an open-source tool that uses AI to generate holistic documentation and architectural diagrams for large-scale codebases, supporting multiple LLM providers and subscription modes.