Skip to main content

AI-powered documentation generator for large codebases with interactive mindmap visualization.

Project description

Agentic Doc - AI-Powered Documentation Generator

Agentic Doc Banner

License: MIT Python 3.10+ Code Style: Black

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 .gitignore support
  • ๐Ÿง  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

Interactive Mindmap Explore your codebase with force-directed graph visualization showing files, functions, and dependencies

CLI in Action

CLI Demo Beautiful terminal output with progress tracking and detailed statistics

System Architecture

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)

  1. Get your free API key: https://makersuite.google.com/app/apikey
  2. Run agentic-doc configure and select Gemini
  3. Enter your API key when prompted

OpenAI (PAID)

  1. Get your API key: https://platform.openai.com/api-keys
  2. Run agentic-doc configure and select OpenAI
  3. 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

  1. Use Gemini (FREE): Google's Gemini models are free for moderate usage
  2. Start small: Use --limit to test on a subset of files
  3. Smart caching: Responses are cached in SQLite
  4. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agentic_aish-1.0.0.tar.gz (2.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agentic_aish-1.0.0-py3-none-any.whl (67.8 kB view details)

Uploaded Python 3

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

Hashes for agentic_aish-1.0.0.tar.gz
Algorithm Hash digest
SHA256 8e3fd0f10abf22fcb8eeda3bea2d4f952303f99c55c99a064b0df1b423b2152d
MD5 044e4cbb55b55bfba9c7b26e49c0dbd4
BLAKE2b-256 e7539a555c8e2bb9ca9bc4425aa07c3a69595a23d7da155aa13ee9ff266aa5ab

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentic_aish-1.0.0.tar.gz:

Publisher: publish.yml on ishkapoor2000/agentic-ai

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for agentic_aish-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0cabc28c0097901f49cbcd88d3a288e6460f1117fbe7603a834592c269ed1a8a
MD5 8071100d140b63dd32f1a58826d4b3ce
BLAKE2b-256 87f19696c851f6a6a70a38e943d3784de7d84a2d752eb2e2b5ff7080e30dcfc0

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentic_aish-1.0.0-py3-none-any.whl:

Publisher: publish.yml on ishkapoor2000/agentic-ai

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page