devscribe-cli
v0.1.0
Published
Detect stale and missing documentation in your codebase
Readme
DevScribe CLI
Detect stale and missing documentation in any codebase — before it becomes a problem.
How It Works
DevScribe analyzes your repo using four signals:
| Signal | What it detects | |--------|----------------| | Timestamp gap | Code modified much more recently than its doc | | Symbol coverage | Exported functions/classes with no doc mention | | Commit graph | How many code commits since the doc was last touched | | LLM semantic diff | Whether the doc's description still matches what the code actually does |
Each doc file gets a staleness score (0–100) and a priority: 🔴 Critical / 🟡 High / 🔵 Medium / 🟢 Low.
Setup
npm install
npm run buildSet your Anthropic API key for LLM semantic diff (optional but recommended):
export ANTHROPIC_API_KEY=sk-ant-...Usage
Analyze a repo
node dist/index.js analyze /path/to/your/repoSkip LLM analysis (faster, no API key needed)
node dist/index.js analyze /path/to/your/repo --no-llmOutput as Markdown (great for GitHub issues)
node dist/index.js analyze /path/to/your/repo --output markdownOutput as JSON (for piping into other tools)
node dist/index.js analyze /path/to/your/repo --output jsonShow only top 10 most stale files
node dist/index.js analyze /path/to/your/repo --top 10Example Output
📊 Repository Summary
Path: /home/user/my-project
Analyzed at: 3/3/2026, 10:00:00 AM
Doc files: 24
Code files: 87
Coverage: [██████░░░░] 61%
📋 Stale Documentation (ranked by severity)
┌──────────┬──────────────────────────────────────┬───────┬─────────────┬───────────────┬─────────────────┬────────────┐
│ Priority │ Doc File │ Score │ Days Behind │ Commits Since │ Symbol Coverage │ LLM Issues │
├──────────┼──────────────────────────────────────┼───────┼─────────────┼───────────────┼─────────────────┼────────────┤
│ 🔴 crit │ docs/api/authentication.md │ 88 │ 142d │ 23 │ 3/11 │ 4 │
│ 🟡 high │ docs/guides/deployment.md │ 62 │ 67d │ 9 │ 6/8 │ 2 │
└──────────┴──────────────────────────────────────┴───────┴─────────────┴───────────────┴─────────────────┴────────────┘
🚨 Critical Issues — Details
docs/api/authentication.md
📅 Doc is 142 days behind its code
📝 23 code commits since last doc update
🔍 Undocumented symbols: verifyToken, refreshSession, revokeToken...
💀 Dead references in doc: `authenticate`, `JWTPayload`
🤖 LLM: Doc describes OAuth 1.0 flow but code implements OAuth 2.0 with PKCE
• `authenticate()` function no longer exists, replaced by `signIn()`
• Token refresh endpoint has changed from /refresh to /auth/tokenSupported Languages
- TypeScript / JavaScript (including JSX/TSX)
- Python
- Go
- Ruby, Java, Rust, C# (generic symbol extraction)
Roadmap
- [ ] GitHub Action integration
- [ ] Auto-open GitHub issues with staleness reports
- [ ] Watch mode (re-analyze on file change)
- [ ] Per-team doc coverage dashboards
- [ ] Fine-tuned model for documentation quality scoring
