langchain-ai/openwiki
OpenWiki is a CLI that writes and maintains agent documentation for your codebase.
OpenWiki – Self‑hosted, agent‑driven documentation for codebases
What it is – OpenWiki is a Node‑based tool that lets large‑language‑model coding agents (e.g., Claude Code, Codex, Cursor, GitHub Copilot, IBM Bob, etc.) automatically generate and keep up‑to‑date a linked Markdown wiki inside a repository. The wiki is stored as plain files you own, and the agent can query it with lightweight, model‑free tools (openwiki_search, openwiki_read).
Key capabilities
- Agent integration – One‑click installers for many popular coding agents. The agent uses its own authenticated model session, so you don’t configure a separate provider.
- Grounded pages – Each wiki page is tied to source evidence (code, tests, docs). Claims are versioned; when the repo changes OpenWiki only rewrites pages whose evidence drifted.
- Parallel page workers – The CLI can document several pages concurrently (configurable via
OPENWIKI_PAGE_CONCURRENCY), automatically handling provider rate limits. - Workspaces – Group related repositories with
openwiki link; agents can search across the whole service and read sections from any member wiki. - Visual explorer –
openwiki visualizeruns a local server that shows the wiki as an interactive node graph beside a live Markdown viewer. It can also export a static visualizer for hosting on GitHub Pages. - Scheduled CI updates – Ready‑made GitHub Actions, GitLab CI, and Bitbucket Pipelines snippets open a PR whenever the wiki diverges from the code.
- Personal mode – Apart from repository docs, you can build a personal knowledge wiki (
openwiki personal) that aggregates any connected sources.
Installation
# Requires Node 22.22+
npm install -g openwiki # global install (or via Pi: pi install npm:openwiki)
Then install the integration for your coding agent, e.g.:
openwiki integrations install codex # or claude, cursor, bob, kiro, omp, antigravity, copilot
Typical workflow
- Initialize – Inside a repository, ask the agent “Initialize this repository’s OpenWiki…”. The agent writes a linked wiki under
openwiki/. - Query – In later sessions, ask the agent to
openwiki_searchfor a topic andopenwiki_readthe relevant sections. - Update – After code changes, ask “Update this repository’s OpenWiki…”. OpenWiki inspects the diff, validates existing claims, and rewrites only what’s needed.
- Explore – Run
openwiki visualizeto browse the graph or export a static visualizer. - Automate – Add the provided CI workflow (
openwiki-update.yml) to keep the wiki in sync automatically.
Configuration
- Concurrency:
OPENWIKI_PAGE_CONCURRENCY=4 - State directory: defaults to
~/.openwiki; override withOPENWIKI_CONFIG_DIR. - Provider selection: the CLI prompts for a model provider on first run; fourteen providers are supported.
Why it matters – Documentation stays close to the code, is continuously refreshed by the same LLM that writes it, and remains fully editable Markdown. Agents can retrieve accurate, grounded context without extra API calls, improving code‑understanding, debugging, and onboarding.
Quick start
npm install -g openwiki
openwiki integrations install codex # pick your agent
# Inside a repo, in the agent chat:
Initialize this repository's OpenWiki from the current source and tests.
Now you have a searchable, visualizable wiki that stays yours.
Related
- Project
- Project
- Project
- Project
- Project