DiageniX - AI Code Diagram Generator

Transform your code into beautiful, AI-generated diagrams instantly! DiageniX uses Google Gemini AI to analyze your codebase and create professional Mermaid diagrams including flowcharts, class diagrams, database schemas, API maps, and architecture diagrams.
✨ Features
- 🤖 AI-Powered Analysis: Leverages Google Gemini 3 Pro for intelligent code understanding
- 📊 6 Diagram Types: Flowcharts, class diagrams, database schemas, API diagrams, architecture views, and project analysis
- 🎨 Beautiful Visualizations: Generates clean, professional Mermaid.js diagrams
- 🚀 Multi-Language Support: Works with Python, JavaScript, TypeScript, and more
- ⚡ Instant Generation: Get diagrams in seconds, not hours
- 🔧 Easy Integration: Works directly in VS Code with simple commands
📦 Installation
Step 1: Install the Extension
- Open VS Code
- Go to Extensions (Ctrl+Shift+X / Cmd+Shift+X)
- Search for "DiageniX"
- Click Install
Or install via command line:
code --install-extension mostafa-diagenix.diagenix
Step 2: Install DiageniX CLI
The extension requires the DiageniX Python package:
pip install diagenix
Or if you have the source code:
cd /path/to/DiageniX
pip install -e .
Step 3: Get Your Google Gemini API Key
- Visit Google AI Studio
- Sign in with your Google account
- Click "Create API Key"
- Copy your API key
- Open VS Code Settings (Ctrl+, / Cmd+,)
- Search for "DiageniX"
- Paste your Gemini API key in the
diagenix.geminiApiKey field
Or add to your settings.json:
{
"diagenix.geminiApiKey": "your-api-key-here"
}
🚀 Usage
Available Commands
Open Command Palette (Ctrl+Shift+P / Cmd+Shift+P) and type "DiageniX":
1. Analyze Project Structure
DiageniX: Analyze Project Structure
- Analyzes your project's technology stack
- Shows file statistics and languages used
- Identifies frameworks and databases
- Generates project structure diagram
2. Generate Flowchart
DiageniX: Generate Flowchart
- Enter a function or class name
- Visualizes code logic and control flow
- Shows decision branches and execution paths
3. Generate Class Diagram
DiageniX: Generate Class Diagram
- Creates UML class diagrams
- Shows classes, methods, and attributes
- Displays inheritance and relationships
4. Generate Database Schema
DiageniX: Generate Database Schema
- Maps database tables and relationships
- Supports SQLAlchemy, Django, Prisma, Sequelize
- Auto-detects ORM framework
5. Generate API Diagram
DiageniX: Generate API Diagram
- Documents REST/GraphQL endpoints
- Shows API structure and routes
- Supports FastAPI, Flask, Express, Django
6. Generate Architecture Diagram
DiageniX: Generate Architecture Diagram
- Creates high-level system architecture
- Shows components and their interactions
- Supports C4, component, and deployment diagrams
📊 Example Output
DiageniX generates Mermaid diagrams that render beautifully in VS Code:
flowchart TD
Start([Start]) --> Input[Get User Input]
Input --> Validate{Valid?}
Validate -->|Yes| Process[Process Data]
Validate -->|No| Error[Show Error]
Process --> Save[Save to Database]
Save --> End([End])
Error --> End
🛠️ Supported Languages
- ✅ Python
- ✅ JavaScript
- ✅ TypeScript
- ✅ Java
- ✅ Go
- ✅ Rust
- ✅ PHP
- ✅ Ruby
- ✅ SQL
⚙️ Configuration
| Setting |
Description |
Default |
diagenix.geminiApiKey |
Your Google Gemini API key |
"" |
🔧 Requirements
- VS Code 1.80.0 or higher
- Python 3.11 or higher
- DiageniX Python package (
pip install diagenix)
- Google Gemini API key (free tier available)
- Internet connection for AI processing
📝 How It Works
- You run a command in VS Code
- Extension calls DiageniX CLI with your project path
- DiageniX analyzes your code using tree-sitter parsers
- Gemini AI generates diagram based on code structure
- Result displayed in a new VS Code document
🐛 Troubleshooting
"DiageniX is not installed"
Install the Python package:
pip install diagenix
Add your API key in VS Code settings:
- Open Settings (Ctrl+,)
- Search for "diagenix"
- Enter your API key
"No workspace folder open"
Open a folder or workspace in VS Code before running commands.
Command takes too long
- Large projects may take 10-30 seconds
- Check your internet connection
- Verify your API key is valid
🤝 Contributing
Found a bug or have a feature request?
📄 License
MIT License - see LICENSE for details
🌟 Support
🎉 Acknowledgments
Made with ❤️ by the DiageniX Team
Marketplace • GitHub • Documentation