Skip to main content

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

Project description

🌑 Umbra - The Shadow Architect

Understand any codebase in 30 seconds. AI-powered architecture diagrams that update in real-time as you code.

Python 3.11+ License: MIT Tests

The Problem

As AI accelerates code generation (Cursor, Copilot, etc.), developers lose track of their own architecture. Documentation rots. Diagrams become lies. New team members are lost.

The Solution

Umbra watches your codebase and maintains a living architecture diagram. It uses LLM-powered semantic analysis to understand what changed, not just how.

Save file → Umbra detects → AI analyzes → Diagram updates → You understand

✨ Features

Feature Description
🔍 Smart Detection Differentiates cosmetic refactors from structural changes
📊 Live Diagrams Mermaid.js diagrams that update in real-time
📝 Auto Summary Natural language project summary generated automatically
🌐 HTML Export Standalone interactive HTML files to share
Fast Under 5 seconds per analysis
🔒 Read-Only Never modifies your code

🚀 Quick Start

Installation

pip install umbra-architect

Or with Poetry:

git clone https://github.com/username/umbra.git
cd umbra
poetry install

Setup

# Copy and configure
cp .env.example .env
# Add your GOOGLE_API_KEY to .env

Usage

# Scan & watch a project (recommended)
umbra watch .

# Just scan without watching
umbra scan .

# Export to HTML
umbra export architecture.html

# Skip initial scan (faster startup)
umbra watch . --no-scan

📖 Output Example

When you run umbra watch ., you get:

1. Project Summary

**Type:** FastAPI Backend with RAG Pipeline
**Stack:** Python, PostgreSQL, Google Gemini, Supabase Auth
**Size:** 40 files, 3 main services

### What it does
This project is a document processing API that ingests documents,
processes them with AI, and enables semantic search.

### Key Entry Points
- `main.py` → API Gateway (FastAPI)
- `services/ai.py` → AI Processing Service

### External Dependencies
- Google Gemini API (AI processing)
- PostgreSQL (Data storage)

2. Architecture Diagram

graph LR
    subgraph Core["Core Services"]
        API[API Gateway]
        AI[AI Processing]
        Auth[Authentication]
    end
    
    subgraph External["External APIs"]
        Gemini[Google Gemini]
        Supabase[Supabase Auth]
    end
    
    subgraph Data["Data Stores"]
        DB[(PostgreSQL)]
    end
    
    API --> AI
    API --> Auth
    AI --> Gemini
    AI --> DB
    Auth --> Supabase

🎯 What Gets Detected

✅ Structural Changes ❌ Ignored
Main services/classes Utilities, helpers
External APIs (Stripe, AWS...) Internal libraries
Database connections Comments, docstrings
Message queues Type hints, formatting
Inter-service communication Test files

⚙️ Configuration

Variable Default Description
GOOGLE_API_KEY - Google API key for Gemini
GEMINI_MODEL models/gemini-flash-latest Model to use
OUTPUT_FILE ./output/LIVE_ARCHITECTURE.md Output file
DEBOUNCE_SECONDS 2 Delay before analyzing

🛠️ Commands

Command Description
umbra watch [PATH] Scan then watch for changes
umbra watch . --no-scan Watch only (skip initial scan)
umbra scan [PATH] One-time full project scan
umbra export FILE.html Export to interactive HTML
umbra init Create empty architecture file
umbra validate FILE Validate Mermaid syntax

🔮 Roadmap

  • Multi-language support (JavaScript, TypeScript, Go)
  • VS Code Extension
  • CI/CD Integration (generate on PR)
  • Team collaboration features

🧪 Development

# Run tests
poetry run pytest

# Lint
poetry run ruff check umbra/

# Format
poetry run ruff format umbra/

📜 License

MIT License - see LICENSE for details.


Built with 🖤 for developers who want to understand their code.

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

umbra_architect-0.1.0.tar.gz (21.2 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.1.0-py3-none-any.whl (26.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: umbra_architect-0.1.0.tar.gz
  • Upload date:
  • Size: 21.2 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.1.0.tar.gz
Algorithm Hash digest
SHA256 10c75eaf979296b6f9546ff4ff5fcd519f975c1e72032a4f1c7c9530934cb146
MD5 b1b86ddd48da83571c3a148e057cc292
BLAKE2b-256 c7a624525c26b2cce3550b084789e5e844f9d79eb3ab72216be545d20174e967

See more details on using hashes here.

File details

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

File metadata

  • Download URL: umbra_architect-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 26.4 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0f1a076a71368a6c248de1961a2e0d758d56ae3358f7e2808c76b261e948145b
MD5 246cb740007f72645e744f69d4f9301e
BLAKE2b-256 4344bca1c8e52a7ce962d16a75fdf6c0d9c9741e3d38548dce7437f657b331df

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