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:
git clone https://github.com/cachevector/doqtor.git
cd doqtor
bun install
bun run build
# Copy and configure environment
cp .env.example .env
# Edit .env with your GitHub App credentials
# Start the webhook server
bun run --cwd apps/backend devCreate 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
