Documentation
Everything you need to generate, track, and maintain documentation across your entire codebase — automatically.
01 · Getting Started
Getting Started
What is Wright AI?
Wright AI is a documentation engine for codebases. It reads your functions, understands their callers and callees, and writes complete docstrings in your team's chosen style. Once installed, it also watches for drift— when your code changes but the docs don't — and surfaces those gaps before they reach production.
The core problem Wright solves: teams write documentation once, then the code drifts away from it over months of iteration. Wright makes documentation a living part of your workflow rather than a one-time chore.
Quick Start
Get up and running in under 5 minutes with the VS Code extension.
Generate Docs lens above each one.Wright: Generate Docs for Folder.Prerequisites
Before installing Wright AI, make sure your environment meets these requirements:
| Requirement | Version | Notes |
|---|---|---|
Node.js | ≥ 18 | Required for the VS Code extension and CLI |
Python | ≥ 3.9 | Required if using the CLI on Python projects |
VS Code | ≥ 1.85 | For the VS Code extension |
| Git | any | Required for drift detection |
Supported languages for documentation generation:
- ›TypeScript / JavaScript — JSDoc style
- ›Python — Google, NumPy, or Sphinx style
- ›Go — godoc style
- ›Rust — rustdoc style (beta)
02 · Installation
Installation
VS Code Extension
The easiest way to get started. Install from the Marketplace — no config files, no terminal required.
Generate Docs ↑ lens that appears above each undocumented function.Command Line
The CLI gives you full control: batch generation, coverage reports, drift checks, and codebase chat — all from your terminal.
Initialize Wright in your project:
This creates a wright.config.json at the root of your project with sensible defaults. Then run your first generation:
GitHub Action
Add Wright to your CI pipeline to block PRs that drop documentation coverage or introduce drift.
WRIGHT_TOKEN. Never commit it directly to your workflow file.MCP Server
Expose your indexed docs to any MCP-compatible AI tool — Claude Code, Cursor, GitHub Copilot — with one command.
Then add it to your MCP client config:
03 · Core Features
Core Features
Generate
Wright reads each function's signature, body, callers, and callees to generate a complete, accurate docstring. It doesn't just describe the function body — it understands what the function is used for.
Supported doc styles:
| Style | Languages | Example |
|---|---|---|
| JSDoc | TypeScript, JavaScript | @param name {string} - Description |
| Python | Args:\n name (str): Description | |
| NumPy | Python | Parameters\n----------\nname : str |
| Sphinx | Python | :param name: Description\n:type name: str |
| godoc | Go | Plain prose, first sentence is the summary |
wright.config.json under docStyle so you never need to pass the flag.Coverage
Coverage tracks what percentage of your public functions have documentation. Run a report at any time, or let the GitHub Action enforce a minimum threshold in CI.
The report shows coverage by folder, file, and individual function — so you know exactly where the gaps are, not just that they exist.
_ in Python, or declared with no export in TS) are tracked but not required by default. Configure this via requirePrivate: true in your config.Drift Detection
Drift happens when you change a function's signature — add a parameter, rename a return type — but forget to update the docstring. Wright catches this automatically on every commit.
Wright detects drift when:
- ›A parameter is added or removed from a function signature
- ›A parameter is renamed
- ›The return type changes in a way that contradicts the documented return
- ›A documented throws clause no longer applies
In VS Code, drift appears as a gutter warning (⚠) next to the function. Hover to see exactly what changed. In CI, drift causes the Wright Action to fail and posts a summary on the PR.
Chat
Ask questions about your codebase in plain English. Wright indexes all your documented functions and returns answers with exact file and line citations — no hallucination, no guessing.
Example session:
llms.txt
Wright generates an llms.txt file — a structured, token-efficient index of every function in your codebase, following the open llms.txt standard. Paste it into any AI assistant or feed it to an agent and it instantly understands your entire project — signatures, docstrings, and file layout — without reading every source file.
Generate it from the CLI or via the API:
The generated file format — one heading per file, one entry per function:
How teams use it:
| Workflow | How |
|---|---|
| Paste into Claude / ChatGPT | Copy llms.txt, paste at the top of a new chat, then ask anything about your codebase. |
| Feed to a Cursor agent | Add the file path in Cursor's context panel — the agent reads it before answering. |
| GitHub Actions artifact | Run wright llms-txt in CI and upload as a build artifact. Always stays current with main. |
| Hosted endpoint | Run wright llms-txt --serve locally or in a staging environment. Point agents at the URL. |
llms.txt alongside your code. Reviewers and AI tools both benefit from it, and drift detection will flag it when the index is out of date.llms.txtstandard is open and model-agnostic. Wright's output is compatible with any tool that supports it — you are not locked in to Wright's own AI features.04 · CI
CI / GitHub Actions
Wright's GitHub Action integrates into your existing workflow in one step. It can enforce a coverage threshold, block on drift, and post a summary comment on each PR.
Available action inputs:
| Input | Default | Description |
|---|---|---|
threshold | "0.8" | Minimum coverage ratio (0.0–1.0). CI fails if coverage drops below this on the PR. |
check_drift | "true" | Fail CI if any documented function has drifted from its implementation. |
post_comment | "true" | Post a coverage + drift summary as a PR comment. |
paths | "." | Space-separated list of paths to scan. Defaults to entire repo. |
style | "auto" | Doc style override. One of: jsdoc, google, numpy, sphinx. |
threshold: "0" and check_drift: "true" to start with drift-only enforcement — a lower bar for teams adopting Wright incrementally.05 · MCP
MCP Server Reference
Wright's MCP server exposes your indexed documentation as tools that any MCP-compatible AI assistant can call. The server starts on stdio and re-indexes automatically when you save files.
Available tools:
| Tool | Description | Parameters |
|---|---|---|
search_docs | Semantic search over your documented functions. Returns the top matching docs with file + line citations. | query: string — natural language question |
get_function_doc | Retrieve the full docstring and signature for a specific function by name. | function_name: string |
list_undocumented | List all functions that are missing documentation, optionally filtered by path. | path?: string — optional path prefix |
Config for each supported client:
06 · Configuration
Configuration
Running wright init . creates a wright.config.json at your project root. All settings are optional — Wright works with zero config out of the box.
| Key | Type | Default | Description |
|---|---|---|---|
docStyle | string | "jsdoc" | Default doc style for generated docstrings. |
coverageThreshold | number | 0.8 | Minimum ratio of documented functions (0.0–1.0). |
include | string[] | ["./"] | Glob patterns of paths to scan. |
exclude | string[] | see above | Glob patterns to skip. Test files are excluded by default. |
requirePrivate | boolean | false | If true, private/unexported functions count toward required coverage. |
strictDrift | boolean | true | If true, renamed params count as drift. Set to false for looser checking. |
llmsTxtOutput | string | "llms.txt" | Where to write the generated llms.txt file. |
07 · FAQ
FAQ
Does my code leave my machine?+
No. Wright processes your code locally. When generating a docstring, only the function signature and a small amount of surrounding context is sent to the AI model — never your full codebase. The chat and coverage features are entirely on-device.
What counts as a documented function?+
A function is considered documented if it has a docstring (Python) or a JSDoc/equivalent block comment immediately preceding the function declaration (TypeScript/JavaScript/Go). Inline comments inside the function body do not count.
How is coverage calculated?+
Coverage = (number of documented public functions) / (total public functions). Private functions (prefixed _ in Python, unexported in Go, or without export in TS) are counted separately and not required by default. You can change this with requirePrivate: true.
Can I use Wright without a wright.config.json?+
Yes. Wright detects your project language and applies sensible defaults. Run wright init . any time to generate a config you can customize.
Does Wright work in monorepos?+
Yes. Place a wright.config.json in each package, or a single one at the root and use the include array to scope which packages are scanned. The CI action supports a paths input for the same purpose.
How do I ignore a specific function from coverage?+
Add a // @wright-ignore comment (TypeScript/JS) or a # wright: ignore comment (Python) on the line before the function definition. Wright will skip it entirely — no coverage penalty, no drift checks.
What's the difference between the free and paid plan?+
The VS Code extension, CLI, and MCP server are free. The GitHub Action's PR comment feature and dashboard analytics require a Wright AI account. Coverage threshold enforcement in CI is free.
Ready to ship?
Start with the VS Code extension — it's free and takes two minutes.