Aegis

Aegis πŸ›‘οΈ

CI Release License: MIT Docs

Aegis is production operations from your terminal. Zero-dependency, event-sourced process supervision and zero-downtime deployment platform written in Rust.

curl -fsSL https://raw.githubusercontent.com/shivam411/Aegis/main/install.sh | bash

✨ Features

Feature Description
⚑ Zero-Dependency Single daemon binary with embedded SQLite. No PostgreSQL, Redis, or Docker required.
πŸš€ Zero-Downtime Deployments Build in isolation, health-check, atomically switch. Live traffic is never interrupted.
🧹 Automated Version Retention Keeps the last N releases on disk (default: 2). Older versions auto-pruned after each deploy.
⏰ Scheduled Auto-Deployments Background scheduler triggers builds at specific daily hours (e.g. 02:00 AM).
πŸ› οΈ Polyglot Runtime Detection Auto-detects Node.js, Rust, Go, Python, Bun, Deno from project files.
πŸ–₯️ Terminal UI (TUI) Real-time interactive dashboard powered by ratatui + crossterm.
πŸ”’ Event-Sourced Audit Trail Every mutation is an immutable domain event. Full replay on startup.
πŸ”„ Instant Rollbacks Roll back to any previous release without rebuilding from source.
πŸ”Œ Plugin System Extensible event bus with Slack, GitHub, and webhook integrations.

πŸ“¦ Installation

One-Line Installer (Linux & macOS)

curl -fsSL https://raw.githubusercontent.com/shivam411/Aegis/main/install.sh | bash

The installer automatically detects your OS and CPU architecture, downloads the latest release from GitHub, and installs to ~/.local/bin/.

Manual Download

Download the latest binary for your platform from GitHub Releases:

Platform Archive
Linux x86_64 aegis-linux-amd64.tar.gz
Linux ARM64 aegis-linux-arm64.tar.gz
macOS x86_64 aegis-darwin-amd64.tar.gz
macOS ARM64 (Apple Silicon) aegis-darwin-arm64.tar.gz
Windows x86_64 aegis-windows-amd64.zip
tar -xzf aegis-linux-amd64.tar.gz
mv aegis-daemon aegis-cli aegis-tui ~/.local/bin/

Build from Source

git clone https://github.com/shivam411/Aegis.git
cd Aegis
cargo build --release
cp target/release/aegis-daemon target/release/aegis-cli target/release/aegis-tui ~/.local/bin/

Requires Rust 1.75+, SQLite3, and protoc.


πŸš€ Quickstart

# 1. Initialize project in your repository
aegis init

# 2. Verify project configuration
aegis validate

# 3. Trigger zero-downtime deployment
aegis deploy

# 4. Investigate outages & root cause
aegis investigate

# 5. Execute instant rollback if needed
aegis rollback

For an interactive 2-minute tour, run: aegis demo. See the public operational metrics on the Public Scorecard.


πŸ“Š Feature Maturity & Empirical Evidence

Every capability in Aegis is assigned a Feature Maturity Level:

Feature / Capability Maturity Level Empirical Validation Report
Event Store & Event Bus 🟒 Dogfooded validation/dogfood/dogfood-report.md
Detector Pipeline 🟑 Validated validation/compatibility/compatibility-report.md
Runtime Supervisor Engine 🟑 Validated validation/soak/72h-report.md
Atomic Release Switcher 🟑 Validated validation/chaos/chaos-report.md
PM2 & Systemd Migration Engine 🟑 Validated validation/migration/migration-report.md
Deployment Replay (aegis replay) πŸ§ͺ Experimental docs/proof_phase.md
Time Travel Inspection (aegis inspect --at) πŸ§ͺ Experimental docs/proof_phase.md
Outage Investigation Engine (aegis investigate) πŸ§ͺ Experimental docs/proof_phase.md

For complete empirical evidence, see the validation/ evidence repository.


πŸ—οΈ Architecture

Aegis follows CQRS-Lite event-sourcing principles. Commands mutate state by appending immutable events to SQLite. The EventBus broadcasts events to the ProjectionEngine for fast in-memory TUI rendering.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”       Command       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  CLI / TUI /    β”‚ ──────────────────► β”‚ Aegis Daemon β”‚
β”‚  Git Webhooks   β”‚                     β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                            β”‚
                                        (Emits Event)
                                               β–Ό
                                      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                                      β”‚    Event Bus    β”‚
                                      β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β–Ό                          β–Ό                          β–Ό
          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
          β”‚    Event Store    β”‚      β”‚ Projection Engine β”‚      β”‚  Plugin Manager   β”‚
          β”‚    (SQLite DB)    β”‚      β”‚(In-Memory Caches) β”‚      β”‚  (Slack / GitHub) β”‚
          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

7-Stage Build Pipeline

Clone β†’ Install β†’ Build β†’ Test β†’ Package β†’ Verify β†’ Promote

Each stage runs in an isolated build directory. If any stage fails, the live version remains untouched.

For a deep dive, see the Architecture Documentation.


πŸ’» CLI Reference

Command Description
aegis-cli status Query daemon health and version
aegis-cli init Initialize a project with runtime auto-detection
aegis-cli deploy Trigger a zero-downtime deployment
aegis-cli schedule Configure daily auto-deployment (--hour 0-23)
aegis-cli rollback Roll back to a previous release version
aegis-cli list List active projects and running processes
aegis-cli logs Tail real-time process logs
aegis-cli stop Gracefully stop a process
aegis-cli restart Restart a monitored process
aegis-cli emit-event Emit a custom event to the event store
aegis-cli stream-events Stream live event bus notifications

βš™οΈ Configuration

Aegis reads aegis.toml from the working directory:

[daemon]
host = "127.0.0.1"
port = 50051
database_path = "aegis.db"
log_level = "info"
max_retained_versions = 2

πŸ—ΊοΈ Product Roadmap & Production Themes

[!NOTE] Aegis is currently in Beta Readiness (v0.4.0-beta). New architectural changes follow the RFC Process.

Production Theme Key Focus & Customer Outcome Status
Theme 1: Production Reliability Crash recovery, health verification, restart backoff, rollback safety (slo_targets.md) βœ… Complete
Theme 2: Production Visibility Live dashboard, deployment timeline, event explorer, incident diagnosis (aegis incident) β–Ά In Progress
Theme 3: Production Automation GitHub Actions CI/CD, auto-deploy, scheduled auto-deploys, environment promotion πŸ“… Planned
Theme 4: Production Fleet Multi-node rolling deployments, node agent coordination, fleet management πŸ“… Planned

πŸ› οΈ Development

git clone https://github.com/shivam411/Aegis.git
cd Aegis

cargo check --workspace          # Compile check
cargo test --workspace           # Run all tests
cargo clippy --workspace         # Lint
cargo fmt --all                  # Format

Repository Layout

Aegis/
β”œβ”€β”€ core/           # Daemon, config, event store, projection, scheduler
β”œβ”€β”€ deployment/     # Release, builder, strategy, health, rollback
β”œβ”€β”€ runtime/        # Process supervisor, polyglot engine, logs
β”œβ”€β”€ git/            # Repository operations, webhooks
β”œβ”€β”€ ui/             # CLI (clap + tonic), TUI (ratatui + crossterm)
β”œβ”€β”€ integrations/   # Slack, GitHub, Docker plugins
β”œβ”€β”€ docs/           # Documentation (GitHub Pages)
β”œβ”€β”€ scripts/        # Install/uninstall helpers
β”œβ”€β”€ install.sh      # One-line installer
└── .github/        # CI, release, and pages workflows

πŸ“„ License

Licensed under the MIT License.

Built with ❀️ in Rust.