gitmyhub

pi-openwiki

TypeScript ★ 8 updated 1mo ago

LangChain's openwiki agent based on PI harness

A Pi AI agent extension that automatically generates and keeps codebase documentation up to date.

TypeScriptNode.jsPiGitsetup: easycomplexity 2/5

pi-openwiki is an extension for Pi, an AI coding agent, that automatically writes and keeps documentation for your codebase up to date. It is based on an earlier project called OpenWiki, built by LangChain, and has been adapted to work specifically inside the Pi agent ecosystem.

The idea is simple: instead of writing documentation by hand and letting it go stale as code changes, you point this tool at your project and it generates a structured set of markdown files covering things like a quickstart guide, system architecture, development workflows, business logic, deployment steps, and testing strategy. After the first run, you can ask it to update just the parts of the documentation affected by recent code changes, since it tracks git history to know what has changed since the last update. There is also a chat command that lets you ask plain-language questions about how your codebase works without changing any files.

To use it, you need Pi itself (version 0.80 or newer), a project stored in a git repository, and Node.js with TypeScript installed. Installation happens through Pi's own package manager, either globally, for a single project, directly from GitHub, or temporarily for one session. Internally, the tool works in five steps: it explores your repository and git history, tries to understand the reasoning behind the code, generates the markdown documentation, saves metadata so future updates are efficient, and can automatically update related agent instruction files.

This is aimed at developers who already use the Pi coding agent and want their project's documentation, and the context available to AI coding assistants, to stay accurate without manual upkeep. It is not a general documentation generator for use outside the Pi ecosystem.

Where it fits