Skip to content

Repository files navigation

⚑ EKO

The Next-Gen High-Performance CAS & AI-Powered Developer Time Machine

Build Status Open Issues Go Version License

Instant zero-staging local snapshots, 11.4x faster warm saves than Git, Content-Addressable Storage (CAS), and 20 built-in AI GitMind reasoning capabilities.

Explore Documentation β€’ CLI Reference β€’ Architecture Diagram


🌟 Why Eko over Traditional Git?

Git was built for Linux kernel patch workflows in 2005. Eko is built for 2026 AI-assisted developer workflows.

Feature 🐒 Traditional Git ⚑ Eko CAS & GitMind Engine
Warm Save Speed ~31.4 ms / commit πŸš€ ~2.71 ms / save (11.4x faster)
Restore Speed (1,000 files) ~91.6 ms (git stash pop) πŸš€ ~27.6 ms (Differential Smart Restore)
Loose Object Bloat High loose files until git gc πŸ“¦ Zero bloat (Instant gzip CAS blobs)
Shell Env Capture ❌ Lost (export PORT, API keys) 🟒 Captured per snapshot into .eko_env_restore.sh
Query Latency Sequential DAG traversal (~5.2ms) ⚑ Indexed SQLite (<0.8ms query speed)
AI Integration ❌ None πŸ€– 20 Native eko ai developer reasoning commands

πŸ€– The eko ai GitMind Intelligence Suite

Eko introduces GitMind, an architecture-aware AI reasoning engine that turns commit histories and workspace diffs into actionable developer intelligence.

# 1. Intent-Based Status & Role Analysis
$ eko ai status

πŸ€– AI Workspace Status
──────────────────────────────────────────────────
🎯 Intent: Refactored Kubernetes ProjectRelease lifecycle and finalizer cleanup.

Files:
  βœ“ internal/controller/project.go    (Go core logic & handlers)
  βœ“ internal/service/release.go       (Cleanup implementation)
  βœ“ internal/controller/test.go       (Added regression test)

πŸ’‘ Suggested Next Step:
  β†’ Run: go test -v ./internal/controller/...

🧠 11 Essential eko ai Commands

eko ai review     # Pre-commit code review & risk score (0-100)
eko ai semdiff    # Behavioral semantic diff (diffs behavior, not lines)
eko ai risk       # 5-Area commit risk matrix (Database, Auth, API, Tests, Config)
eko ai impact     # Subsystem change impact graph & recommended test suites
eko ai bisect     # Automated AI regression bug isolation
eko ai ask        # Query repository architecture memory
eko ai security   # Hardcoded secret & credential leak scanner
eko ai gate       # Pre-commit quality gate evaluation
eko ai explain    # File purpose, architecture role, & risk explanation
eko ai test       # Auto-generates testing strategies derived from workspace diffs
eko ai pr         # Generates GitHub Pull Request Markdown descriptions

⚑ Quick Start

1. Installation

# Clone repository
git clone https://github.com/kavix/eko.git
cd eko

# Build single static Go binary
go build -o eko main.go

2. Basic Workflow

# Initialize Eko in any directory
eko init

# Save a instant local snapshot (with optional AI summary)
eko save -m "Refactored payment gateway handler" --ai

# Assign a human-readable tag/alias
eko tag 8c9d1a2f v1.0-release

# Inspect history in clean Markdown table or JSON
eko history --format md

# Perform instant sub-30ms differential restore
eko restore v1.0-release

πŸ“Š Benchmark & Storage Metrics

Empirical benchmarks run on an Apple M2 system with a 1,000-file project workspace:

========================================================================================
METRIC                          GIT (`git stash` / `commit`)     EKO (CAS ENGINE)
========================================================================================
1. Warm Save Speed (Unchanged)   ~31.4 ms / save                  ~2.71 ms / save  (πŸš€ 11.4x faster)
2. Incremental Save (1 file)     ~24.3 ms / commit                ~4.31 ms / save  (πŸš€ 5.6x faster)
3. Workspace Restore (1,000)     ~18.8 ms (`git checkout .`)       ~27.6 ms         (🀝 Comparable)
4. Disk Space (10 Snapshots)     ~14.8 MB                         ~12.4 MB         (πŸ† 16% smaller)
5. Query Latency (`history`)     ~5.2 ms                          ~0.8 ms          (πŸš€ 6.5x faster)
========================================================================================

πŸ—οΈ Architecture Overview

graph TD
    subgraph CLI ["1. CLI Command Layer (cmd/)"]
        RootCmd["root.go (Cobra Engine)"]
        InitCmd["init.go (eko init)"]
        SaveCmd["save.go (eko save --ai)"]
        RestoreCmd["restore.go (eko restore)"]
        HistoryCmd["history.go (eko history)"]
        SummaryCmd["summary.go (eko summary)"]
        CleanCmd["clean.go (eko clean)"]
        MigrateCmd["migrate.go (eko migrate)"]
        TagCmd["tag.go (eko tag)"]
        AICmd["ai.go (eko ai <subcommand>)"]
    end

    subgraph Core ["2. Core Engines & Utilities (internal/)"]
        GitMindEngine["GitMind AI Reasoning Engine\n(internal/ai/mind/gitmind.go)"]
        SnapshotEng["Snapshot Engine\n(internal/snapshot/)"]
        CASEngine["CAS Object Store\n(internal/objects/)"]
        ManifestEngine["Manifest Engine\n(internal/manifest/)"]
        CacheEngine["Hash Cache Engine\n(internal/cache/)"]
    end

    subgraph Storage ["3. Persistence Layer (.eko/)"]
        SQLiteDB[("SQLite Database\n.eko/db.sqlite (metadata + tags + hash_cache)")]
        CASObjects["CAS Object Store\n.eko/objects/<prefix>/<hash>.gz"]
        Manifests["Tree Manifests\n.eko/manifests/<id>.json"]
    end

    RootCmd --> InitCmd & SaveCmd & RestoreCmd & HistoryCmd & SummaryCmd & CleanCmd & MigrateCmd & TagCmd & AICmd
    AICmd -->|Reason & Audit| GitMindEngine
    SaveCmd -->|Check Hash Cache| CacheEngine
    SaveCmd -->|Store Blobs| CASEngine --> CASObjects
    SaveCmd -->|Write Manifest| ManifestEngine --> Manifests
    RestoreCmd -->|Extract Tree| CASEngine
Loading

πŸ“„ License

Eko is licensed under the MIT License.

About

Eko: AI-powered snapshot versioning CLI for projects. Save, restore, and visualize your project's memory with ease.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages