DocuMint — Code Documentation Generator for VS Code
Understand a codebase without reading every file first. DocuMint turns a VS Code workspace, folder, or file into navigable Markdown and HTML documentation. Use Local Documentation — No AI for deterministic, source-grounded docs that stay on your machine, or switch to AI mode when you want provider-enhanced explanations. 🎉 400+ downloads and counting. Thank you to everyone who has tried DocuMint and helped shape it.
DocuMint writes generated documentation to:
Table of Contents
What's New in 1.0.111.0.11 keeps the full Local Documentation upgrade and adds the finished review experience directly inside the DocuMint sidebar: 1–5 stars, Marketplace review, inline improvement feedback, GitHub issue handoff, Later, and Don't ask again. Instead of giving you a long generated document and asking you to figure out where to begin, DocuMint now answers the questions developers usually ask when they open an unfamiliar repository. The highlights
1.0.7 vs 1.0.11
See 1.0.11 in ActionThese screenshots are generated from DocuMint's own source tree, so the views below show the product documenting itself. At a glance — understand the repository before opening filesCounts, languages, entry points, dependencies, documentation coverage, symbols, exports, and more are grouped into one readable starting point.
Big picture — see how modules connectThe module graph shows structural relationships without turning the page into an unreadable arrow wall. You can switch connection density and zoom into more detail in the generated report.
What's inside — spot where the code actually livesThe treemap makes repository size and module/file distribution visual, so large files and dense areas stand out immediately.
Start here — get a practical reading orderDocuMint uses detected entry points and resolved dependencies to suggest a source-backed place to begin reading. It is guidance, not an invented claim about the only correct order.
Dependency reach — find widely used filesThe dependency-reach view helps you see which files are depended on by more of the project and how that relates to source size.
How It WorksDocuMint always starts by scanning the selected Workspace, Folder, or File and extracting source facts such as imports, exports, symbols, entry points, TODO/FIXME/HACK comments, environment references, and resolved project dependencies. From there you choose one of two paths: Local Documentation — No AIUse this when privacy, determinism, or zero-provider setup matters.
AI DocumentationUse this when you want source-grounded explanations beyond what deterministic static analysis can establish.
Both modes save their rendered documentation under Local Project MapThe Local Project Map is designed around real developer questions rather than a fixed list of generic documentation sections:
The project map stays conservative: when a fact is not supported by source evidence, DocuMint does not invent one. Supported ProvidersAI mode is configured using
Ollama and LM Studio do not require an API key or cloud-source-transfer consent. When one of these presets is selected, DocuMint queries the fixed loopback Local Documentation mode does not use any AI provider. Provider implementations live in Supported LanguagesThe following scanner languages are enabled by default on new installs:
Notes:
InstallMarketplaceInstall from VS Code Marketplace: Or run:
VSIXTagged releases publish the packaged VSIX as a GitHub Release asset instead of committing binaries to the source tree.
Build from Source
Quick Start
Review & Feedback CardAfter install, DocuMint auto-activates when VS Code finishes starting and makes a review card available inside the DocuMint sidebar. The card includes a 1–5 star selector, a clear Review on Marketplace action, and an inline What should we improve? feedback box that opens a prefilled GitHub issue. The star selector is a local UI choice only; the public rating is submitted on the Marketplace. If the card is postponed or closed, it can appear again no more than once every 7 days, and a successful generation can surface it again when that window is due. Don't ask again permanently disables the card. Review cadence is stored in VS Code extension global state, and DocuMint does not send feedback automatically. CommandsContributed commands:
Internal scope commands used by sidebar:
ConfigurationNew settings are published under Key Settings
Local
|
| Mode | Network / API Key | What It Generates |
|---|---|---|
local |
None required | Deterministic project facts, source tree, trusted descriptions, detected APIs/imports/TODOs/environment references, resolved dependencies, a compact module Mermaid view in Markdown, and the interactive Local project map in HTML. No semantic AI inference is added. |
ai |
Depends on provider | Source-grounded documentation enhanced with provider-generated explanations, examples, architecture/design notes, and other semantic sections when supported by source evidence. |
Local mode deliberately hides provider/model/authentication and Documentation Depth controls because they do not affect Local output.
AI Documentation Depth
documint.documentationDepth applies only to AI mode.
| Depth | Best For | What It Generates |
|---|---|---|
simple |
Fast plain-English understanding | Short purpose, key capabilities, and input/output summary for each file. |
basic |
Lightweight developer reference | Module metadata, overview, exported API reference, quick start, and related modules. |
standard |
Default production documentation | Full API reference, dependencies, usage examples, side effects, errors, configuration, security, concurrency, and testing notes when source evidence exists. |
comprehensive |
Detailed enterprise documentation | Architecture/design notes, module boundaries, exhaustive API reference, data flow, configuration, errors/recovery, security, limitations, TODO/FIXME inventory, and performance/resource notes when source evidence exists. |
Notes:
simple,basic, andstandardcan batch small files for faster AI generation.comprehensivecan batch small files, but large files are not truncated. They are generated as full single-file requests, and files that exceed the provider context window are split into chunks before the output is merged.
Output
Generated output is written to a dedicated documint/ directory in the workspace root:
documint/documentation.mddocumint/documentation.htmldocumint/.documint-cache.json— AI documentation cachedocumint/.documint-visual-cache.json— AI visual cachedocumint/.documint-generation-cache-key.json— AI cache compatibility markerdocumint/.documint-local-cache.json— Local source/output cache manifest
DocuMint no longer writes generated output into your project's docs/ directory. Existing legacy docs/ files are not moved or deleted automatically.
Local and AI modes use the same output paths, so the latest successful generation replaces the previous rendered documentation files.
The HTML renderer includes:
- Folder-first sidebar navigation
- Section anchors and ranked documentation search
- Local file/description/export search with Ctrl/Cmd+K
- Theme toggle
- Question-first Local project map
- File-size treemap and dependency-reach view
- Suggested reading path
- Connected file cards with Uses / Used by relationships
- Portable source-file and line links
- Project tree and deterministic architecture/dependency facts
- Copy-to-clipboard for code blocks
AI output can additionally include richer source-grounded visual/semantic sections depending on the selected depth and available evidence.
Project Structure
src/ # VS Code extension source
|-- analyzer/ # Source analysis, symbols, imports, and dependency facts
| |-- sourceAnalyzer.ts # Public analyzer facade + AST-backed JS/TS routing
| `-- sourceAnalyzerBase.ts # Core cross-language analysis and non-JS/TS facts
|-- extension.ts # Public VS Code activation entry point
|-- extensionBase.ts # Activation, commands, AI/Local routing, consent, cache clearing
|-- types.ts # Shared types and error models
|-- config/ # Settings migration, API-key validation, and Secret Storage
| |-- apiKeyValidation.ts # Local API-key sanity checks
| |-- configuration.ts # documint.* settings bridge + legacy fallback
| |-- configurationPreference.ts # Pure namespace-precedence policy
| `-- secretStorage.ts # VS Code secret storage wrapper
|-- scanner/ # Workspace/file discovery, language filtering, and exclusions
| `-- workspaceScanner.ts # Workspace/selected-path discovery and filtering
|-- providers/ # Cloud and local AI-provider runtimes, models, retry, and limits
| |-- aiProvider.ts # Base provider and prompt/chunking pipeline
| |-- providerFactory.ts # Provider resolution and creation
| |-- localProviderPolicy.ts # Ollama/LM Studio loopback + model policy
| |-- localOpenAICompatibleProvider.ts # Keyless local OpenAI-compatible runtime
| |-- localProviderDiscovery.ts # Fixed-loopback /v1/models discovery
| |-- providerModelGuard.ts # Prevents stale cross-provider model IDs
| |-- providerMetadataDecorator.ts # Context-window metadata/override layer
| |-- openAICapabilities.ts # Canonical OpenAI context/output capability table
| |-- anthropicCapabilities.ts # Canonical Anthropic context/output capability table
| |-- deepSeekCapabilities.ts # Canonical DeepSeek context/output capability table
| |-- openaiProvider.ts
| |-- anthropicProvider.ts
| |-- openrouterProvider.ts
| |-- deepseekProvider.ts
| `-- customProvider.ts
|-- services/ # Local/AI generation, cache, rendering, navigation, and output policy
| |-- docGenerator.ts # Public AI generator facade
| |-- docGeneratorBase.ts # AI orchestration + canonical prompt/cache binding
| |-- generationMode.ts # Canonical AI/Local mode normalization
| |-- localDocumentationGenerator.ts # Local scan/analyze/write/cache runtime
| |-- localDocumentationDocument.ts # Complete deterministic Local document assembly
| |-- localDocumentationModel.ts # Canonical Local facts/model shared by Markdown and HTML
| |-- localReadmeFacts.ts # Exact README path-description extraction
| |-- localBuildFacts.ts # Makefile targets and Dockerfile source facts
| |-- structuralModule.ts # Shared structural module grouping
| |-- localCodeMapData.ts # Local interactive project-map data contract
| |-- htmlLocalCodeMap.ts # Question-first Local HTML project map
| |-- localProjectDocumentation.ts # Deterministic Local project overview
| |-- localArchitectureDocumentation.ts # Deterministic dependency diagrams/edges
| |-- localFileDocumentation.ts # Deterministic per-file facts/API sections
| |-- localDocumentationCache.ts # Separate Local source/output fingerprint cache
| |-- generationCacheIdentity.ts # Canonical AI generation/cache identity versions
| |-- generationCachePolicy.ts # Invalidates AI-doc cache on material generation changes
| |-- documentationValidator.ts # Checks AI docs against source facts
| |-- outputSanitizer.ts # Removes unsafe/non-source-grounded output sections
| |-- htmlTemplate.ts # Small HTML document composition shell
| |-- htmlTemplatePolicy.ts # External-asset/timestamp/local-surface policy
| |-- htmlBaseStyles.ts # Generated HTML base/Jelly UI styles
| |-- htmlBaseScript.ts # Generated HTML reader/visual runtime
| `-- modelMetadataService.ts # Context window metadata fetch/cache
`-- views/ # Sidebar webview host, template, styles, and client runtime
|-- sidebarProvider.ts # Sidebar host/state/message bridge
|-- sidebarTemplate.ts # CSP-aware sidebar HTML composition
|-- sidebarStyles.ts # Sidebar webview styles
`-- sidebarClientScript.ts # Sidebar webview client runtime
The *Base.ts modules are implementation details. Runtime AI code should import the public facade modules (extension.ts, analyzer/sourceAnalyzer.ts, and services/docGenerator.ts) so endpoint, dependency-resolution, and cache-version policies cannot be bypassed.
Development
Prerequisites
- Node.js 18+
- npm 9+
- VS Code 1.110.0+
Commands
Normal development loop:
npm ci --no-audit --no-fund
npm run check
npm run check runs TypeScript type checking plus the fast unit/regression suite. It does not launch a browser, run the Local self-audit, package a VSIX, or require Python/Playwright.
Use the heavier commands only when they are relevant:
npm run watch
npm run compile
npm run audit:self
npm run verify
npm run release:readiness
npm run release:readiness is a release-candidate gate, not a normal edit-loop command. It is the only canonical command that chains verification, browser acceptance, VSIX packaging, archive validation, and release evidence.
Self-audit:
npm run audit:self documents DocuMint's own src/ plus package.json and checks release-critical Local Documentation invariants such as AST export detection, compact Markdown, Local code-map presence, run scripts, and Local HTML CDN independence.
npm run verify runs the regression suite and then the self-audit.
Browser acceptance
Browser acceptance is for Local HTML/browser changes and final release validation; it is not required for ordinary extension development or for end users installing the VSIX.
Install Python Playwright once on a development/release machine when browser acceptance is needed. A virtual environment is recommended:
python3 -m venv ~/.venvs/documint-browser
~/.venvs/documint-browser/bin/python -m pip install playwright
export DOCUMINT_PYTHON="$HOME/.venvs/documint-browser/bin/python"
Browser scripts use tools/run-python.mjs, which selects an available Python 3 runtime (python3, python, or Windows py -3). Set DOCUMINT_PYTHON=/custom/python to force a specific interpreter.
If Chrome/Chromium is already installed locally, reuse it instead of downloading Playwright's bundled browser:
export CHROMIUM_EXECUTABLE="$(command -v google-chrome || command -v google-chrome-stable || command -v chromium || command -v chromium-browser)"
If no local Chrome/Chromium executable is available, install Playwright Chromium instead:
"$DOCUMINT_PYTHON" -m playwright install chromium
Then run the provider-free generated-HTML acceptance command:
npm run test:browser
The suite verifies navigation, reader controls, Local code-map interactions, responsive behavior, offline/external-request isolation, and AI-format chart failure isolation.
When dependency registry access is available, npm run lockfile:generate creates/refreshes package-lock.json without running package scripts. npm run lockfile:validate then checks the lockfile's root package identity and dependency maps against package.json.
If the local machine cannot reach the npm registry, run the manual Lockfile Bootstrap GitHub Actions workflow. It generates and validates package-lock.json on a network-enabled runner and uploads the lockfile plus SHA-256/metadata as an artifact without committing or pushing to the repository. Its default run_readiness=true input also runs the complete verify → browser acceptance → VSIX packaging/evidence gate against that transient lockfile, so the branch can be fully tested before the lockfile is committed.
With GitHub CLI installed/authenticated, the workflow can be dispatched from the current branch without opening the Actions UI:
gh auth login
npm run lockfile:bootstrap
Optional overrides: DOCUMINT_BOOTSTRAP_REF=<branch> and DOCUMINT_BOOTSTRAP_REPO=owner/repo.
After downloading and extracting the lockfile artifact, adopt it safely from the repository root:
npm run lockfile:adopt -- /path/to/extracted/documint-package-lock-artifact
The adopter uses the same shared lockfile policy as lockfile:validate; it validates the candidate before touching the root lockfile, verifies the Bootstrap artifact's package-lock.sha256 when that metadata is present, replaces via a temporary file, and re-verifies the adopted SHA-256. Passing the artifact directory or its package-lock.json file is supported.
Release readiness
Run this only for a release candidate, not after every source edit.
After the lockfile is committed, Python Playwright is installed, and either CHROMIUM_EXECUTABLE points to a local Chrome/Chromium binary or Playwright Chromium is installed, run the complete release gate with one command:
npm run release:readiness
It requires the local locked @vscode/vsce binary and does not download packaging tools at runtime. The command runs npm run verify, the full browser acceptance suite, packages release-artifacts/documint-<version>.vsix, checks the archive, and writes machine-readable evidence to release-artifacts/readiness/readiness.json. The evidence includes verify/browser/package timings, Local self-audit timing/report, bundle and VSIX sizes, VSIX SHA-256, and browser-result summaries.
To record a size delta against an older VSIX:
DOCUMINT_BASELINE_VSIX=/path/to/previous.vsix npm run release:readiness
The tag-release workflow uses this same readiness command before publishing the GitHub Release asset. After package-lock.json is committed, the manual Release Readiness GitHub Actions workflow can run the same gate on demand without enabling automatic main-push CI.
Known Limitations
- TypeScript/JavaScript-family structure uses the TypeScript compiler AST; other languages use deterministic language-specific static analysis. Local mode is not a full semantic program prover for every language.
- Local mode does not invent business-logic explanations, intent, usage examples, or architectural rationale that cannot be established from static source evidence.
- AI documentation quality depends on the selected model and the source code/context available in the workspace.
- Cloud providers receive selected source code only after confirmation. Use Local Documentation when code must remain entirely on the machine.
documint.concurrentRequestsdefaults to5for broader provider compatibility. Increase it only when your provider rate limits allow.
Contributing
See CONTRIBUTING.md for development rules and regression-test expectations.
- Repository: https://github.com/Wonderer-Tech/documint
- Issues: https://github.com/Wonderer-Tech/documint/issues
- Security policy: SECURITY.md
- Release history: CHANGELOG.md
License
MIT. See LICENSE.




