DEV Community

Felipe Marzochi
Felipe Marzochi

Posted on

I got tired of re-explaining my project to AI every session, so I built EGC

You open your AI coding tool on a project you haven't touched in a week. You type "let's continue." And then it begins.

"Can you remind me what we're working on?"

You explain the stack. Again. The decisions you made. Again. What failed last time. Again. By the time you've re-established context, you've burned 15 minutes and half your focus.

I got tired of this. So I built EGC.


What EGC does

EGC is a local runtime that gives every AI coding tool you use a persistent memory across sessions. At the end of each session, your AI saves what it learned: decisions made, what failed, your preferences, what to pick up next. At the start of the next session, it loads that state back — on its own, without you asking.

This is what it looks like in practice:

State loaded from egc-memory via ~/.egc/state/Projects-MyApp.md

Context and preferences acknowledged (terse responses).

Ready to pick up the next items:
• Test full install on a clean machine
• Add GEMINI.md with session memory protocol
• Publish v1.0.1 fix to npm after clean install test passes
• Add mcp_server_count to audit.js

=== EGC Stack Briefing ===
Stack: typescript, javascript
Stack agents: typescript-reviewer, javascript-reviewer
Always use: code-reviewer
===
Enter fullscreen mode Exit fullscreen mode

You didn't type anything. You just started working.


How it works

EGC ships two MCP servers that run locally alongside your AI tool.

egc-memory handles persistence. It exposes 14 tools your AI calls automatically during the session:

  • get_state — loads your project memory at session start
  • update_state — saves decisions, preferences, and next steps
  • store_decision — persists individual decisions to SQLite
  • search_history — full-text search with BM25 ranking across all past sessions
  • lesson_save / lesson_recall — cross-session knowledge with confidence decay
  • detect_patterns — surfaces recurring commands and errors from hook events
  • working_memory_set/get — transient context with TTL

State files live at ~/.egc/state/<project-slug>.md. One file per project, plain Markdown, human-readable. No cloud. No subscription. No black box.

egc-guardian handles safety and context compression:

  • validate_command — checks shell commands against project rules before execution
  • validate_write — validates file write paths
  • reduce_context — compresses file payloads to save your token budget
  • auto_learn — mines session failures and writes actionable lessons to all AI tool config files

One install, every tool

npm install -g @egchq/egc && egc install
Enter fullscreen mode Exit fullscreen mode

That's it. EGC detects which AI tools you use and configures itself automatically. It works with:

  • Claude Code
  • Cursor
  • Gemini CLI
  • Windsurf
  • Kiro
  • Any MCP-compatible tool

And it works with any model: Claude, GPT-4o, Gemini, DeepSeek, Qwen3, Llama 4 via OpenRouter.


The sync daemon

egc watch keeps all your tool configs in sync bidirectionally. Edit context in Cursor and it propagates to Gemini CLI, Copilot, and Windsurf automatically. Edit it in any tool and it syncs back to ~/.egc/state/.

egc watch        # watch current project
egc watch --quiet
Enter fullscreen mode Exit fullscreen mode

Why local-first matters

Every session state is a plain Markdown file on your machine. You can read it, edit it, version-control it, and delete it. There's no account, no API key to EGC, no server that can go down and take your memory with it.

The MCP servers run as local Node.js processes. Nothing leaves your machine unless your AI provider does it (which it would do regardless).


Bonus: 479 prompt components

EGC ships with a library of 63 agents, 229 skills, 76 commands, and 111 rules written from real engineering sessions. Install them or ignore them entirely — EGC gives you persistent memory either way.


Open source, one developer

EGC is MIT licensed and built by one person. The GitHub repo is at github.com/Fmarzochi/EGC.

If EGC changed how you work, a star helps other developers find it.

If you hit an issue or have a question, open an issue or join the Discord.

Top comments (0)