Install and generate repository docs
Install the CLI
npm or pnpm. Installing with Bun can fall back to compiling the native better-sqlite3 dependency and may require Visual Studio Build Tools with the Desktop development with C++ workload.Initialize in your repository
From the repository root, run the following command:On the first interactive run, OpenWiki prompts for:
- An inference provider and model
- The provider API key (or equivalent credentials)
- An optional LangSmith API key for tracing
~/.openwiki/.env.Review the generated wiki
OpenWiki writes documentation to This opens a local interactive node graph with a side-by-side Markdown reader. See Visualize your wiki.
openwiki/ in the repository, including a quickstart entrypoint and topic pages. It also maintains an AGENTS.md and CLAUDE.md at the repository root, adding a block that instructs coding agents to consult the wiki for codebase context.Repository-specific wiki instructions live in openwiki/INSTRUCTIONS.md. OpenWiki reads this file for scope and priorities. To change it, edit the file, or ask OpenWiki in chat to change the brief (for example, openwiki "Update openwiki/INSTRUCTIONS.md to focus on the public API"). Normal --init and --update runs do not rewrite it.To explore the wiki in a browser, run:Keep docs up to date
Personal wiki (optional)
To initialize a local personal brain instead of repository docs:~/.openwiki/wiki and can ingest configured connectors such as local git repositories, Gmail, Notion, web search, Hacker News, and X/Twitter. See Personal mode.
Interactive and one-shot runs
Bareopenwiki opens an interactive session in code mode for the current repository. Pass a message to start with a request:
-p / --print for a one-shot non-interactive run that prints the final assistant output and exits:
/api-key to update the current provider API key and /langsmith-key to update or clear LangSmith tracing credentials.
Trace with LangSmith
During onboarding, provide a LangSmith API key to trace OpenWiki runs to a LangSmith project namedopenwiki. You can also set these values in ~/.openwiki/.env or the process environment:
Next steps
- Code mode: repository wikis, OKF output, and agent instruction files
- Personal mode: local brain and connectors
- Model providers: supported providers and credentials
- Automate updates: GitHub Actions, GitLab CI, and Bitbucket Pipelines
- CLI reference: commands and flags
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

