Spaces:
Sleeping
Sleeping
File size: 7,769 Bytes
61b1da1 a5d1c1b 61b1da1 a5d1c1b 61b1da1 a5d1c1b aaf6a7c 61b1da1 aaf6a7c 61b1da1 aaf6a7c 61b1da1 aaf6a7c 61b1da1 aaf6a7c 61b1da1 aaf6a7c a5d1c1b 61b1da1 a5d1c1b 61b1da1 a5d1c1b 61b1da1 a5d1c1b 61b1da1 a5d1c1b 61b1da1 a5d1c1b 61b1da1 a5d1c1b 61b1da1 aaf6a7c 61b1da1 aaf6a7c 61b1da1 aaf6a7c 61b1da1 aaf6a7c 61b1da1 aaf6a7c 61b1da1 aaf6a7c 61b1da1 aaf6a7c 61b1da1 aaf6a7c a5d1c1b aaf6a7c de90a71 aaf6a7c a5d1c1b aaf6a7c a5d1c1b aaf6a7c a5d1c1b 61b1da1 a5d1c1b de90a71 a5d1c1b aaf6a7c a5d1c1b 61b1da1 a5d1c1b 61b1da1 a5d1c1b 61b1da1 a5d1c1b 61b1da1 a5d1c1b 61b1da1 a5d1c1b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 | ---
title: Ever-Brain MCP & Intelligence Gateway
emoji: ๐ง
colorFrom: purple
colorTo: indigo
sdk: docker
app_port: 7860
---
# Ever-Brain โ Shared Project Intelligence Layer
> **"Git stores what the project IS; Ever-Brain stores what the project KNOWS."**
Ever-Brain is a portable, agent-agnostic project intelligence layer that makes repository knowledge, skills, and context discoverable, persistent, and consumable across AI agents and developers.
---
## โก Quick Start (Run in 60 Seconds)
Clone and host both the **Ever-Brain API** and **Ever-Brain MCP Server** concurrently with a single command:
```bash
# 1. Clone & Enter
git clone https://github.com/abrez-rizvi/ever-brain.git
cd ever-brain
# 2. Install Dependencies
pnpm install
# 3. Start Local Servers (API + MCP Concurrently)
pnpm dev
```
That's it! Both servers are now live:
* ๐ข **Ever-Brain API**: `http://localhost:3000` *(Health check: `http://localhost:3000/health`)*
* ๐ฃ **Ever-Brain MCP Server**: `http://localhost:3002` *(SSE endpoint: `http://localhost:3002/sse`)*
### ๐ฎ Using the CLI Immediately
```bash
# Run CLI directly inside the repo:
pnpm evb --help
# Or link it globally to use 'evb' anywhere on your PC:
pnpm cli:link
```
---
## ๐๏ธ System Architecture
Ever-Brain decouples project intelligence from individual AI agents into three modular tiers:
```text
GitHub / Raw CDN (Storage & Persistence)
โ
โผ
Ever-Brain API (Source Layer)
โ โ
Ever-Brain MCP (Agent Layer) Ever-Brain CLI (Developer & Agent Plane)
โ โ
AI Agents Local Environment / IDE
```
1. **Ever-Brain API (`packages/api`)** *(Delivered)*: Stateless, read-oriented HTTP source layer. Resolves repositories, discovers text/Markdown files via recursive Git Trees, streams raw content with zero REST API quota overhead, provides in-memory tree caching, and supports plain substring search.
2. **Ever-Brain MCP (`packages/mcp`)** *(Delivered)*: Agent consumption layer exposing resources (`ever-brain://repo/...`) and ReAct tools (`list_files`, `read_file`, `search_files`) over Streamable HTTP (MCP 2025-03-26) and Legacy SSE (MCP 2024-11-05).
3. **Ever-Brain CLI (`packages/cli`)** *(Delivered)*: Developer and AI agent control plane for local caching, status inspection, skill materialization, auto-bootstrapping agent meta-skills, and GitHub-native Read/Write collaboration (`evb push` for maintainers, `evb propose` for contributors).
---
## ๐ Project Wiki
Comprehensive documentation is available in the [`docs/wiki/`](./docs/wiki/) directory:
- [**01. Architecture Overview**](./docs/wiki/01-architecture-overview.md) โ Core thesis, 3-tier model, design invariants, and scope boundaries.
- [**02. API Specification & Implementation**](./docs/wiki/02-api-specification-and-implementation.md) โ Endpoint contracts, GitHub ingestion engine, case-insensitive resolver, 60s tree cache, and search engine.
- [**03. Developer Guide & Testing**](./docs/wiki/03-developer-guide-and-testing.md) โ Workspace scripts, test suite execution, live GitHub validation benchmarks, and troubleshooting.
- [**04. MCP Specification & Agent Adapter**](./docs/wiki/04-mcp-specification-and-adapter.md) โ Dual transport specs, dual capability declaration, resources & tools mapping, and error ergonomics.
- [**05. CLI Specification & Workflows**](./docs/wiki/05-cli-specification-and-workflows.md) โ Pure filesystem cache (`.evb/`), agent meta-skill bootstrapping, dirty diffing, and GitHub-native RBAC (`push` / `propose`).
- [**06. Roadmap & Next Steps**](./docs/wiki/06-roadmap-and-next-steps.md) โ Supabase cloud deployment, production hardening, and continuous learning roadmap.
---
## ๐ก Trying Ever-Brain on Any Project on Your PC
You can use Ever-Brain on **any project or workspace on your computer** without modifying your project's codebase. Here is how to test it end-to-end in 5 minutes:
### 1. Link the CLI globally
From your `ever-brain` root folder, run:
```bash
pnpm cli:link
```
*(Runs `pnpm --dir packages/cli link --global`. If you haven't used global pnpm tools before, run `pnpm setup` once).*
### 2. Keep the local servers running
In a terminal in `ever-brain`, start the servers:
```bash
pnpm dev
```
*(Hosts API on `:3000` and MCP on `:3002`)*
### 3. Navigate to any project folder
In a separate terminal, navigate to any repository or codebase on your machine:
```bash
cd C:\path\to\your-other-project
# or: cd ~/projects/my-app
```
### 4. Initialize Ever-Brain
Connect your project to any GitHub repository containing intelligence, runbooks, or skills:
```bash
evb init https://github.com/spencerpauly/skills-repo
```
### 5. What Happens Next
1. **Auto-Bootstrapped Meta-Skill**: Ever-Brain detects your environment and installs the `ever-brain` meta-skill into:
- **Google Antigravity / Gemini**: `.gemini/skills/ever-brain/`
- **Cursor**: `.cursor/rules/ever-brain.mdc`
- **Claude Code**: `.claude/skills/ever-brain/`
2. **Instant Agent Context**: Your AI agent can now autonomously query, read, and search project rules and skills!
3. **Inspect & Materialize**:
- `evb status` โ View connected intelligence repository and cache state.
- `evb skills list` โ List all available runbooks.
- `evb skills install <skill-name>` โ Materialize a skill directly into your agent's skills directory.
4. **Collaborate & Propose Changes**:
- Edit files in `.evb/cache/`
- `evb diff` โ Inspect uncommitted local changes.
- `evb push` / `evb propose` โ Commit directly or open a GitHub Pull Request.
---
## ๐ ๏ธ Advanced Development & Verification
### ๐ Prerequisites & Downloads
| Software | Required Version | Download / Installation | Verify Command |
| :--- | :--- | :--- | :--- |
| **Node.js** | `>= 20.0.0` (LTS recommended) | [Download Node.js](https://nodejs.org/) | `node -v` |
| **pnpm** | `>= 9.0.0` | `npm install -g pnpm`<br>*(or `corepack enable && corepack prepare pnpm@latest --activate`)* | `pnpm -v` |
| **Git** | `>= 2.30.0` | [Download Git](https://git-scm.com/downloads) | `git --version` |
| **GitHub Token** *(Optional)* | Classic / Fine-grained PAT | [Generate Token](https://github.com/settings/tokens)<br>*(increases API limit from 60 to 5,000 req/hr)* | โ |
### ๐งช Workspace Commands & Tests
```bash
# Start both API and MCP servers concurrently
pnpm dev
# Start individual services in development mode
pnpm dev:api # API on port 3000
pnpm dev:mcp # MCP server on port 3002
# Run all automated tests across all 3 packages
pnpm test
# Run TypeScript type check across all packages
pnpm typecheck
# Build all packages for production
pnpm build
```
---
## ๐ป CLI Quickstart
```bash
# Connect current workspace to an Ever-Brain intelligence repository & bootstrap agent meta-skill
evb init https://github.com/acme/project-intelligence
# Inspect connection, cached volume, and uncommitted modifications
evb status
# Inspect knowledge documents
evb knowledge list
evb knowledge show architecture.md
# Inspect and materialize skills for local agents
evb skills list
evb skills show testing
evb skills install testing --target gemini # or cursor, claude
# Check diffs and publish changes
evb diff
evb push -m "feat(skills): add database migration runbook" # Direct commit for maintainers
evb propose --title "feat: Add Webhook runbook" # Opens GitHub PR for contributors
```
## ๐ License
MIT
|