Skip to main content

The Shadow Architect - AI-powered live architecture diagrams that update as you code

Project description

Umbra Logo

๐ŸŒ‘ Umbra

The Shadow Architect
AI-powered architecture diagrams that update in real-time as you code.

PyPI Downloads License Stars

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
๐Ÿ” 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
๐ŸŽจ Dashboard Beautiful interactive HTML reports
๐Ÿ“ Auto Summary Natural language project description
๐Ÿ 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 . Scan project + watch for changes
umbra ask ๐Ÿ’ฌ Chat with your codebase
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
umbra export report.html Simple HTML export

๐Ÿ› ๏ธ 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

  1. Watch - Monitors your files for changes (Python, JS, TS)
  2. Analyze - AI determines if the change is structural or cosmetic
  3. Update - Only structural changes update the diagram
  4. 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.4)

  • Python support
  • JavaScript/TypeScript support
  • Project summaries
  • HTML export
  • Ask Umbra - Chat with your codebase
  • Health Score - Architecture quality grading
  • Insights - Automatic issue detection
  • Dashboard - Beautiful HTML reports

Coming Soon

  • VS Code extension
  • CI/CD integration (generate on PR)
  • More languages (Go, Rust, Java)

Future Vision

  • AI Code Analysis - Find bugs and issues automatically
  • Auto-Fix Suggestions - AI-powered code corrections
  • 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.

โญ Star us on GitHub

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

umbra_architect-0.4.0.tar.gz (30.9 kB view details)

Uploaded Source

Built Distribution

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

umbra_architect-0.4.0-py3-none-any.whl (36.3 kB view details)

Uploaded Python 3

File details

Details for the file umbra_architect-0.4.0.tar.gz.

File metadata

  • Download URL: umbra_architect-0.4.0.tar.gz
  • Upload date:
  • Size: 30.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.13.7 Windows/11

File hashes

Hashes for umbra_architect-0.4.0.tar.gz
Algorithm Hash digest
SHA256 4f46b3701df1bb96c24d2c1fe78805df1cb625d68f0b4757798ba671a47f2c0f
MD5 66b51d13ba01ddfbbe883606efb4071b
BLAKE2b-256 815c466a16c07c8377bd9e16cd9dfa8fb715c25bb84198483989e42246d226aa

See more details on using hashes here.

File details

Details for the file umbra_architect-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: umbra_architect-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 36.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.13.7 Windows/11

File hashes

Hashes for umbra_architect-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3d26656c9a6fa21dacbe81fe3d61e4d94def4ba8f164b283e5805346193dbe30
MD5 d9535a61b847d4cf00f9ae32662fc279
BLAKE2b-256 4a3687b122cbacc3d2f62746c2c54a1d34ae352dd18367b4922139ba0bf7e1e2

See more details on using hashes here.

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