mex-memory/mex
A local CLI that checks project notes against code and delivers them to coding agents
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
MEX 0.9 beta is a local TypeScript CLI, published as mex-agent with the mex entrypoint and a Node.js runtime that includes node:sqlite. Its manifest lists Commander and simple-git alongside oxc-parser and web-tree-sitter. The CLI reads the repository, maintains per-machine databases, and delivers context through Claude Code and Codex hooks and generated rule files. Hook failures are designed not to interrupt the agent session; the beta has no MCP server.
The storage boundary matters for teams: personal notes and databases live outside the repository, while generated rules and local .mex/ files are initially ignored through .git/info/exclude. Sharing exports reviewable Markdown notes and generated configuration to a separate Git branch, not the local databases. MEX does not edit existing CLAUDE.md or AGENTS.md files; it can add an AGENTS.md where one is absent or generate separate Claude rule files.
Key Capabilities & Differentiators
MEX delivers explicit project decisions, conventions, and facts to Claude Code and Codex. A note with code checks can record file hashes; if the code makes the note false, MEX can withhold it, and if the evidence changes it can direct the agent to current code rather than repeat the old claim. The session-start brief holds about 1,000 characters, with generated rule files carrying the remainder. Path-scoped notes are rechecked at delivery rather than necessarily at session start. MEX can also surface discovered build and test commands.
mex brief previews startup context, mex what reports what reached the session or was withheld, and mex check --diff supports read-only branch verification for pre-push checks or CI. mex handoff writes branch context, uncommitted filenames, the last request and failing command, and a user summary to .mex/handoffs/ after a secret scan. The operator commits the handoff; MEX does not push it.
Trade-offs & Limitations
Compared with hand-maintained CLAUDE.md and AGENTS.md, MEX adds code-evidence checks, timed delivery, and a Git review workflow, in exchange for generated files and user-level hook changes. Treat its checks as a safeguard against stale guidance, not a guarantee of correctness: notes can lack code checks, path-scoped corrections wait until delivery, and the beta does not automatically retain conclusions the agent reaches on its own. Teams that need an MCP endpoint, Hub UI, or support beyond Claude Code and Codex should not assume the beta provides it.
The project is MIT-licensed and requires no MEX account or hosted backend. Local note storage does not mean every operation is offline: some background rechecks can use the agent’s smallest model under the user’s plan and a MEX cap, while setup, lookup, and mex check do not make model calls. Learning from statements is opt-in, and anonymous usage telemetry is on by default. Teams with strict data controls should review telemetry settings, model usage, and the proposed Git export before rollout.
Hardware & Deployment Guide
For the 0.9 beta, use a global install (npm i -g mex-agent@next) on Windows, macOS, or Linux with Node.js 22.5+ and node:sqlite, then run mex in the repository. A one-off npx run will not install persistent hooks. Setup modifies user-level agent settings; Codex users must review and trust the hooks before they run. mex off disables integration per repository, and mex uninstall --dry-run previews the rollback; ordinary uninstall preserves notes.
Unqualified npm installs still resolve to stable 0.8.5, which added checked statecharts and an interactive Hub viewer. The newer v0.9.0-beta.1.1 is a prerelease in the narrower CLI track, without Hub, MCP, or skills. For a team already using 0.8, mex upgrade previews the conversion, and applying the reviewed revision creates a separate local branch. A push requires --pr, so teams can evaluate migration without changing their current branch or publishing the result.
mex CLI uses Claude Code and Codex hooks and generated rule files; the 0.9 beta does not expose an MCP server.mex share previews a dedicated branch; --apply --expect <rev> applies the reviewed preview, and --pr is required to push and open a pull request.mex brief previews startup context, mex what shows what was delivered or withheld, and mex check --diff verifies branch changes without writing state.latest is 0.8.5 with the Hub and checked statecharts; next is the narrower 0.9 beta without Hub, MCP, or skills.Git-based engineering teams using Claude Code or Codex that repeatedly restate project conventions and want to review shared agent guidance like code.
You require an MCP server or Hub in the 0.9 beta, cannot allow user-level hooks, or need the system to automatically capture agent discoveries rather than explicitly stated notes.
Quick Start & Installation
npm i -g mex-agent@next cd your-repo mex
Comparison vs. Top Coding, Skills & MCP Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| mex ★ | 1.8k | +1 | TypeScript | MIT | A local CLI that checks project notes against code and delivers them to coding a |
| ECC | 316.1k | +4.2k | JavaScript | MIT | Plugins and CLI workflows for planning, reviewing, and verifying agent-written c |
| ponytail | 204.4k | +4.1k | JavaScript | MIT | A prompt-driven coding-agent plugin for smaller changes and focused tests. |
| rtk | 88.7k | +684 | Rust | Apache-2.0 | A local Rust CLI wrapper that trims command output before coding agents read it. |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/mex-memory/mex.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about mex
How does MEX integrate with Claude Code and Codex, and what does it change?
Do I need a GPU, and which operations incur model usage?
mex recall, and read-only validation with mex check require no model call. Some background rechecks can use the coding agent’s smallest model on your existing plan, subject to a MEX cap. No dedicated GPU, VRAM, or memory requirement is specified for the CLI.Can a company self-host MEX for commercial use?
mex telemetry inspect or disable it with mex telemetry off or DO_NOT_TRACK=1.When is MEX a better choice than hand-maintained rule files, and which release should I evaluate?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy