Observed since 21 Oct, 09:50 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
AI-powered CLI agent for codebase analysis and documentation generation using Databricks AI models
An AI-powered CLI tool for codebase analysis and documentation generation using Databricks AI models. This tool helps you understand existing projects and create comprehensive technical and business documentation.
Developed by Hossam Tabana
This is the private development repository. The tool is distributed via PyPI (Python Package Index).
PyPI Package: https://pypi.org/project/aiagent-2025/
End-user installation (recommended for users):
uv tool install aiagent-2025
That's it! Just 3 words - no long URLs needed.
This project uses PyPI distribution to protect source code while enabling public distribution:
Key files:
pyproject.toml: Package name (aiagent) and version (line 3)PYPI_SETUP_GUIDE.md: One-time PyPI account setup and first uploadPYPI_RELEASE_GUIDE.md: Workflow for releasing new versions to PyPIgithub_public/: Optional documentation files for public GitHub repo
README.md: User-facing documentationCHANGELOG.md: Version historyFor releasing new versions, see PYPI_RELEASE_GUIDE.md.
For initial PyPI setup, see PYPI_SETUP_GUIDE.md.
uvx (Recommended for one-time use)# Run directly without installation
uvx aiagent-cli understand
# Or install from source
uvx --from /path/to/aiagent_claude aiagent understand
uv (For persistent installation)# Install as a tool
uv tool install aiagent-cli
# Or install from source
uv tool install /path/to/aiagent_claude
# Then use it
aiagent understand
# Clone the repository
cd /path/to/aiagent_claude
# Install dependencies with uv
uv pip install -e .
# Run the CLI
python -m aiagent_cli.main --help
🎨 Interactive Menu Mode (Recommended for beginners)
Simply run aiagent without any arguments to launch an interactive menu:
aiagent
You'll see a beautiful menu where you can:
⚡ Direct Command Mode (For advanced users and automation)
Run specific commands directly:
aiagent configure
aiagent project-brief # Optional but recommended
aiagent understand
aiagent create-documentation
aiagent create-business-documentation
You can configure Databricks authentication in three ways:
Option 1: Interactive Menu (Easiest)
aiagent # Select option 1 from the menu
Option 2: Run configure command explicitly
aiagent configure
Option 3: Let the tool prompt you automatically on first use
aiagent understand # Will prompt for credentials if not configured
You'll be asked to provide:
https://your-workspace.cloud.databricks.com/serving-endpoints)Credential Storage (Cross-Platform):
~/.config/aiagent/config.json%USERPROFILE%\.config\aiagent\config.jsonProvide context about your project to improve analysis accuracy and prevent hallucination:
# Create brief for current directory
aiagent project-brief
# Create brief for specific project
aiagent project-brief --project-path /path/to/project
What is a Project Brief?
A project brief answers 3 quick questions about your project:
Why is it important?
Example Brief:
What is this project about?
→ A web application for tracking customer orders and inventory
What problem does it solve?
→ Reduces manual order processing time by 80% and prevents inventory errors
Who are the target users?
→ Warehouse staff, inventory managers, and customer service teams
The brief is stored in .aiagent/project-brief.json and automatically used by all analysis and documentation commands.
Tips:
Analyze your project and build a knowledge base:
# Analyze current directory
aiagent understand
# Analyze specific project
aiagent understand --project-path /path/to/project
# The tool uses your default AI model
# To change the model, use the interactive menu (option 5) or change it via configuration
This command:
.aiagent/knowledge.mdCreate comprehensive technical documentation with architecture diagrams:
# Generate technical docs (uses your default AI model)
aiagent create-documentation
Generates:
.aiagent/technical-documentation.md - Detailed technical documentation.aiagent/architecture.md - Architecture-focused documentationCreate business-friendly documentation for stakeholders with intelligent questioning:
# Generate business docs
aiagent create-business-documentation
This command uses smart AI reasoning to:
.aiagent/business-documentation.md.aiagent/business-mappings.jsonSmart Features:
aiagent configureConfigure or update Databricks authentication credentials.
Usage:
aiagent configure
This command:
When to use:
aiagent project-briefCreate or update a project brief to improve analysis accuracy and prevent AI hallucination.
Usage:
aiagent project-brief
aiagent project-brief --project-path /path/to/project
Options:
--project-path, -p PATH: Path to project directory (default: current directory)What it does:
.aiagent/project-brief.jsonunderstand, create-documentation, and create-business-documentationWhy it's important:
When to use:
configure, before understand (recommended)Note: This is optional but highly recommended for enterprise projects.
aiagent understandPerform deep analysis of the project and build internal knowledge base.
Options:
--project-path, -p PATH: Path to project directory (default: current directory)--model, -m MODEL: AI model to use (optional - uses your configured default)Available AI Models:
Note: Change your default model anytime via the interactive menu (option 5) or using aiagent and selecting "Change Model"
aiagent create-documentationGenerate comprehensive technical documentation with Mermaid diagrams.
Options:
--project-path, -p PATH: Path to project directory (default: current directory)--model, -m MODEL: AI model to use (optional - uses your configured default)Prerequisites: Must run aiagent understand first.
aiagent create-business-documentationGenerate business-level documentation with no technical jargon using intelligent questioning.
Options:
--project-path, -p PATH: Path to project directory (default: current directory)--model, -m MODEL: AI model to use (optional - uses your configured default)Prerequisites: Must run aiagent understand first.
Smart Interactive Process:
your-project/
├── .aiagent/
│ ├── project-brief.json # Project context (from 'project-brief') - OPTIONAL
│ ├── knowledge.md # Codebase analysis (from 'understand')
│ ├── technical-documentation.md # Technical docs (from 'create-documentation')
│ ├── architecture.md # Architecture docs (from 'create-documentation')
│ ├── business-documentation.md # Business docs (from 'create-business-documentation')
│ ├── business-mappings.json # Term mappings (from 'create-business-documentation')
│ └── analysis_cache.db # Cache for incremental analysis
├── src/
├── ... (your code)
Credentials and settings are stored in:
aiagent-cli, key: databricks-token)
keyring library~/.config/aiagent/config.json%USERPROFILE%\.config\aiagent\config.jsonworkspace_url and default_modelYou can change the default model:
--model flagThe tool automatically:
.gitignore patternsnode_modules, venv, .git, build, etc.Supported file types:
.py, .js, .ts, .java, .go, .rs, .c, .cpp, etc..html, .css, .scss, .vue, .svelte.json, .yaml, .toml, .xml.md, .rst.sqlSmart File Prioritization: The tool automatically prioritizes files for analysis:
main.py, app.py, index.js, etc.)setup.py, package.json, Dockerfile, etc.)Skipped Files:
.generated., _pb2., protobuf files)Parallel Processing:
Incremental Analysis with Caching:
.aiagent/analysis_cache.dbSemantic Code Chunking:
Large Codebase Handling:
# Launch interactive menu
aiagent
# You'll see:
# ╭──────────────────────────────────────────────────────╮
# │ 🤖 AI Agent CLI │
# │ Version 0.1.0 │
# │ │
# │ AI-powered codebase analysis and documentation │
# │ Current Model: Advanced Model │
# │ │
# │ Developed by Hossam │
# ╰──────────────────────────────────────────────────────╯
#
# 1 ⚙️ Configure Set up Databricks authentication
# 2 📋 Project Brief Describe your project for better analysis
# 3 🔍 Understand Analyze codebase and build knowledge base
# 4 📝 Create Docs Generate technical documentation
# 5 💼 Business Docs Generate business documentation
# 6 🎯 Change Model Select default AI model
#
# 0 🚪 Exit Quit the application
#
# Select an option (0-6):
# 0. First-time setup: Configure authentication
aiagent configure
# 1. Provide project context (optional but recommended)
cd my-project
aiagent project-brief
# Answer 3 quick questions about your project
# 2. Analyze your codebase
aiagent understand
# 3. Generate technical documentation
aiagent create-documentation
# 4. Generate business documentation
aiagent create-business-documentation
# 5. Review generated docs
ls -la .aiagent/
cat .aiagent/technical-documentation.md
# Launch interactive menu
aiagent
# Select option 5 "Change Model"
# Choose from:
# 1. Advanced Model (best for sophisticated analysis)
# 2. Creative Model (optimized for creative tasks)
# 3. Analytics Model (specialized for analytical work)
# Your choice persists across all subsequent operations
# Analyze a different project
aiagent understand --project-path ~/other-project
# Generate docs for it
aiagent create-documentation --project-path ~/other-project
Your Databricks token may be expired. The tool will prompt you to reconfigure. Or manually update by deleting credentials and running again:
# On macOS/Linux
rm ~/.config/aiagent/config.json
# Token will be cleared from keyring on next run
aiagent understand # Will prompt for new credentials
You need to run aiagent understand before generating documentation:
aiagent understand
aiagent create-documentation
If you hit rate limits, the tool will automatically retry with exponential backoff (3 attempts). If issues persist, wait a few minutes before trying again.
The tool is optimized for large codebases (1000+ files):
.aiagent/analysis_cache.dbPerformance Tips:
rm .aiagent/analysis_cache.dbIf you experience issues with cached analysis:
# Clear analysis cache
rm -f .aiagent/analysis_cache.db
# Re-run analysis
aiagent understand
The cache stores file analysis results and is safe to delete. It will be automatically rebuilt on the next run.
The tool is built for professional use with enterprise-grade features to ensure complete, accurate documentation:
Prevents documentation truncation through intelligent continuation:
finish_reason='length')Optimized for Databricks API limits:
These conservative limits ensure reliability and enable seamless continuation without rate limiting.
Professional retry logic with exponential backoff:
Prevents AI from inventing details not present in your code:
Example: If you provide a SQL file, the AI will only describe the SQL logic - it won't hallucinate about Apache Airflow orchestration or Databricks Workflows unless those appear in your actual codebase.
Every generated document includes a verification footer:
---
**Document completed by AI Agent CLI developed by Hossam. Thank you for using it!**
What Completion Means:
Enterprise Benefits:
# Clone and install
git clone <repo-url>
cd aiagent_claude
# Install with dev dependencies
uv pip install -e ".[dev]"
# Run tests
pytest
# Format code
black src/ tests/
# Lint
ruff check src/ tests/
aiagent_claude/
├── src/
│ └── aiagent_cli/
│ ├── __init__.py # Package initialization
│ ├── main.py # CLI entry point
│ ├── auth.py # Authentication & token management
│ ├── databricks.py # Databricks AI client wrapper
│ ├── scanner.py # File scanning with .gitignore support
│ ├── analyzer.py # Codebase analysis
│ └── generator.py # Documentation generation
├── tests/ # Test suite
├── pyproject.toml # Project configuration
├── README.md # This file
└── LICENSE # MIT License
MIT License - See LICENSE file for details.
Contributions are welcome! This is an initial implementation with room for expansion:
Built with ❤️ using Databricks AI for intelligent codebase analysis and documentation generation.
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.1.4 | 21 Nov 2025 | 12 |
This describes our collected data; it is not a security assessment.
Shared repository data · GitHub
Public sponsor counts have not been collected. These signals belong to the repository owner.
github · 1 observations shown. Missing days are unknown.
| Date / source period | Value | Observed at |
|---|---|---|
| 2026-10-21 | 0 | 2026-10-21T19:01:59.6416750Z |
Observed since 21 Oct, 09:50 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:791a0574ec81b38838dac161329ae8d28c22cc0148d9a988f30703069bd999c3