ELCODE Forge (eforge v1.2.0) is a local-first, deterministic codebase intelligence layer, tactile terminal instrument (eforge ui & eforge watch), active remediation engine (eforge fix & eforge simulate), polyglot architecture analyzer, Policy-as-Code gate, and native Model Context Protocol (MCP) server built in Rust by ELCODE.

Installation & Quickstart

Step-by-step guides to installing the eforge binary via npx, POSIX shell, PowerShell, Homebrew, or Cargo.

Configuration & AI Providers

Configure eforge.config.yaml, rulesets, ignore globs, and local/cloud AI providers with strict credential isolation.

CLI & Custom Rules Engine

Explore all 41 CLI commands & subcommands, interactive TUI, surgical auto-fix, and 6 deterministic rule matchers.

MCP Server & Governance

Connect Claude Code, Cursor, and Windsurf to 11 eforge_* MCP tools with closed-loop pre-flight patch verification.

Why eforge instead of forge?

To prevent PATH collisions with Foundry (forge), Laravel Forge, and Atlassian Forge, the primary binary command is eforge with secondary alias elcode-forge. The default configuration file is eforge.config.yaml (with automatic fallback to forge.config.yaml).

The ELCODE Studio Manifesto

Every subsystem in eforge is engineered under the five non-negotiable principles of ELCODE Studio:

01

"Software should feel like an instrument, not a compromise."

02

"Code quality is visible in product behavior, speed, and durability."

03

"We use AI as leverage, not as identity. Deterministic before generative."

04

"We prefer precision over decoration."

05

"We build things worth keeping."


Installation Guide

Install the single-binary eforge CLI across Linux, macOS, and Windows using your preferred package manager or zero-install runner.

1. Zero-Install via Node / npx / pnpm / bun

No installation or Rust toolchain required—100% of ELCODE Forge features (all 41 CLI commands/subcommands and 11 MCP tools) run directly via npx, pnpm dlx, or bunx:

# Core diagnostics & full scan
npx elcode-forge doctor --codeframe
npx elcode-forge scan --codeframe --fail-on high

# Interactive TUI & live radar
npx elcode-forge ui
npx elcode-forge watch

# Active remediation & in-memory simulation
npx elcode-forge fix --dry-run
npx elcode-forge simulate --move src/db/client.ts:src/infra/db/client.ts

# Topology & layer boundary inference
npx elcode-forge rules infer --write

# Change review & smart impacted test selection
npx elcode-forge review --fast --impacted-tests

# Security audit, SBOM & Policy gates
npx elcode-forge security --audit
npx elcode-forge sbom --spec cyclonedx
npx elcode-forge policy check

# Native closed-loop MCP server for AI coding agents
npx elcode-forge mcp

# Or install globally via npm/pnpm
npm install -g elcode-forge

2. Linux & macOS Shell Installer (POSIX sh)

# Installs eforge and elcode-forge to ~/.local/bin with SHA-256 verification
curl -fsSL https://raw.githubusercontent.com/elcode-id/elcode-forge/main/scripts/install.sh | sh

# Pin a specific release version or custom directory:
EFORGE_VERSION=v1.2.0 EFORGE_INSTALL_DIR=/usr/local/bin \
  curl -fsSL https://raw.githubusercontent.com/elcode-id/elcode-forge/main/scripts/install.sh | sh

3. Windows PowerShell Installer

# Installs eforge.exe to %LOCALAPPDATA%\elcode-forge\bin and updates User PATH
irm https://raw.githubusercontent.com/elcode-id/elcode-forge/main/scripts/install.ps1 | iex

4. Homebrew (macOS / Linux) & Cargo

# Homebrew tap
brew tap elcode-id/tap
brew install elcode-id/tap/eforge

# Cargo binstall (pre-compiled binary) or Cargo install from source
cargo binstall eforge
cargo install --git https://github.com/elcode-id/elcode-forge forge-cli --locked

5. Build from Source (Rust 1.85+ Edition 2024)

git clone https://github.com/elcode-id/elcode-forge.git
cd elcode-forge
cargo build --release --locked --bin eforge
./target/release/eforge --version

Golden Path Quickstart (Under 60 Seconds)

Follow these steps in any Git repository to initialize configuration with automatic boundary inference, explore the interactive terminal UI, run surgical auto-fixes, and audit your working diff.

Step 1 — Initialize Configuration & Infer Architecture Boundaries

eforge init --infer
# Creates eforge.config.yaml, initializes .eforge/, and infers custom layer boundary rules

Step 2 — Run 5-Second Repository Diagnosis with Rich Code-Frames

eforge doctor --codeframe
# Outputs Health Score (0-100), 8 dimension scores, and multi-line box-drawn diagnostic spans

Step 3 — Explore in Interactive TUI or Live Architectural Radar

eforge ui
# Launches the 4-tab ratatui TUI (DAG Explorer, Tarjan SCC Cycles, Blast Radius, Code-Frames)

eforge watch
# Starts the <50ms incremental file-save architectural radar backed by .eforge/cache/

Step 4 — Full Scan, Surgical Auto-Fix & Refactor Simulation

eforge scan --codeframe --fail-on high
eforge fix --dry-run
eforge simulate --move src/db/client.ts:src/infra/db/client.ts
# Evaluates rules, previews transactional codemods, and simulates module moves in memory

Step 5 — Review Uncommitted Changes & Smart Impacted Tests

eforge review --base origin/main --impacted-tests --fail-on high
# Computes transitive blast radius, risk score, and exact test files/commands to execute

Step 6 — Start the Native Closed-Loop MCP Server for AI Agents

eforge mcp
# Starts JSON-RPC 2.0 stdio server exposing 11 eforge_* tools to Claude Code, Cursor, or Windsurf

Deterministic Execution & Incremental AST Caching

Identical repository state + identical eforge.config.yaml is guaranteed to produce byte-for-byte identical JSON/SARIF output and identical Health/Risk scores. Incremental file-level blake3 AST entries are persisted in .eforge/cache/file-ast-v1.json for sub-50ms watch cycles.

Multi-Language & Ecosystem Support Matrix

forge-analyzer provides native AST/import graph extraction, manifest parsing, lockfile dependency resolution, and framework detection across 5 major ecosystems:

LanguageExtensionsManifests & LockfilesFrameworks DetectedImport Graph Resolution
TypeScript / JavaScript.ts, .tsx, .js, .jsx, .mjs, .cjs, .svelte, .vuepackage.json, package-lock.json, pnpm-lock.yaml, yarn.lock, bun.lockbNext.js, Nuxt, SvelteKit, React, Vue, Svelte, Express, NestJSRelative (./, ../), index files, @/ & ~/ path aliases, Vue/Svelte SFC <script> extraction
Python.py, .pyipyproject.toml (PEP 621 & Poetry), requirements.txt, poetry.lock, uv.lock, Pipfile.lockFastAPI, Flask, Django, pytestAbsolute & intra-package relative imports (., .., ...), 200+ Python stdlib filter
Go.gogo.mod, go.sumGin, Echo, Fiber, Chi, Go testingGo module path resolution, internal package imports, 40+ Go stdlib root package filter
Rust.rsCargo.toml (single crate & multi-member workspaces), Cargo.lockAxum, Actix-web, Tokio, Rocket, Cargo testWorkspace crate resolution, mod declarations, crate::, super::, self::, nested use trees
PHP.phpcomposer.json, composer.lockLaravel, Symfony, WordPress, PHPUnit, PestPSR-4 namespace mappings (App\ -> app/), single/aliased/group use statements, PHP stdlib filter

8-Dimension Health Score & Deterministic Risk Model

Every eforge doctor and eforge scan run computes a deterministic Overall Health Score (0–100) and Letter Grade (A+ through F) across 8 weighted engineering dimensions:

Architecture Weight: 18%

Module boundary integrity, DAG acyclicity (Tarjan SCC), and layer separation.

dimension.architecture
Security Weight: 18%

Secret leaks, Shannon entropy tokens, OSV dependency CVEs, and unsafe code patterns.

dimension.security
Maintainability Weight: 16%

File size thresholds, module cohesion, naming conventions, and code complexity.

dimension.maintainability
Reliability Weight: 14%

Error handling discipline, lockfile determinism, and structural resilience.

dimension.reliability
Testing Weight: 12%

Test suite presence, service test companions, and tested diff coverage.

dimension.testing
Dependency Health Weight: 10%

Unused dependencies, wildcard/unpinned versions, duplicates, and license compliance.

dimension.dependency_health
Documentation Weight: 6%

README presence, living onboarding docs (docs/forge/), and architectural clarity.

dimension.documentation
Release Readiness Weight: 6%

CI/CD configuration, policy gate readiness, and zero critical blockers.

dimension.release_readiness