CodeStory AI 📚
AI-powered documentation generator for VS Code that keeps your project documentation always up-to-date.
CodeStory AI is an intelligent VS Code extension that automates the creation of internal documentation for your code. It seamlessly generates documentation every time you save, ensuring your project's knowledge base is always current.
TOC
🚀 Features
- ✍️ Auto-Documentation on Save: Automatically generates documentation when you save a file.
- Dual AI Engines:
- Ollama (Local): Runs completely offline using local models like Llama 3 (Default).
- Vertex AI (Cloud): Connects to Google Cloud's Gemini models for high-performance generation.
- 🗂️ Structured Storage: Saves documentation in a dedicated
CodeStory AI/ folder (e.g., CodeStory AI/extension.md).
- 🧠 Smart Hashing: Hashes your content to prevent re-generating documentation if the code hasn't changed.
- 🎨 Configurable Detail: Choose your preferred style:
Simple: One-sentence summary.
Concise: Short 2-3 sentence overview.
Explained: Standard explanation (Default).
Detailed: In-depth analysis with parameters and returns.
- ⚙️ Sidebar Manager: Manage all settings (Provider, Model, Style) easily from the dedicated CodeStory AI sidebar.
- 🤖 Startup Checks: Automatically checks for Ollama installation and missing models.
📋 Requirements
For Local AI (Ollama)
- Install Ollama.
- Pull a model (e.g.,
ollama pull llama3).
- Note: The extension will prompt you to download the model if it's missing.
- Ensure Ollama is running (
ollama serve).
For Cloud AI (Vertex AI)
- A Google Cloud Project with Vertex AI API enabled.
- Google Cloud SDK installed and authenticated locally (
gcloud auth login).
- Set your Project ID in the settings.
⚙️ Extension Settings
This extension contributes the following settings:
| Setting |
Default |
Description |
codestory-ai.provider |
ollama |
Select AI Provider (ollama or vertex). |
codestory-ai.docStyle |
concise |
Level of detail (simple, concise, explained, detailed). |
codestory-ai.ollamaModel |
llama3 |
Model name to use with Ollama. |
codestory-ai.projectId |
"" |
Google Cloud Project ID (Required for Vertex AI). |
📦 Usage
- Install the extension from the VS Code Marketplace.
- Open the CodeStory AI Sidebar (Book icon) to verify your settings.
- Code normally! When you save a supported file (
.ts, .js, etc.), CodeStory will:
- Show a progress notification.
- Generate a Markdown file in
CodeStory AI/<filename>.md.
- Review the generated documentation in the
CodeStory AI/ folder.
👨💻 About the Author
agupta07505
I’m Animesh Gupta, a Computer Science student at IIIT Bhopal specializing in Data Science. I enjoy building practical developer tools and IDE extensions that improve workflows, reduce friction, and make working with code easier and more intuitive.
CodeStory AI was born from this passion—designed to eliminate the tedious task of writing documentation so developers can focus on what they do best: coding.
📝 Release Notes
1.2.0
- Documentation updates and minor improvements.
- Fixed settings refresh command in sidebar.
- Updated extension name and commands to "CodeStory AI".
1.1.0
- Added Enable/Disable Extension toggle in Sidebar Settings.
- Improved startup checks.
1.0.3
- Documentation improvements and minor bug fixes.
1.0.2
- Marketplace name update to "CodeStory AI". & github repo update to "CodeStory-AI".
1.0.1
1.0.0
- Official Launch!
- Support for Ollama and Vertex AI.
- Sidebar Settings Manager.
- Smart updates and content hashing.
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
Enjoy coding with your AI pair documenter!