Reference
CLI Reference
You never need to type any of these: open your AI tool and just talk, and the auto-intuition protocol maps your intent to the right action. Every command below exists for people who prefer explicit control, and each one is valid on its own.
egc initRun once in each project you want EGC to manage. Bootstraps the cognitive protocol in every detected tool, registers the MCP servers, prepares the state store, configures the commit-privacy filter for the repository and ends with a compact install check. Each step prints one check line; the full report is one egc doctor away.
$ egc init
✓ cognitive protocol 6 tools up to date (v6)
✓ MCP registration 7 tools already registered
✓ memory state store ready (6 migrations); loads on your first session
✓ commit-privacy filter already configured; populated memory is stripped from staged blobs (local repo only)
✓ token crusher shim installed and on PATH
✓ install check 12 targets healthy
Installation complete.egc doctorVerify both servers are built, the database is accessible, and all detected tools have EGC registered. The first command to run after installation.
$ egc doctor
egc-guardian running
egc-memory running
database ok
claude code registered
cursor registered
# Check against a local development checkout instead of the installed package:
$ egc doctor --repo-root /path/to/EGCegc statusShow the last 5 decisions saved to memory for the current project, along with the active branch state file.
$ egc status
Branch: feat/auth (state: ~/.egc/state/my-app/feat-auth.md)
[2026-06-05] Moved from Prisma to Drizzle ORM
[2026-06-04] Dropped JWT in favor of iron-session
[2026-06-03] Settled on functional-only components
[2026-06-02] PostgreSQL with row-level security
[2026-06-01] Next.js 15 App Routeregc consolidateCompact the state file for the current project when it grows too large. Rewrites entries in three layers: Working (last 7 days, kept verbatim), Episodic (last 30 days, summarized per week), and Semantic (older entries, condensed to core facts). The original file is backed up to ~/.egc/state/archive/ before any rewrite.
$ egc consolidate
Consolidating state for my-app...
Working layer: 3 entries kept verbatim
Episodic layer: 12 entries summarized (2 weeks)
Semantic layer: 31 entries condensed
✓ Written to ~/.egc/state/my-app/main.md
Backup at ~/.egc/state/archive/my-app-main-20260613.md
# Preview without writing:
$ egc consolidate --dry-run
# Run even if below the line threshold:
$ egc consolidate --forceegc exportPrint the decrypted memory document for a project (default: the current directory) or for the user-wide global scope. Plain text is the Agent Memory Interchange Markdown document as stored; --json parses it into header fields and the five sections. Read-only: the state file and the key are never modified. Exit codes: 0 printed, 1 usage error or a state file or key that cannot be read or trusted, 2 no memory for the scope, 3 encrypted memory whose key is missing.
$ egc export
# Project State
project: /home/you/projects/my-app
branch: main
...
# Another project, as JSON:
$ egc export --project /path/to/other-app --json
# The global scope shared by all projects:
$ egc export --scope globalegc installBare: set up the engine and ask about the optional prompt library (default no; from v1.1.22, --prompt-library and --no-prompt-library decide without the question). With --target and --profile: install the library to one tool, for example after adding a new tool.
$ egc install --target cursoregc catalogList available profiles and components in the prompt library, and search the whole catalog by keyword with ranked results.
$ egc catalog
agents 61
skills 232
commands 77
rules 109
$ egc catalog search memory session
Catalog matches for "memory session":
- ck [skill]
Persistent per-project memory for Gemini Code...egc repairRestore drifted or missing managed files. Re-injects the cognitive bootstrap if it was overwritten.
$ egc repair
✓ ~/.claude/CLAUDE.md restored
✓ ~/.gemini/GEMINI.md restored
# Repair against a local development checkout instead of the installed package:
$ egc repair --repo-root /path/to/EGCegc replayPlay back a recorded session with timeline scrubbing: every tool call, file edit, and token count in order.
$ egc sessions
$ egc replay <session-id>egc budgetSet per-session token and cost limits, enforced by the pre-tool hook before each call.
$ egc budget set --tokens 500000
$ egc budget statusegc pluginCommunity plugin registry: install, list, update, and remove EGC plugins distributed via npm.
$ egc plugin install <name>
$ egc plugin listegc savedShort token-savings report from the local Token Crusher ledger. Use egc gain for the full panel and egc discover for missed opportunities.
$ egc saved
Tokens saved: ~139.2K (87.6% efficiency)egc uninstallRemove every EGC-managed file recorded in install-state, leaving your own configuration untouched.
$ egc uninstall --target cursoregc watchStart the bidirectional state sync daemon. Watches all EGC-managed tool config files in the project. When any file is edited outside of EGC's own propagation cycle - for example, when you update context in Cursor - the change is extracted from the EGC block and synced to all other tools automatically. Changes are also merged back into ~/.egc/state/ for full round-trip persistence.
$ egc watch
[egc watch] Watching 4 tool config file(s) in /my-project
[egc watch] Press Ctrl+C to stop.
[egc watch] antigravity changed -> synced to: cursor, copilot, aider + state file
# Watch a specific project:
$ egc watch /path/to/project
# Suppress output:
$ egc watch --quietegc dashboardStart the EGC Dashboard, a real-time Mission Control panel at http://localhost:7890. Shows live tool calls, file edits, shell commands, token usage, memory state, and agent status as your AI works. The dashboard auto-starts after egc install and egc init and runs as a background server.
$ egc dashboard
EGC Dashboard running at http://localhost:7890
# Stop the background server:
$ egc dashboard stop
# Check if it's running:
$ egc dashboard statusegc runRun any command through the Token Crusher. Noisy output (long git logs, test noise, install spam, giant JSON) is compressed up to 90% before it reaches the model; errors and warnings always survive. On hook-capable tools this happens silently without typing anything.
$ egc run git log
... (12439 more commits)
[egc-crusher] saved ~139178 tokens (full output: rerun with --raw)
# Escape hatch, full output:
$ egc run --raw git logegc gainThe full Token Crusher savings panel: totals, average per run, biggest crush, efficiency meter, and a breakdown by command kind. Read from the local ledger at zero token cost. Or just ask your AI "how much did I save?" and it runs this for you.
$ egc gain
EGC Token Gain (local ledger, zero token cost)
Crushed runs: 12
Tokens saved: ~412.7K
Efficiency: ████████████████████████ 97.3%
# Run-by-run log:
$ egc gain --history
# Short summary:
$ egc savedegc discoverScan your recent session transcripts for crushable output that never went through the Token Crusher, and see what those runs could have saved.
$ egc discover
EGC Discover: crushable output that skipped the Token Crusher
Transcripts scanned: 40 (last 7 days)
Missed runs: 41
Potential savings: up to ~39.5K tokensegc crusher-shimInstalled automatically by egc install and egc auto-update. A PATH-level binary shim (git, npm, pip, gh, and more) that compresses noisy output for any tool that shells out to run them. Covers a known gap: on Claude Code, the PreToolUse hook rewrite never fires for commands the AI assistant runs through its own Bash tool, only for a human typing directly into the terminal, so this is what makes the Crusher work there too. A human at an interactive terminal always gets full, untouched output; only non-interactive output capture goes through the Token Crusher.
$ egc crusher-shim install
Shim directory: ~/.egc/bin
Installed: git, npm, pip, gh, ...
PATH updated in: ~/.bashrc, ~/.profile
Open a new terminal for it to take effect.
# Check status:
$ egc crusher-shim status
# Remove it:
$ egc crusher-shim uninstallegc clawNanoClaw REPL: a persistent, session-aware agent loop with zero dependencies. Conversation history lives in plain Markdown files, so sessions survive restarts and stay greppable.
$ egc claw
NanoClaw v2: Session: default
Type /help for commands, exit to quit.
claw> egc harness-auditScores your harness setup across tool coverage, context efficiency, quality gates, memory persistence, eval coverage, security guardrails, and cost efficiency. Text or JSON output.
$ egc harness-audit --format json
{
"scope": "repo",
"deterministic": true,
...
}egc auto-updatePull the latest changes from GitHub, reinstall managed targets, and re-run the cognitive bootstrap so already-configured installs pick up new protocol sections instead of staying frozen at whatever shipped on first install. On an npm install it prints the upgrade command instead; on Windows, close the AI tools and terminals that run EGC before running it, or npm fails with EBUSY on a file it cannot rename.
$ egc auto-update
Pulling latest from origin/main...
Building egc-guardian... done
Building egc-memory... done
Reinstalling targets...
✓ claude code updated
✓ cursor updated
# Update against a local development checkout instead of the installed package:
$ egc auto-update --repo-root /path/to/EGCegc planInspect the selective-install manifests and the resolved plan for a target and profile before anything is written.
$ egc plan --profile core --target cursoregc consultRecommend EGC components and profiles from a natural-language description of what you are building.
$ egc consult "a Django API with Celery workers"egc list-installedInspect the install-state files for the current context: which target, which profile, which files.
$ egc list-installedegc overviewAggregated, read-only view of every per-project memory state on this machine.
$ egc overviewegc verifyRun the project verification command and record a receipt for the commit gate.
$ egc verifyegc teamTeam memory sync over a git remote: init once per workstation, sync to pull and push lessons, status for health.
$ egc team init <remote>
$ egc team sync
$ egc team statusegc telemetryAnonymous usage telemetry, asked once on the first install, doctor or init run: status, on, off.
$ egc telemetry status
$ egc telemetry offegc session-inspectEmit canonical EGC session snapshots from dmux or Gemini history targets.
$ egc session-inspectegc loop-statusInspect transcripts for stale loop wakeups and pending tool results.
$ egc loop-status