Documentation Maker
AI-powered documentation generator for your codebase. Automatically generates per-file docs with commit-tracked change history after every git commit. Supports multiple AI providers and installs skill files so Cursor and VS Code agents can help maintain your docs.
Features
Project Structure Documentation
Generates a file-structure.md that maps your entire project — every folder and key file explained. Understands package.json, detects the project type, and organizes the layout in a way that makes sense for new developers joining the team.
Per-File Documentation
Every source file gets its own markdown doc with:
- Purpose and overview — what the file does and why it exists
- Key functions / classes / components — explained individually
- Important variables and state
- Architecture and code flow — how the file works end to end
- Usage examples — how other parts of the codebase use this file
- Dependency analysis — what it imports and what imports it
Dependency Graph
Generates a dependencies.md with a full import/dependency graph across the project. Shows which files are central (imported by many), which are leaf nodes, and the overall architecture pattern.
Commit-Tracked Change History
Every file doc ends with a ## Change History table that grows with every update run. Each row contains the short commit hash, date, and a one-sentence AI-generated summary of exactly what changed in that file:
## Change History
| Commit | Date | What Changed |
|----------|------------|-----------------------------------------|
| abc1234 | 2026-06-05 | Added OAuth flow, removed legacy token |
| def5678 | 2026-05-28 | Refactored error handling |
| c9e1234 | 2026-05-20 | Initial documentation |
Rows are always appended — old history is never deleted.
Multi-Provider AI
Choose the AI that fits your team:
| Provider |
Model |
Setting value |
| Google Gemini |
Gemini 1.5 Pro |
gemini (default) |
| Anthropic |
Claude Opus 4 |
claude |
| OpenAI |
GPT-4o |
openai |
Switch providers any time in Settings without losing existing docs.
Smart Incremental Updates
The Update Documentation command uses git diff HEAD~1 HEAD to find only the files changed in the last commit. Only those files are re-documented — saving API calls and time. If directory structure changed, it also refreshes the structure and dependency docs automatically.
IDE Skill Files (Cursor + VS Code Agent)
On first install, the extension automatically creates two files in your workspace:
.cursor/rules/doc-maker.mdc — Cursor reads this automatically. It teaches Cursor's agent:
- Where your docs live (
code-docs/files/, code-docs/structure/)
- The change history format (so it appends correctly)
- To read existing file docs before explaining code
- To suggest doc updates after significant edits
- To generate docs for new files following your existing format
.vscode/doc-maker-instructions.md — Same guidance for VS Code Copilot and other VS Code agents.
This means from day one, your AI coding assistant already understands your documentation system and actively helps maintain it.
Language-Aware Documentation
The extension detects language-specific patterns and adds targeted instructions to the AI prompt:
- React / TypeScript — explains hooks, component lifecycle, props interface, state management, JSX structure
- Redux — explains actions, reducers, store connection
- Django — explains models, views, URL routing, ORM usage
- Flask — explains routes, HTTP methods, Blueprints
- Spring (Java/Kotlin) — explains annotations, bean lifecycle, dependency injection
Documentation Structure
code-docs/
├── structure/
│ ├── file-structure.md ← full project layout with explanations
│ └── dependencies.md ← import/dependency graph analysis
├── files/
│ └── src__yourfile__ts.md ← one doc per source file
└── project-manifest.json ← project metadata snapshot
Setup
1. Install
Install from the VS Code Marketplace, or from a .vsix file:
- Extensions view (
Ctrl+Shift+X) → ... → Install from VSIX
2. Pick your AI provider
Open Settings (Ctrl+,) → search Documentation Maker:
| Setting |
Description |
doc-maker.aiProvider |
gemini (default), claude, or openai |
doc-maker.geminiApiKey |
From Google AI Studio |
doc-maker.claudeApiKey |
From Anthropic Console |
doc-maker.openaiApiKey |
From OpenAI Platform |
doc-maker.outputDirectory |
Output folder name (default: code-docs) |
doc-maker.excludePatterns |
Glob patterns to skip (default: node_modules, venv, .git, dist, out) |
On first run you'll be prompted to enter an API key automatically.
3. Run Initial Setup
Open your project folder and run:
Command Palette (Ctrl+Shift+P) → Documentation Maker: Initial Setup
This will:
- Walk the file tree and generate
code-docs/structure/file-structure.md
- Analyze imports and generate
code-docs/structure/dependencies.md
- Generate a doc for every source file in
code-docs/files/
4. Update after commits
After making changes and committing:
Command Palette → Documentation Maker: Update Documentation
Only files changed in the last commit are re-documented. Each file doc gets a new change history row.
5. Recreate IDE skill files
If you want to regenerate the Cursor/VS Code skill files:
Command Palette → Documentation Maker: Scaffold Skill Files
Keyboard Shortcuts
| Action |
Windows / Linux |
Mac |
| Initial Setup |
Ctrl+Alt+D I |
Cmd+Alt+D I |
| Update Documentation |
Ctrl+Alt+D U |
Cmd+Alt+D U |
Requirements
- VS Code 1.60.0 or newer
- Git installed and in PATH (required for Update Documentation)
- At least one git commit in the repository before running Update
- API key for your chosen AI provider
Troubleshooting
Commands not found — make sure a workspace folder is open, then reload VS Code: Command Palette → Developer: Reload Window.
401 / authentication error — your API key is wrong or expired. Go to Settings → Documentation Maker and re-enter the key for your selected provider.
Update finds no changed files — the update command diffs HEAD vs HEAD~1, so you need at least 2 commits in the repo.
File skipped / "too large" — files over 100 KB are skipped to avoid hitting API token limits.
Output logs — View → Output → select Documentation Maker for detailed step-by-step logs.
License
MIT — Developed by Akshay Chame