Skip to content

Getting Started

Installation

Install EGC once and it works across every AI coding tool you already use.

Requirements

Node.js 20+

node --version

Git any

git --version

OS Linux, macOS, Windows

Choose your method

Fastest

Works on Linux, macOS, and Windows. No git clone needed.

Using mise, nvm, asdf, or fnm? Install EGC under your default Node version -- the one active outside any project directory -- to avoid version conflicts.

terminal
$ npm install -g @egchq/egc
$ egc install

Permissions: if npm install -g fails with EACCES (Node from your distro's package manager, or any root-owned global prefix), run only the npm install -g step with sudo and everything else as your normal user. A Node version manager such as nvm, mise or fnm never needs sudo.

Then wake up the brain: the bare install prepares the runtime only. Inside a real project, run egc init once so your AI tools restore its memory on their very first prompt. egc doctor should end with errors=0.

What the installer does

1

Compiles MCP servers

Builds egc-guardian and egc-memory from TypeScript source.

2

Initializes the database

Creates the local SQLite database at ~/.egc/ for persistent memory.

3

Cognitive bootstrap

Writes the memory protocol into the global instruction files for each detected tool (CLAUDE.md, GEMINI.md, cursor.rules, etc.).

4

Registers MCP servers and hooks

Adds both servers to every detected tool's MCP config. For Claude Code, also installs a SessionStart hook (loads state automatically) and a Stop hook (saves state automatically at session end). Runs once per tool, idempotent.

5

Prompt library (optional)

Asks whether to install 232 skills, 77 commands, and 61 agents. Skipped automatically in CI.

6

Token Crusher binary shim

Installs a PATH-level shim (git, npm, gh, and more) under ~/.egc/bin as a best-effort step. Covers a known gap where the automatic hook never fires for commands the AI assistant itself issues on Claude Code.

Expected output

terminal
EGC install
  node v22.0.0
  building egc-guardian...
  building egc-memory...
  initializing database...
  bootstrapping cognitive protocol...
  ✓ ~/.claude/CLAUDE.md updated
  ✓ ~/.gemini/GEMINI.md updated
  registering MCP servers...
  ✓ registered in Antigravity CLI
  ✓ registered in Claude Code (global)
  ✓ registered in Cursor
  ✓ registered in Windsurf
  ✓ registered in Amp
  ✓ registered in VS Code Copilot

Install prompt library? (61 agents, 232 skills, 77 commands) [y/N]:

  Installing Token Crusher binary shim...
  ✓ Installed: git, npm, gh, ...

Installation complete.
Run 'egc doctor' to verify.

Verify the installation

$ egc doctor

egc-guardian  running
egc-memory    running
database      ok
claude code   registered
cursor        registered

If a tool shows not found, it either isn't installed or wasn't detected. You can re-run sh scripts/install.sh after installing the tool.

Next steps