Skip to main content
Glama
README.md
<div align="center">

<img src="assets/logo.png" alt="Évariste Logo" width="96" height="96" />

# Évariste

### Code-Graph GPS, MCP Server, and Local Workbench for AI Coding Agents

Give your coding agent a complete map of your codebase **before** it opens a single file.

[Why Évariste](#why-évariste-exists) · [Core Innovations](#what-makes-évariste-different) · [MCP Tools & Typical Workflow](#mcp-tools--typical-workflow) · [Visual Workbench](#visual-workbench-evariste-ui) · [Quick Install](#quick-install) · [Languages](#languages-supported) · [License](#license)

[![License: FSL-1.1-ALv2](https://img.shields.io/badge/License-FSL--1.1--ALv2-d4a72c?style=flat-square)](./LICENSE)
[![Package: evariste](https://img.shields.io/badge/pip-evariste-2563eb?style=flat-square)](https://github.com/evariste-graph/evariste)
[![UI: evariste-ui](https://img.shields.io/badge/Workbench-evariste--ui-0ea5e9?style=flat-square)](https://github.com/evariste-graph/evariste-ui)
[![MCP Tools: 11](https://img.shields.io/badge/MCP_Tools-11-10b981?style=flat-square)](#mcp-tools--typical-workflow)
[![Platforms: macOS | Linux | Windows](https://img.shields.io/badge/Platform-macOS_%7C_Linux_%7C_Windows-64748b?style=flat-square)](#quick-install)

[![Claude Code](https://img.shields.io/badge/Claude_Code-D97757?style=flat-square&logo=anthropic&logoColor=white)](#quick-install)
[![Cursor](https://img.shields.io/badge/Cursor-000000?style=flat-square)](#quick-install)
[![Codex](https://img.shields.io/badge/Codex-10A37F?style=flat-square&logo=openai&logoColor=white)](#quick-install)
[![Windsurf](https://img.shields.io/badge/Windsurf-09B6A2?style=flat-square)](#quick-install)
[![Gemini CLI](https://img.shields.io/badge/Gemini_CLI-4285F4?style=flat-square&logo=google&logoColor=white)](#quick-install)
[![GitHub Copilot](https://img.shields.io/badge/GitHub_Copilot-24292F?style=flat-square&logo=github&logoColor=white)](#quick-install)

<br />

<img src="assets/demo.gif" alt="Évariste MCP Tools & Workbench in Action" width="100%" />

</div>

---

## Why Évariste Exists

When you ask an AI coding agent to build a feature or fix a bug, it usually starts **blind**. It spends 15 to 30 turns running text searches (`grep`), listing folders, and reading entire files just to figure out how your app is wired together. That burns tens of thousands of tokens, slows down every answer, and still misses connections when a frontend repository calls a backend repository over HTTP.

**Évariste replaces blind searching with a live map of your code.** It scans your local repositories in milliseconds—at **$0 token cost**—and connects every UI screen, API client call, backend route, service function, and database table into a single graph on your machine.

---

## What Makes Évariste Different

Évariste combines five methods that turn a static codebase into an intelligent navigation system for AI agents:

| Innovation | In Plain Terms | Why It Matters |
|---|---|---|
| **1. Turn-0 Change Map (`recall`)** | Before your agent searches or opens a file, Évariste hands it a compact "flight plan": the exact functions, line numbers, API routes, and UI callers involved in your request. | Cuts token usage by **60–80%** and eliminates exploratory `grep` loops. |
| **2. Probabilistic Graph Diffusion** | Important helper functions rarely share the exact words you typed in your prompt. Évariste spreads relevance probability (`p`) along function calls, database reads/writes, and HTTP links to surface connected code automatically. | Finds the hidden schema, middleware, or downstream caller that keyword search misses. |
| **3. Complexity Classification & Smart Routing** | Every request receives an instant local difficulty score (`small`, `medium`, or `large`, e.g. `score 49 · p=0.73`) based on how many symbols, callers, and cross-repo contracts it touches. | Lets simple edits run on fast, inexpensive models while reserving heavy reasoning models for high-impact changes. |
| **4. Persistent Annotations & Graph Memory** | When an agent finishes a change—or when a test passes—it attaches a one-line memory note (`annotate`) directly to the symbol in the graph. | The next agent session immediately sees what was verified and why, instead of re-learning your codebase from scratch. |
| **5. Runtime Tracing & Contract Guardrails** | Combines static analysis with real execution paths recorded during test runs (`sys.monitoring`), and verifies that frontend `fetch` calls still match backend route schemas. | Catches broken API contracts and invalid React Hooks **before** the agent finishes its turn. |

---

## MCP Tools & Typical Workflow

Évariste exposes **11 lightweight Model Context Protocol (MCP) tools** to your coding agent. Instead of reading whole files, the agent orders only the exact slice of context each step requires.

### The 11 MCP Tools at a Glance

| Tool | Plain-English Role | What It Gives the Agent |
|---|---|---|
| **`recall`** | **Start here (Turn 0)** | The complete **Change Map** for the user's request: exact file & line ranges, complexity score, cross-repo API contracts, blast radius (`can break:`), saved memory notes, and short code snippets. |
| **`excerpt`** | **Read a symbol's code** | Only the exact lines of 1–12 functions or classes from the map (or a compact signature skeleton for large files), with automatic session deduplication so the same code is never sent twice. |
| **`contracts`** | **Check API shapes** | Every route path, request body, and response field for a router—so frontend TypeScript types and backend schemas stay in sync. |
| **`inspect`** | **See who calls what** | A symbol's direct callers, callees, frontend `http_callers`, and the unit tests that cover it. |
| **`trace`** | **Prepare for a rename** | Every call site across the workspace with exact line numbers before changing a function's parameters. |
| **`anticipate`** | **Place new code** | The best file and neighboring functions when adding a brand-new route, class, or helper. |
| **`seek`** | **Spot-search a symbol** | Top 8 matching symbols across the graph if the agent needs to look up an extra helper. |
| **`react_hooks`** | **Validate React edits** | Checks `useEffect`, `useMemo`, and `useCallback` dependency rules after editing `.tsx` / `.jsx` files. |
| **`rescan`** | **Refresh the map** | Re-indexes edited files in milliseconds so verification checks run against the latest code. |
| **`annotate`** | **Save team memory** | Pins a persistent one-line note onto a function or route that future Change Maps will display automatically. |
| **`flag`** | **Report a blind spot** | Logs a note if a dynamic call or route couldn't be linked statically. |

### Typical Agent Workflow on a Single Request

```mermaid
flowchart LR
    A["1. Understand\nrecall"] --> B["2. Zoom In\nexcerpt · inspect · trace"]
    B --> C["3. Edit Code\nin target line ranges"]
    C --> D["4. Verify & Remember\nrescan · contracts · react_hooks · annotate"]
```

1. **Map the task before touching files (`recall`)**
   You ask: *"Add phone verification and wire up the login screen."*
   On Turn 0, **`recall`** scores the task's complexity (`medium · score 49 · p=0.73`) and lists the 4 exact places across your backend and frontend repositories that need to change—along with a warning that changing the response will affect `LoginPage.tsx`.
2. **Inspect only the lines that matter (`excerpt`, `inspect`, `trace`)**
   Instead of reading a 600-line router file, the agent calls **`excerpt`** on `verify_code` (receiving just lines `70–75`). If it needs to change a function signature, it calls **`trace`** to see every caller first.
3. **Verify the front-to-back link and save memory (`rescan`, `contracts`, `react_hooks`, `annotate`)**
   After making the edit, the agent calls **`rescan`** to update the graph, **`contracts`** and **`inspect`** to confirm the frontend `fetch` call matches the backend route, **`react_hooks`** to check the React component, and **`annotate`** to leave a one-line note on the endpoint for the next task.

---

## Visual Workbench (`evariste-ui`)

Running `evariste up` launches a pre-bundled local web workbench at **[http://localhost:8080/app](http://localhost:8080/app)** (source repo: **[evariste-graph/evariste-ui](https://github.com/evariste-graph/evariste-ui)**) that opens straight into your local project—no login or cloud setup required:

<div align="center">
<img src="assets/workbench.png" alt="Évariste Local Single-Project Workbench" width="100%" />
</div>

- **Layered Architecture Map**: Visualizes your entire application from `UI` → `Client Fetch` → `API Routes` → `Services & ORM` → `Database`, highlighting cross-repository HTTP links in real time.
- **Findings & React Hooks Inspector**: Surfaces broken API links, uncalled routes, and React Hook dependency issues.
- **Multi-Repo Git Workbench**: Switch branches, inspect uncommitted diffs, and commit across frontend and backend repositories simultaneously while checking if branch switches break any API contracts.
- **Test Database & Environment Console**: Generates a local test database from your ORM models and manages local environment variables for live previews.
- **Token Savings Ledger & ChatPane (`Cmd+K`)**: Tracks how many context tokens the graph spared on every turn and includes a built-in coding assistant supporting your own API keys (OpenRouter, Anthropic, OpenAI, Gemini).

---

## Quick Install

### Option 1: One-Line Prompt for Your Coding Agent

Paste this into **Cursor**, **Claude Code**, **Codex**, **Windsurf**, or **Gemini CLI**:

> Install Évariste (`pip install git+https://github.com/evariste-graph/evariste.git && evariste start .`) and use `evariste recall` to map this workspace before editing.

### Option 2: Terminal Install

```bash
# Install the CLI, MCP server, and bundled Workbench UI
pip install git+https://github.com/evariste-graph/evariste.git

# Inside your repo (or a parent folder containing your frontend + backend repos):
evariste up
```

- **Agent-only mode (no browser UI)**: Run `evariste start .` to wire `.cursor/mcp.json`, `.cursor/hooks.json`, `CLAUDE.md`, and `AGENTS.md` without starting the local web server.
- **Link separate folders**: Run `evariste add ../my-frontend` to combine multiple repositories into one unified cross-repo graph.

---

## Languages Supported

Évariste includes zero-configuration static analyzers and cross-repository HTTP linkers for **6 languages**:

| Language | Frameworks & Cross-Repo Links |
|---|---|
| **Python** | FastAPI, Flask, Django routes; Pydantic schemas; SQLAlchemy & Django ORM models; `pytest` reachability |
| **TypeScript & JavaScript** | React components & custom hooks, Express / NestJS / Fastify routes, `fetch` / `axios` / typed client HTTP links |
| **C# (.NET)** | ASP.NET Core Controllers & Minimal APIs, Entity Framework Core `DbContext` & entities, `HttpClient` links |
| **Java** | Spring Boot `@RestController` / `@RequestMapping` endpoints, JPA `@Entity` models, repository reads/writes |
| **Dart / Flutter** | Flutter `StatelessWidget` / `StatefulWidget` trees, `Dio` & `http` mobile-to-backend HTTP links |

---

## License

Évariste is source-available under the **[Functional Source License, Version 1.1, Apache 2.0 Future License (`FSL-1.1-ALv2`)](./LICENSE)** ([fsl.software](https://fsl.software)).

- **Free for internal & personal use**: Use, modify, and self-host Évariste for personal projects, internal company engineering, education, and non-competing research. Every release automatically converts to **Apache 2.0** two years after publication.
- **Non-competing condition**: Offering a commercial product or hosted service that substitutes for Évariste is not permitted under `FSL-1.1-ALv2`. For hosted team workspaces visit **[evariste.co](https://evariste.co)** or contact **[licensing@evariste.co](mailto:licensing@evariste.co)**.