DocWeaver is a VS Code extension designed to generate structured and concise documentation for projects. It automatically analyzes code files, extracts key technical details, and compiles comprehensive documentation, including project structure and inter-file relationships.
- Automated Code Summarization: Extracts imports, functions, classes, and overall file functionality
- Project-Wide Documentation: Generates technical documentation at the project level using file summaries
- Module-Level Summaries: Analyzes submodules for a structured understanding
- Project Structure Tree View: Visualizes the file hierarchy within VS Code
- Customizable Prompts: Users can modify summarization prompts to fit their needs
- Supports OpenAI & Ollama: Choose between OpenAI's GPT models or local Ollama-based processing
- Markdown Export: Saves generated documentation to structured Markdown files
- Install directly from the VS Code Marketplace
- Or install from within VS Code:
- Open VS Code
- Open the Extensions view (
Ctrl+Shift+X/Cmd+Shift+X) - Search for "DocWeaver"
- Click Install
- Restart VS Code to activate the extension
- Open a project in VS Code
- Use the command palette (
Ctrl+Shift+P/Cmd+Shift+Pon Mac) - Run
DocWeaver: Document Project - View logs in the "DocWeaver" output channel
- The generated documentation will be available in a
DocsWeaverfolder within your workspace
- Open
PROJECT_DOCUMENTATION.mdfrom theDocsWeaverfolder - Use the built-in webview to preview the documentation inside VS Code
- View individual file summaries stored in Markdown format within the
DocsWeaverdirectory
DocWeaver allows users to modify its behavior via VS Code settings (Settings > Extensions > DocWeaver):
| Setting | Description |
|---|---|
docweaver.apiProvider |
Choose between openai and ollama |
docweaver.filePrompt |
Custom prompt for file analysis |
docweaver.projectPrompt |
Custom prompt for project analysis |
docweaver.modulePrompt |
Custom prompt for module analysis |
docweaver.ignorePatterns |
Define which files should be excluded |
docweaver.maxFileSizeBytes |
Set size limits for file processing |
docweaver.outputFileName |
Customize the documentation filename |
vscode- Extension APIfs,path- File system utilitiesignore- .gitignore parsingaxios- HTTP requests for API communicationmarked- Converts Markdown to HTML for the webview
- No documentation generated: Ensure your workspace has valid files and is not empty
- Files are being skipped: Check
.gitignoreanddocweaver.ignorePatternssettings - API errors: Verify API keys or ensure the Ollama server is running
This extension is open-source and distributed under the MIT License.
Contributions are welcome! Feel free to submit issues or pull requests on GitHub.
Developed by itsabk. Reach out via GitHub or email for support.