greprag
v5.78.3
Published
GrepRAG — agent memory for Claude Code, Codex, OpenCode, and Grok Build.
Downloads
9,501
Maintainers
Readme
GrepRAG
Agent memory as a service. Episodic project memory for Claude Code, Codex, and OpenCode — captures supported agent turns, compacts into hourly/daily/weekly summaries, and exposes two access patterns: lexical search by topic (greprag memory search "<query>") or a session recap (greprag memory recap). The memory product line is marketed as Odyssey. Also handles cross-project async messaging via inbox.
Quick Start
npm i -g grepragThen either run /greprag inside a supported agent, or run greprag init in a terminal. Bare greprag init detects Claude Code, Codex, and OpenCode; if more than one is present in a non-interactive shell, it prints the explicit command to use.
Claude Code
Run /greprag in any Claude Code session, or:
greprag init --claudeCodex
Run /greprag in Codex after install, or:
greprag init --codex --tenant-id <your-handle>Example: greprag init --codex --tenant-id tanya.
The handle becomes your public GrepRAG address, such as
[email protected].
Codex requires one extra trust step: after init/update, open Codex Desktop Settings -> Settings -> Hooks, trust the 6 GrepRAG hooks, then start a fresh session.
Run greprag codex doctor to verify the hook file, current Codex thread, and
trust setup. Codex inbox rows surface through SessionStart/UserPromptSubmit
hooks; there is no startup watcher to install.
OpenCode
greprag init --opencodeThis installs the memory plugin at ~/.config/opencode/plugins/greprag-memory.js.
All platforms share project identity through .greprag/project.json when a file anchor is needed, or git-derived identity when available. Legacy .claude/project.json anchors still read and migrate on init.
Status check:
greprag status --all-platformsWhat's active
- Memory (episodic project memory, marketed as Odyssey): supported agent turns captured via platform hooks/plugin, compacted into hourly/daily/weekly summaries. Query via
greprag memory search "<query>"(lexical retrieval, v5 RRF+adjacency pipeline) orrecap/daily/weekly/hourly/turns/ships(by time window). (greprag memory briefingandgreprag odyssey ...are silent back-compat aliases.) - Memory recap: surfaces recent memory rows through platform hooks or
/greprag - Inbox: cross-project async messaging between your projects or other GrepRAG users
Commands
| Command | Description |
|---------|-------------|
| greprag status --all-platforms | Check auth, hooks/plugins, skills, and project anchor |
| greprag init | Detect/ask which agent to configure |
| greprag init --claude | Configure Claude Code hooks + skill |
| greprag init --codex --tenant-id <handle> | Configure Codex hooks + skill |
| greprag codex doctor | Diagnose Codex hooks, session id, and trust path |
| greprag init --opencode | Configure OpenCode plugin |
| greprag init --global | Global anchor for ephemeral sessions |
| greprag doctor | Diagnose project_id drift and orphan consolidation |
| greprag memory search "<query>" | Lexical search over the project's memory (v5 RRF+adjacency pipeline) |
| greprag memory recap | Weekly + recent daily summaries (SessionStart shape; alias: briefing) |
| greprag memory daily --last N | Newest N daily summaries (also: weekly / hourly / turns / ships) |
| greprag inbox | List unread messages (auto-marks read) |
| greprag inbox --all | Full message history |
| greprag send "msg" --to <addr> | Send markdown message across tenants |
| greprag project-id | Print current project's UUID |
Requirements
- Node.js 18+
- Claude Code, Codex, or OpenCode
- A GrepRAG handle or API key.
--tenant-id <handle>provisions the key.
How it works
The CLI is a thin HTTP client. All intelligence — scoring, compaction, and retrieval — lives server-side. Platform hooks/plugins call the API; the server handles everything else.
