Your docs are lying. Doqtor keeps them in sync with your code, automatically.
Doqtor detects documentation drift after code changes and opens pull requests with fixes. It doesn't generate docs from scratch. It makes sure your existing docs stay correct.
Documentation goes stale the moment code changes. Developers update function signatures, rename parameters, remove APIs, and the docs keep referencing the old version. Nobody notices until a user hits a broken example.
PR Merged → Webhook → Diff Analysis → Doc Matching → Drift Detection → Fix Generation → Docs PR
- A PR merges into your repo
- Doqtor analyzes the diff to find changed functions, parameters, and types
- It scans your documentation for references to those symbols
- It detects mismatches like wrong signatures, outdated examples, removed APIs
- It opens a PR with the fixes
Only processes what changed. No full-repo scans.
| Drift Type | Example |
|---|---|
| Signature mismatch | createUser(name, email) changed to createUser(name) |
| Removed symbol | Docs reference a deleted function |
| Renamed symbol | getUsers renamed to fetchUsers but docs still say getUsers |
| Outdated example | Code block calls a function with wrong parameters |
Each detection includes a confidence score so reviewers can prioritize.
Install from npm:
npm install -g @doqtor/cliThen run in any git repo with documentation:
# Check for documentation drift in your local changes
doqtor check
# Apply fixes
doqtor fix
# Preview fixes without applying
doqtor fix --dry-run
# Generate a default config file
doqtor initOr use without installing:
npx @doqtor/cli checkInstall the Doqtor GitHub App on your repository. Once installed, Doqtor automatically monitors merged PRs and creates follow-up PRs when documentation drift is detected.
To run your own instance of the backend:
-
Clone the repository:
git clone https://github.com/cachevector/doqtor.git cd doqtor bun install bun run build -
Start the server in setup mode:
bun run --cwd apps/backend dev
-
Create your GitHub App: Visit
https://github.com/settings/apps/new?manifest=followed by the content ofgithub-app-manifest.json(URL-encoded).Alternatively, once the server is running, the one-click setup link will be pre-configured if you use the manifest flow.
-
Configure environment: After creating the app, you'll be redirected back to the server. Copy the generated environment variables into a
.envfile in the root directory. -
Restart the server: Restart the backend to load the new credentials.
Create a doqtor.config.json in your project root:
{
"docsPaths": ["README.md", "docs/"],
"ignore": ["node_modules/", "dist/", ".git/"],
"ai": {
"enabled": false,
"provider": "openai"
},
"autoPR": true
}| Option | Description | Default |
|---|---|---|
docsPaths |
Files/directories to scan for documentation | ["README.md", "docs/"] |
ignore |
Paths to exclude from analysis | ["node_modules/", "dist/", ".git/"] |
ai.enabled |
Use an LLM for fix generation | false |
ai.provider |
Provider to use (openai or anthropic) |
"openai" |
autoPR |
Create PRs with fixes automatically | true |
Use parseSource(filePath, content) to extract symbols from a TypeScript file:
import { parseSource } from "@doqtor/parser";
const symbols = parseSource("src/index.ts", sourceCode);Returns an array of ParsedSymbol objects with name, kind, parameters, and return type.
See CONTRIBUTING.md for setup, development commands, and guidelines.
MIT
