The Shadow Architect - AI-powered live architecture diagrams that update as you code
Project description
๐ Umbra
The Shadow Architect
AI-powered architecture diagrams that update in real-time as you code.
Problem โข Solution โข Quick Start โข Features โข Demo
๐ฐ The Problem
You're using Cursor, Copilot, or ChatGPT to write code faster than ever. But there's a catch:
You no longer understand your own codebase.
- Documentation is always outdated
- Architecture diagrams are lies
- New team members are lost
- You forgot what that service does
๐ก The Solution
Umbra watches your code and maintains a living architecture diagram that updates automatically.
Save file โ Umbra detects โ AI analyzes โ Diagram updates
No more manual documentation. No more outdated diagrams. Just code.
๐ Quick Start
1. Install
pip install umbra-architect
2. Configure
Get a free API key from Google AI Studio, then:
# Set your API key
export GOOGLE_API_KEY="your-api-key"
# Or create a .env file in your project
echo "GOOGLE_API_KEY=your-api-key" > .env
3. Run
cd your-project
umbra watch .
That's it! Open output/LIVE_ARCHITECTURE.md to see your architecture.
โจ Features
| Feature | Description |
|---|---|
| ๐ง Knowledge Base | UMBRA_KNOWLEDGE.md - Single file = Full project context for any LLM |
| ๐ Smart Analysis | AI understands semantic changes, not just syntax |
| ๐ Live Diagrams | Mermaid.js diagrams update in real-time |
| ๐ฌ Ask Umbra | Chat with your codebase in natural language |
| ๐ฅ Health Score | Get an A-F grade for your architecture |
| โ ๏ธ Auto Insights | Detect god files, high coupling, issues |
| ๐ Security Scan | Auto-detect vulnerabilities (SQL injection, secrets, etc.) |
| ๐ Auto-Docs | Generate module documentation automatically |
| ๐จ Modern Dashboard | Beautiful glassmorphism UI with Bento grid |
| ๐ Auto Summary | Natural language project description |
| ๐ Recent Changes | AI-powered descriptions with detailed diffs |
| ๐ Search (Ctrl+K) | Command palette to search your codebase |
| ๐ฅ SVG Export | Download diagrams in vector format |
| ๐ Python Support | Full Python codebase analysis |
| โ๏ธ JS/TS Support | React, Next.js, Express, and more |
๐ฌ Demo
Before: 40 files, no clue what's happening
my-project/
โโโ src/
โ โโโ services/
โ โ โโโ auth.py
โ โ โโโ payments.py
โ โ โโโ notifications.py
โ โ โโโ ...20 more files
โ โโโ api/
โ โโโ utils/
โโโ ???
After: Clear architecture in seconds
graph LR
subgraph Core["Core Services"]
API[API Gateway]
Auth[Authentication]
Payments[Payments]
end
subgraph External["External APIs"]
Stripe[Stripe]
Firebase[Firebase Auth]
end
subgraph Data["Data Stores"]
DB[(PostgreSQL)]
end
API --> Auth
API --> Payments
Auth --> Firebase
Payments --> Stripe
Payments --> DB
Plus a human-readable summary:
Type: FastAPI Backend
Stack: Python, PostgreSQL, Stripe, Firebase
What it does: E-commerce API with authentication and payment processing
๐ Commands
| Command | Description |
|---|---|
umbra watch . |
๐ All-in-one: Scan + Docs + Security + Watch + Chat Server + Dashboard |
umbra watch . --open |
Same as above, auto-opens dashboard in browser |
umbra watch . --no-scan |
Skip initial scan, only watch for changes |
umbra watch . --no-docs |
Skip module documentation generation |
umbra watch . --no-security |
Skip security vulnerability scan |
umbra ask |
๐ฌ Chat with your codebase (interactive) |
umbra ask -q "How does auth work?" |
Ask a single question |
umbra insights |
๐ฅ Show health score & issues |
umbra dashboard report.html |
๐จ Export stunning HTML dashboard |
umbra scan . |
One-time full scan (no watch) |
umbra export report.html |
Simple HTML export |
Output Files
| File | Purpose |
|---|---|
output/LIVE_ARCHITECTURE.md |
Architecture diagram + recent changes |
output/UMBRA_KNOWLEDGE.md |
Full project brain - Everything an LLM needs |
output/dashboard.html |
Interactive visualization dashboard |
๐ ๏ธ Configuration
Create a .env file in your project:
GOOGLE_API_KEY=your-api-key
GEMINI_MODEL=models/gemini-flash-latest
OUTPUT_FILE=./output/LIVE_ARCHITECTURE.md
DEBOUNCE_SECONDS=2
๐ค How It Works
- Watch - Monitors your files for changes (Python, JS, TS)
- Analyze - AI determines if the change is structural or cosmetic
- Update - Only structural changes update the diagram
- Visualize - Mermaid diagram renders in VS Code or browser
What's "structural"?
| โ Updates Diagram | โ Ignored |
|---|---|
| New service class | Renaming variables |
| External API call | Adding comments |
| Database connection | Formatting code |
| Inter-service communication | Test files |
๐บ๏ธ Roadmap
Current (v0.6) - "Second Brain" Release
- Python support
- JavaScript/TypeScript support
- Project summaries
- HTML export
- Ask Umbra - Chat with your codebase
- Health Score - Architecture quality grading
- Insights - Automatic issue detection
- Modern Dashboard - Glassmorphism UI with Bento grid
- Hybrid Mode - Watch + Chat server + Auto-refresh
- Recent Changes - AI-powered change tracking with detailed diffs
- Search (Ctrl+K) - Command palette search
- SVG Export - Download diagrams
- Knowledge Base -
UMBRA_KNOWLEDGE.md= Full project brain for LLMs - Auto-Documentation - Module docs generated automatically
- Security Scanner - Detect vulnerabilities automatically
- API Reference - Auto-generated function/class reference
Coming Soon
- Intent Detection - Classify changes as Bug Fix / Feature / Refactor
- Session Timeline - Chronological view of coding sessions
- Quality Monitoring - Track code metrics over time
- Pattern Detection - Detect AI assistant patterns
- Git Integration - AI analysis alongside git diff
- VS Code extension
- CI/CD integration (generate on PR)
- More languages (Go, Rust, Java)
- Click on diagram nodes to view file
Future Vision
- Rollback Warnings - "This change broke X tests"
- Dependency Alerts - "New dependency added"
- Team Collaboration - Share architecture across team
๐ค Contributing
Contributions are welcome! See CONTRIBUTING.md for guidelines.
# Clone
git clone https://github.com/rida12b/Umbra.git
cd Umbra
# Install
poetry install
# Test
poetry run pytest
๐ License
MIT License - see LICENSE for details.
Stop documenting. Start understanding.
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
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 umbra_architect-0.7.0.tar.gz.
File metadata
- Download URL: umbra_architect-0.7.0.tar.gz
- Upload date:
- Size: 62.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.13.7 Windows/11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
830ea4a71f8b4256141ac31a4fd43b436c3046376f6b3d691a8fcee74c35434b
|
|
| MD5 |
33980dcd4639ffaa5f667d0f5319af7b
|
|
| BLAKE2b-256 |
66fb71b79b23431f44e6b372a178524769c317b30f733108070aae7c88344308
|
File details
Details for the file umbra_architect-0.7.0-py3-none-any.whl.
File metadata
- Download URL: umbra_architect-0.7.0-py3-none-any.whl
- Upload date:
- Size: 69.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.13.7 Windows/11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6feb1178d78dccf37858b2e1779156bc3b63169f1af584e233cbba0cf61babe2
|
|
| MD5 |
5a75fdb95ec6aff4247163bdaf0f46ba
|
|
| BLAKE2b-256 |
f87981eec87c0afe19cf7eae17eaefeccd4d08366a2b1fec3834554c0cd32eef
|