{
  "markdown": "# Gemini Memory Extension\n\nGemini CLI extension that saves and retrieves project memory from local SQLite, with MCP tools that share the same memory DB.\n\nOfficial Gemini docs this README follows:\n- Writing extensions: https://geminicli.com/docs/extensions/writing-extensions/\n- Releasing extensions: https://geminicli.com/docs/extensions/releasing/\n\n## What You Get\n\n- Hook-based memory capture (`AfterAgent`) and retrieval (`BeforeAgent`, `SessionStart`)\n- Slash commands for memory inspection and cleanup\n- Optional MCP server tools for external agents/clients\n- Local per-project storage by default:\n\n```text\n${HOME}/.gemini/gemini-mem/<repo-folder>/memory.db\n```\n\n## Quick Start (Use This Extension)\n\n```bash\nnpm install\nnpm run build\ngemini extensions link .\ngemini extensions list\n```\n\nThen restart Gemini CLI.\n\n## Daily Dev Loop\n\n1. Edit code.\n2. Rebuild: `npm run build`\n3. Test: `npm test`\n4. Restart Gemini CLI to pick up changes.\n\n## Project Layout\n\n```text\nsrc/\n  hooks/      # SessionStart, BeforeAgent, AfterAgent\n  memory/     # sqlite store, schema, retrieval, dedupe, redaction\n  gemini/     # summarizer/reranker prompts + validators\n  commands/   # mem-status, mem-search, mem-last, mem-prune\n  mcp/        # stdio and HTTP MCP servers + tool handlers\n  runtime/    # process and Gemini CLI adapters\n  cli/        # db init/migration scripts\n```\n\n## Slash Commands\n\n- `/mem:status`\n- `/mem:search <query>`\n- `/mem:last [limit]`\n- `/mem:prune [maxAgeDays] [importanceFloor]`\n\nLocal equivalents:\n\n```bash\nnpm run mem:status\nnpm run mem:status -- --json\nnpm run mem:search -- \"query text\"\nnpm run mem:last -- 5\nnpm run mem:last -- 5 --json\nnpm run mem:prune -- 30 2\n```\n\n## MCP Tools\n\nMCP is decoupled from hook runtime in this extension build. Hook execution does not require MCP server discovery.\n\n- `memory_status`\n- `memory_get_context`\n- `memory_search`\n- `memory_save_observation`\n- `memory_cite`\n- `memory_end_session`\n\nRun transports:\n\n```bash\nnpm run mcp:server\nnpm run mcp:http\n```\n\nIf you want Gemini CLI to auto-discover this MCP server, register it explicitly in your user/project Gemini MCP settings.\n\nDefault HTTP endpoint:\n\n```text\nhttp://127.0.0.1:3303/mcp\n```\n\nRecommended MCP usage order:\n\n1. `memory_get_context`\n2. `memory_save_observation`\n3. `memory_end_session`\n\n## Config\n\nSettings are defined in `gemini-extension.json` (DB path, model, limits, timeouts, project mode, command override).\n\nOpt-in hook telemetry:\n\n- Set `MEM_HOOK_TELEMETRY=true`\n- Writes JSONL events and failures to `<project-db-folder>/hook.log` (for example `${HOME}/.gemini/gemini-mem/<repo>/hook.log`)\n\n## Release Checklist (What To Do)\n\nThis repo already has workflows in `.github/workflows/` and release notes in `PUBLISHING.md`.\n\n1. Update version in both files:\n   - `package.json`\n   - `gemini-extension.json`\n2. Validate locally:\n   - `npm run build`\n   - `npm test`\n3. Commit and tag:\n   - `git tag vX.Y.Z`\n   - `git push origin main --tags`\n4. Let GitHub Actions create/publish the release artifacts.\n5. Install test from users' perspective:\n   - `gemini extensions install <repo-url>`\n   - or `gemini extensions install <repo-url> --ref=vX.Y.Z`\n\nFor gallery discoverability (from official docs):\n\n- Keep repository public.\n- Add GitHub topic `gemini-cli-extension`.\n- Keep `gemini-extension.json` at repository root.\n\n## Verification Commands\n\n```bash\nnpm run build\nnpm test\nnpm run test:hooks\nnpm run test:mcp\nnpm run test:mcp-http\n```\n\n## Contributing\n\nSee `CONTRIBUTING.md`.\n",
  "bytes": 3500,
  "sha": "103f6324b9bdb85f37e8ea41195dc534bbcac2e3aee599fcaf1487dccb31b28c",
  "repo_slug": "djinn-soul/gemini-mem",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_djinn_soul_gemini_mem_47f8df73/readme"
}