TL;DR
OpenWiki is a new open-source CLI from LangChain that automatically writes and maintains repository documentation specifically for AI coding agents to consume. You install it with npm install -g openwiki, run openwiki --init, and it generates a structured wiki under openwiki/ in your repo, then wires that wiki into your AGENTS.md and CLAUDE.md files so tools like Claude Code, Cursor, and Codex can discover it automatically. 11,436 GitHub stars, launched by the LangChain team two weeks ago, and already one of the top-trending TypeScript repos of the quarter.
The pitch is a direct answer to a problem every coding-agent user has hit by now: agents produce better code when they understand the repo, but nobody writes and maintains that documentation. OpenWiki generates it, then keeps it fresh via a scheduled CI workflow that opens PRs whenever the code drifts.
Key facts:
- 11,436 GitHub stars, created after June 15, 2026, trending in the top 5 TypeScript repos
- Built by LangChain on top of their DeepAgents framework
- Two modes —
codemode (repo wiki underopenwiki/) andpersonalmode (local “brain wiki” under~/.openwiki/wiki/) - Multi-provider — OpenAI, Anthropic, OpenRouter, Nebius Token Factory, Fireworks, Baseten, NVIDIA NIM, AWS Bedrock, plus any OpenAI-compatible endpoint
- ChatGPT-login auth — an
openai-chatgptprovider that uses your ChatGPT Plus/Pro/Team subscription’s included Codex usage instead of metered API billing - Native connectors — Notion (via hosted MCP), Gmail, X/Twitter, Slack, Web Search (Tavily), Hacker News, and local Git repos for the personal wiki mode
- CI-native — first-class GitHub Actions, GitLab CI, and Bitbucket Pipelines workflows that open documentation PRs on a schedule
- LangSmith tracing built in for debugging what the agent actually did
- MIT License
The problem OpenWiki is solving
Every coding-agent user runs into the same wall eventually. You spin up Claude Code or Cursor on a new repo, ask it to change something non-trivial, and it either invents an API that doesn’t exist or breaks a pattern the codebase already uses somewhere else. The agent isn’t stupid — it just has no map. It’s grep-searching a codebase it’s never seen before, one file at a time, hoping the right context makes it into the window.
The community’s fix for the last two years has been a single file at the repo root: AGENTS.md (the OpenAI/OpenCode/Codex convention), CLAUDE.md (Anthropic’s), or .cursorrules (Cursor’s). Those files work fine for a page or two of house rules — “use pnpm, run tests before commits, all API routes go in src/routes/.” They fall apart the moment the repo has 500 files and real architectural context.
LangChain’s launch post frames the fix cleanly:
“Those files are useful, but they’re not the right place to store hundreds of pages of repo documentation. They should point the agent toward the right context, then let the agent retrieve what it needs.”
That’s the DeepWiki / AutoWiki / Karpathy LLM-wiki idea: a structured, multi-page wiki lives next to the code, agent instruction files hold a pointer to it, and the agent retrieves only what it needs per query. OpenWiki’s contribution is turning that from “you should probably do this someday” into a two-command CLI plus a CI workflow.
How OpenWiki works
The design is straightforward:
openwiki --init— walks you through provider setup (OpenAI/Anthropic/OpenRouter/etc.), saves config to~/.openwiki/.env, and generates the initialopenwiki/documentation tree by having a DeepAgents-based agent read your repo.- Instruction-file wiring — on every code-mode run, OpenWiki maintains both an
AGENTS.mdand aCLAUDE.mdat the repo root, injecting a<!-- OPENWIKI:START -->…<!-- OPENWIKI:END -->block that tells your coding agent to reference the wiki. If those files already exist, it only rewrites its own block and leaves everything else untouched. This is the detail that matters — you can already have a hand-tunedAGENTS.mdand OpenWiki won’t clobber it. openwiki --update— reruns the agent, diffs against the last snapshot, and updates only the wiki pages that need to change based on recent code changes.- Scheduled CI — copy one of the shipped workflows (
.github/workflows/openwiki-update.yml, GitLab CI equivalent, or Bitbucket Pipelines) and the update runs on a cron, opening a PR whenever the wiki drifts. openwiki/INSTRUCTIONS.md— a human-authored brief you write once. OpenWiki reads it for scope and priorities but never rewrites it during normal runs. This is where you say “focus on the ingestion pipeline, skip the marketing site.”
The whole thing is built on DeepAgents, LangChain’s long-horizon agent harness — the same one behind their open-source deep-research and deep-coder demos. That’s the interesting bit: OpenWiki is essentially the first real product built on DeepAgents rather than a demo notebook.
Real code — a minimal setup
Install and initialize in a repo:
npm install -g openwiki
cd my-project
openwiki --init
The wizard asks for a model provider and API key. Pick one — for a serious repo, use a strong model like GPT-5.6, Claude Sonnet 5, or Gemini 3.5 Pro. For a scratch project, gpt-5.6-terra (the default cheap model on OpenAI) is fine.
For a one-shot non-interactive run (useful in scripts or CI):
openwiki -p "Please generate documentation for this repository"
To update the wiki after code changes:
openwiki --update
To wire it into GitHub Actions so it self-maintains, copy the shipped workflow:
mkdir -p .github/workflows
curl -o .github/workflows/openwiki-update.yml \
https://raw.githubusercontent.com/langchain-ai/openwiki/main/examples/openwiki-update.yml
That workflow schedules openwiki code --update --print on a cron, then opens a PR with the wiki diff. You do not need to run --init in CI — --update will bootstrap the initial openwiki/ directory if it doesn’t exist, as long as the workflow provides the required provider and model environment variables.
The ChatGPT-subscription auth trick
There’s one option in the provider list that’s worth calling out because it’s genuinely novel: the openai-chatgpt provider.
OPENWIKI_PROVIDER=openai-chatgpt openwiki code --init
That opens https://auth.openai.com in your browser, captures the OAuth callback, and stores an access token, refresh token, and account/plan metadata in ~/.openwiki/.env. From then on, OpenWiki calls OpenAI’s Codex backend using your ChatGPT Plus/Pro/Team subscription’s included Codex usage — not per-token API billing.
Practically that means if you already pay $20/mo for ChatGPT Plus, you can point OpenWiki at it and pay $0 in additional token costs, subject to your plan’s Codex quota. The token refresh is automatic. This is the same pattern Codex CLI uses, and it’s now spreading — Claude Code and Cursor both have subscription-auth modes too. If you’re running OpenWiki on 10 repos, this is a meaningful difference between “trivial cost” and “surprise $80/mo bill.”
Personal mode — the sleeper feature
Everything above is code mode. There’s a second mode — personal — that flew under the radar in the launch but is arguably more interesting:
openwiki personal --init
That builds a local “personal brain wiki” under ~/.openwiki/wiki/ fed from configured connectors:
- git-repo — reads configured local repository paths
- notion — targets Notion’s hosted MCP server via OAuth (no pasting tokens)
- google — Gmail via OAuth, with room to add Drive/Calendar later
- x — home timeline, user posts, mentions, bookmarks, list posts via OAuth 2.0 with PKCE
- slack — via ngrok for OAuth callback
- web-search — Tavily via LangChain (requires
TAVILY_API_KEY) - hackernews — public HN feed and search APIs, no credentials
You can configure the same connector multiple times (e.g. one Web Search source for AI research, another for NBA news; they’re stored as web-search-1 and web-search-2). Then:
openwiki ingest all # run every configured source
openwiki ingest web-search # run all instances of one connector
openwiki ingest web-search-2 # run one specific instance
On macOS, source schedules are installed as user LaunchAgents under ~/Library/LaunchAgents/ and write logs to ~/.openwiki/logs/. So the personal wiki self-updates in the background without you thinking about it.
This is the Karpathy “LLM wiki” concept literally shipping as a product. It’s early — the ergonomics for querying the personal wiki from other tools aren’t documented yet — but the ingestion side is real and it’s the part that’s actually hard.
Community reactions
The Show HN / launch discussion has a spread of takes:
The positive:
“This looks promising. I just wish they had an example of hosted documentation generated by this tool.”
“Your OpenClaw agents can now build and maintain their own Karpathy-style LLM wiki.”
The skeptical:
“Don’t need LangChain to do that and been doing for over a year with simple system prompt and more recently with a simple skill. Another useless deploy that won’t convince me of any usefulness of this stupid framework.”
The LangChain-fatigue crowd has a point that’s worth taking seriously: you can absolutely tell Claude Code “read the repo and write me a wiki under docs/” and get 80% of what OpenWiki does. Where OpenWiki earns its keep is (1) the update loop — diffing, targeted rewrites, and the CI workflow — and (2) the AGENTS.md / CLAUDE.md wiring, which is fiddly to get right by hand across multiple repos.
Honest limitations
A few things worth flagging before you commit:
- The wiki has to be trusted by the agent. If OpenWiki generates a page that’s subtly wrong, your coding agent will confidently follow that wrong context. There’s no third-party verification loop yet — the agent that wrote the docs is the same class of agent that reads them. Review PRs.
- No hosted example. The Reddit commenter’s complaint is real: as of this writing, the project doesn’t ship a public reference wiki you can browse to see what “good output” looks like on a real codebase. You have to run it on your own repo to evaluate quality.
- Token cost is not trivial on a large repo. The initial
--initrun on a 500-file repo will burn through a real number of tokens even with a cheap model. The ChatGPT-subscription auth mitigates this if you already have Plus/Pro/Team; otherwise budget for it. - DeepAgents is young. OpenWiki inherits DeepAgents’ strengths (long-horizon planning, tool-use scaffolding) but also its rough edges (LangChain-flavored abstractions, occasional over-eager tool calls). Enable LangSmith tracing early — you’ll want to see what the agent is doing.
- Personal mode is early. The ingestion is solid, but there’s no built-in MCP server that exposes the personal wiki to Claude Desktop or Cursor yet. You’d have to wire that yourself.
- Windows install path is bumpy.
bun install -g openwikican fall back to compilingbetter-sqlite3and requires Visual Studio Build Tools with the “Desktop development with C++” workload. Usenpmorpnpmon Windows.
Who should install this today
Install it now if:
- You maintain a repo where coding agents (Claude Code, Cursor, Codex, Aider) do a meaningful share of the work.
- You’ve hit the “the agent doesn’t understand the repo” wall and are already hand-writing
AGENTS.mdsnippets. - You have a ChatGPT Plus/Pro/Team subscription and want to route the token cost through the
openai-chatgptprovider. - You want the CI workflow that opens documentation PRs on a schedule — that’s the piece nobody else ships out of the box yet.
Wait a release or two if:
- You need a hosted example to trust the output quality on your kind of codebase.
- You need
.cursorrulessupport (onlyAGENTS.mdandCLAUDE.mdare wired today). - You want the personal-mode wiki queryable from Claude Desktop / Cursor without wiring your own MCP server.
FAQ
Q: How is OpenWiki different from DeepWiki?
DeepWiki (from Cognition/Devin) is a hosted service that generates wikis for public GitHub repos and serves them at deepwiki.com. OpenWiki is a local CLI that generates wikis under openwiki/ in your own repo, using your own model API key, with no third-party hosting. DeepWiki is discoverable; OpenWiki is private and CI-integrated. Different products for different needs.
Q: Does OpenWiki replace AGENTS.md and CLAUDE.md?
No, it augments them. OpenWiki injects a small block into your existing AGENTS.md and CLAUDE.md that tells the coding agent to reference the openwiki/ directory for detailed context. Your hand-written house rules stay intact — OpenWiki only rewrites its own <!-- OPENWIKI:START -->…<!-- OPENWIKI:END --> fenced block.
Q: Can I use OpenWiki with a local LLM instead of an API?
Yes, via the openai-compatible provider. Point it at any OpenAI-compatible chat-completions endpoint (Ollama, vLLM, LiteLLM gateway, LM Studio, etc.):
OPENWIKI_PROVIDER=openai-compatible
OPENAI_COMPATIBLE_API_KEY=your-gateway-key
OPENAI_COMPATIBLE_BASE_URL=http://localhost:11434/v1
OPENWIKI_MODEL_ID=qwen3.5-coder:30b
Documentation-quality output from small local models will be noticeably worse than from a frontier model. Test on a small repo first.
Q: How much does an update run cost?
Depends on repo size and model. A ~100-file TypeScript repo with GPT-5.6-terra runs roughly $0.15–$0.40 per full update in early benchmarks reported on the launch thread. A large monorepo with Claude Sonnet 5 could easily hit $5+ per update. The --update command tries to be incremental (only re-generating pages affected by recent code changes), but the diff logic is new — watch the LangSmith trace for the first few runs.
Repo & docs
- GitHub: langchain-ai/openwiki
- LangChain launch post: Introducing OpenWiki
- Built on: DeepAgents
- Trending stats: Trendshift
If you’re already three months into a “we should really document this repo for the agents” backlog item, OpenWiki collapses that from a multi-week project to npm install -g openwiki && openwiki --init. That alone is worth the download.
Sources
- langchain-ai/openwiki README — the project README, install instructions, provider matrix, and connector list
- LangChain launch post — the problem statement and design rationale
- r/AIDeveloperNews launch thread — community reactions, both positive and skeptical
- Karpathy’s LLM Wiki concept — the intellectual prior art OpenWiki credits directly
- DeepAgents documentation — the underlying long-horizon agent harness