AI-powered documentation generator for large codebases with interactive mindmap visualization.
Project description
Agentic Doc - AI-Powered Documentation Generator
Professional AI-Powered Documentation Generator for Large Codebases
A powerful CLI tool that uses AI (OpenAI GPT or Google Gemini) to automatically generate comprehensive, multi-level documentation for codebases of any size. Features interactive mindmap visualization, dependency analysis, and smart caching.
๐จโ๐ป About the Creator
Created, Designed, and Developed by Ish Kapoor
Role: Product Manager & Full-Stack Developer
This project was conceived and built from the ground up as a comprehensive solution to the documentation problem in modern software development. Every aspectโfrom architecture design to implementationโwas carefully crafted to deliver a professional-grade tool that scales to enterprise codebases.
Vision: Transform documentation from a manual burden into an automated, AI-powered process that keeps pace with code evolution.
โจ Features
- ๐ Smart Indexing: Recursive file scanning with
.gitignoresupport - ๐ง AI-Powered Docs: Uses LLMs (OpenAI, Gemini) to generate high-quality documentation
- ๐ Symbol Graph: Tracks functions, classes, and their relationships
- ๐บ๏ธ Interactive Mindmap: Beautiful, interactive visualization of your codebase
- ๐ Multi-Level Docs:
- File-level: Detailed documentation for each source file
- Directory-level: Module/package overviews
- Architecture-level: System-wide architecture analysis
- ๐พ Smart Caching: Saves LLM responses to avoid redundant API calls
- โก Incremental Updates: Only re-documents changed files
- ๐ API Request Tracking: Monitor and optimize your API usage
- ๐ง Easy Configuration: Interactive setup wizard for API keys
๐ธ Screenshots
Interactive Mindmap Visualization
Explore your codebase with force-directed graph visualization showing files, functions, and dependencies
CLI in Action
Beautiful terminal output with progress tracking and detailed statistics
System Architecture
Clean, modular architecture designed for scalability and extensibility
๐ Quick Start
Installation
# Install from PyPI (when published)
pip install agentic-aish
# Or install from source
git clone https://github.com/ishkapoor2000/agentic-ai.git
cd agentic-ai
pip install -e .
Initial Setup
# 1. Configure your API keys and provider
agentic-doc configure
# 2. Initialize your project
agentic-doc init
# 3. Scan your codebase
agentic-doc scan
# 4. Generate documentation
agentic-doc doc files --limit 10
# 5. Create interactive mindmap
agentic-doc mindmap
๐ CLI Commands
Configuration
# Interactive configuration wizard
agentic-doc configure
# Switch between providers
agentic-doc switch-provider gemini
agentic-doc switch-provider openai
# Check current configuration
agentic-doc status
Documentation Generation
# Generate standard file documentation
agentic-doc doc files --limit 100
# Generate enhanced documentation (with dependencies & usage)
agentic-doc doc files --limit 50 --enhanced
# Generate directory-level documentation
agentic-doc doc dirs
# Generate architecture overview
agentic-doc doc architecture
Visualization
# Generate interactive HTML mindmap
agentic-doc mindmap
# Generate Mermaid diagram
agentic-doc mindmap --format mermaid
# Visualize dependencies
agentic-doc visualize-deps
# Export graph data
agentic-doc graph --format json
agentic-doc graph --format html
Analysis Tools
Gain deep insights into your codebase structure and usage patterns.
1. Dependency Analysis
Identify the most critical parts of your codebase ("load-bearing" code).
# Generate a "Hot Functions Report" ranking functions by usage frequency
agentic-doc analyze-deps --show-hot
2. Use Case Documentation
Understand how your code is used in practice with real examples.
# Document usage patterns for functions used at least 5 times
agentic-doc use-cases --min-usage 5
3. Function Usage Network
Trace the complete call graph for specific functions.
# Generate detailed "Who calls whom?" reports
agentic-doc function-usage
Incremental Documentation
You can document different subsets of your codebase incrementally:
# Day 1: Document only the API layer
agentic-doc doc files --paths "app/api/**/*.py" --limit 20 --enhanced
# Day 2: Document the utilities
agentic-doc doc files --paths "app/utils/**/*.py" --limit 15 --enhanced
# Day 3: Document the database layer
agentic-doc doc files --paths "app/db/**/*.py" --limit 10 --enhanced
Benefits:
- Process large codebases incrementally
- Focus on specific modules or features
- Avoid redundant API calls (results are cached)
- Spread API usage over multiple days
๐ API Keys Setup
Google Gemini (FREE)
- Get your free API key: https://makersuite.google.com/app/apikey
- Run
agentic-doc configureand select Gemini - Enter your API key when prompted
OpenAI (PAID)
- Get your API key: https://platform.openai.com/api-keys
- Run
agentic-doc configureand select OpenAI - Enter your API key when prompted
๐ API Request Tracking
Every documentation generation command automatically tracks and displays API usage:
==================================================
API Request Summary
==================================================
Total Requests: 45
Session Duration: 127.3s
By Provider:
gemini: 45
==================================================
๐บ๏ธ Interactive Mindmap
The mindmap feature creates a beautiful, interactive visualization of your codebase:
- Force-directed graph showing files and symbols
- Interactive exploration with zoom, pan, and search
- Dependency visualization showing relationships
- Standalone HTML - no server required
๐ฐ Cost Optimization
- Use Gemini (FREE): Google's Gemini models are free for moderate usage
- Start small: Use
--limitto test on a subset of files - Smart caching: Responses are cached in SQLite
- Incremental updates: Re-scan only updates changed files
Estimated costs (using gpt-4o-mini):
- Small project (100 files): ~$1-2
- Medium project (1,000 files): ~$10-20
- Large project (15,000 files): ~$150-300 (first run, then incremental)
๐ Output Structure
docs/
โโโ files/
โ โโโ agentic_doc/
โ โ โโโ cli.py.md
โ โ โโโ config.py.md
โ โ โโโ ...
โ โโโ ...
โโโ dirs/
โ โโโ agentic_doc/
โ โ โโโ analysis.md
โ โ โโโ db.md
โ โ โโโ ...
โ โโโ ...
โโโ architecture/
โ โโโ overview.md
โโโ analysis/
โ โโโ hot-functions.md
โโโ graph.html # Interactive mindmap
๐ ๏ธ Supported Languages
- โ Python: Full AST-based analysis
- โ JavaScript/TypeScript: Regex-based extraction
- ๐ More languages: Coming soon
๐ง Configuration File
.agentic-doc.yml:
root_path: .
model_provider: gemini # or 'openai' or 'mock'
gemini_model: gemini-2.0-flash-exp
openai_model: gpt-4o-mini
exclude_globs:
- '**/node_modules/**'
- '**/.git/**'
- '**/__pycache__/**'
- '**/.venv/**'
๐๏ธ Architecture
For detailed architectural documentation, see docs/ARCHITECTURE.md.
Key Components:
- CLI Interface: Typer-based command-line interface
- File Indexer: AST/regex-based code analysis
- LLM Gateway: Multi-provider abstraction (OpenAI, Gemini)
- Database: SQLite-based caching and state management
- Graph Builder: D3.js-powered visualizations
๐ฆ Distribution
Building the Package
# Install build tools
pip install build
# Build wheel and source distribution
python -m build
# Install locally
pip install dist/agentic_doc-1.0.0-py3-none-any.whl
Publishing to PyPI
# Install twine
pip install twine
# Upload to PyPI
twine upload dist/*
๐ค Contributing
Contributions, issues, and feature requests are welcome! See CONTRIBUTING.md for guidelines.
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
Copyright (c) 2025 Ish Kapoor
๐ Support & Troubleshooting
Common Issues
"No symbols with sufficient usage found"
If use-cases returns this error, your dependency index might be empty. Run a forced scan to rebuild it:
agentic-doc scan --force
API Key Errors
Ensure your .env file is in the root directory or configure keys globally:
agentic-doc configure
For other issues, questions, or feature requests, please open an issue on GitHub.
๐ฏ Project Roadmap
โ Completed
- Core documentation generation
- Multi-provider LLM support
- Interactive mindmap visualization
- Dependency analysis
- Incremental documentation
๐ง In Progress
- PyPI package publishing
- Enhanced CLI features
- Performance optimizations
๐ Planned
- Watch mode (auto-regenerate on changes)
- Local LLM support (Ollama, llama.cpp)
- VSCode extension
- Web UI (optional)
- Plugin system
๐ Acknowledgments
Concept, Design, and Development: Ish Kapoor
Built with passion to solve real-world documentation challenges in enterprise software development.
Made with โค๏ธ by Ish Kapoor
Product Manager & Developer
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agentic_aish-1.0.0.tar.gz.
File metadata
- Download URL: agentic_aish-1.0.0.tar.gz
- Upload date:
- Size: 2.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8e3fd0f10abf22fcb8eeda3bea2d4f952303f99c55c99a064b0df1b423b2152d
|
|
| MD5 |
044e4cbb55b55bfba9c7b26e49c0dbd4
|
|
| BLAKE2b-256 |
e7539a555c8e2bb9ca9bc4425aa07c3a69595a23d7da155aa13ee9ff266aa5ab
|
Provenance
The following attestation bundles were made for agentic_aish-1.0.0.tar.gz:
Publisher:
publish.yml on ishkapoor2000/agentic-ai
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agentic_aish-1.0.0.tar.gz -
Subject digest:
8e3fd0f10abf22fcb8eeda3bea2d4f952303f99c55c99a064b0df1b423b2152d - Sigstore transparency entry: 717290288
- Sigstore integration time:
-
Permalink:
ishkapoor2000/agentic-ai@8ba897e8ae93ccaf2b111b366e2793c773f5e8ea -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/ishkapoor2000
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8ba897e8ae93ccaf2b111b366e2793c773f5e8ea -
Trigger Event:
release
-
Statement type:
File details
Details for the file agentic_aish-1.0.0-py3-none-any.whl.
File metadata
- Download URL: agentic_aish-1.0.0-py3-none-any.whl
- Upload date:
- Size: 67.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0cabc28c0097901f49cbcd88d3a288e6460f1117fbe7603a834592c269ed1a8a
|
|
| MD5 |
8071100d140b63dd32f1a58826d4b3ce
|
|
| BLAKE2b-256 |
87f19696c851f6a6a70a38e943d3784de7d84a2d752eb2e2b5ff7080e30dcfc0
|
Provenance
The following attestation bundles were made for agentic_aish-1.0.0-py3-none-any.whl:
Publisher:
publish.yml on ishkapoor2000/agentic-ai
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agentic_aish-1.0.0-py3-none-any.whl -
Subject digest:
0cabc28c0097901f49cbcd88d3a288e6460f1117fbe7603a834592c269ed1a8a - Sigstore transparency entry: 717290327
- Sigstore integration time:
-
Permalink:
ishkapoor2000/agentic-ai@8ba897e8ae93ccaf2b111b366e2793c773f5e8ea -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/ishkapoor2000
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8ba897e8ae93ccaf2b111b366e2793c773f5e8ea -
Trigger Event:
release
-
Statement type: