GitDoc
GitDoc is a VS Code extension that automatically generates comprehensive documentation for your code projects using AI. With just a keystroke, you can create detailed, readable documentation for individual files or your entire project.
Features
- Project Documentation: Generate complete documentation for your entire project with Ctrl+Alt+D (Cmd+Alt+D on Mac)
- Single File Documentation: Document just the current file with Ctrl+Alt+F (Cmd+Alt+F on Mac)
- Documentation Explorer: Easily browse and access all generated documentation
- Markdown Integration: View documentation directly in VS Code's markdown preview
- Customizable: Configure file types, excluded directories, and more
Requirements
- VS Code 1.60.0 or newer
- A Gemini API key (configured in extension settings)
- The documentation API server running locally or remotely
Getting Started
- Install the extension from the VS Code Marketplace
- Set your Gemini API key in the extension settings
- Configure the API endpoint (default: http://localhost:8000)
- Open a project folder
- Press Ctrl+Alt+D (Cmd+Alt+D on Mac) to generate documentation
Extension Settings
This extension contributes the following settings:
gitdoc.apiKey
: Your Gemini API key for documentation generation
gitdoc.apiEndpoint
: Documentation API server endpoint
gitdoc.excludeFolders
: Folders to exclude from documentation
gitdoc.fileExtensions
: File extensions to include in documentation
Using the Extension
Generate Project Documentation
There are multiple ways to generate documentation for your entire project:
- Press Ctrl+Alt+D (Cmd+Alt+D on Mac)
- Run the command GitDoc: Generate Project Documentation from the command palette
- Click the GitDoc status bar item
- Right-click in the Explorer and select GitDoc: Generate Project Documentation
Document Current File
To generate documentation for just the current file:
- Press Ctrl+Alt+F (Cmd+Alt+F on Mac)
- Run the command GitDoc: Document Current File from the command palette
- Right-click in the editor and select GitDoc: Document Current File
View Documentation
Generated documentation is:
- Saved to a
docs
folder in your project
- Available in the GitDoc Documentation Explorer panel
- Automatically opened in VS Code's Markdown Preview
How It Works
- GitDoc scans your project for supported code files
- Files are analyzed by an AI documentation generator API
- Documentation is created in well-structured Markdown format
- A project summary is generated to provide high-level context
- All documentation is saved to your project's
docs
directory
Running the Documentation API Server
This extension requires the accompanying Documentation API server to be running. See the documentation-api repository for setup instructions.
Release Notes
0.1.0
Initial release of GitDoc with:
- Project-wide documentation generation
- Single file documentation
- Documentation Explorer
- Customizable settings
Contributing
Contributions are welcome! See the contribution guidelines for more information.
License
This project is licensed under the MIT License - see the LICENSE file for details.