{"id":45137462,"url":"https://github.com/mobydeck/pantry","last_synced_at":"2026-02-26T11:01:16.206Z","repository":{"id":339482570,"uuid":"1162084793","full_name":"mobydeck/pantry","owner":"mobydeck","description":"Local note storage for coding agents","archived":false,"fork":false,"pushed_at":"2026-02-23T15:22:43.000Z","size":102,"stargazers_count":19,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-24T13:31:20.768Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mobydeck.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-02-19T21:17:56.000Z","updated_at":"2026-02-23T22:30:01.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/mobydeck/pantry","commit_stats":null,"previous_names":["mobydeck/pantry"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/mobydeck/pantry","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mobydeck%2Fpantry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mobydeck%2Fpantry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mobydeck%2Fpantry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mobydeck%2Fpantry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mobydeck","download_url":"https://codeload.github.com/mobydeck/pantry/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mobydeck%2Fpantry/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29817065,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-25T05:36:42.804Z","status":"ssl_error","status_checked_at":"2026-02-25T05:36:31.934Z","response_time":61,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-02-20T00:07:45.677Z","updated_at":"2026-02-26T11:01:16.060Z","avatar_url":"https://github.com/mobydeck.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pantry\n\nLocal note storage for coding agents. Your agent keeps notes on decisions, bugs, and context across sessions — no cloud, no API keys required, no cost.\n\n## Features\n\n- **Works with multiple agents** — Claude Code, Cursor, Codex, OpenCode, RooCode. One command sets up MCP config for your agent.\n- **MCP native** — Runs as an MCP server exposing `pantry_store`, `pantry_search`, and `pantry_context` as tools.\n- **Local-first** — Everything stays on your machine. Notes are stored as Markdown in `~/.pantry/shelves/`, readable in Obsidian or any editor.\n- **Zero idle cost** — No background processes, no daemon, no RAM overhead. The MCP server only runs when the agent starts it.\n- **Hybrid search** — FTS5 keyword search works out of the box. Add Ollama, OpenAI, or OpenRouter for semantic vector search.\n- **Secret redaction** — 3-layer redaction strips API keys, passwords, and credentials before anything hits disk.\n- **Cross-agent** — Notes stored by one agent are searchable by all agents. One pantry, many agents.\n\n## Install\n\n### Download a binary (recommended)\n\n1. Go to the [Releases](../../releases) page and download the binary for your platform:\n\n   | Platform | File |\n   |----------|------|\n   | macOS (Apple Silicon) | `pantry-darwin-arm64` |\n   | macOS (Intel) | `pantry-darwin-amd64` |\n   | Linux x86-64 | `pantry-linux-amd64` |\n   | Linux ARM64 | `pantry-linux-arm64` |\n   | Windows x86-64 | `pantry-windows-amd64.exe` |\n\n2. Make it executable and move it to your PATH (macOS/Linux):\n\n   ```bash\n   chmod +x pantry-darwin-arm64\n   mv pantry-darwin-arm64 /usr/local/bin/pantry\n   ```\n\n3. On macOS you may need to allow the binary in **System Settings → Privacy \u0026 Security** the first time you run it.\n\n### Initialize\n\n```bash\npantry init\n```\n\n### Connect your agent\n\n```bash\npantry setup claude-code   # or: cursor, codex, opencode, roocode\n```\n\nThis writes the MCP server entry into your agent's config file. Restart the agent and pantry will be available as a tool.\n\nRun `pantry doctor` to verify everything is working.\n\n### Tell your agent to use Pantry\n\nMCP registration makes the tools available, but your agent also needs instructions to actually use them. The `setup` command installs a skill file automatically for agents that support it (Claude Code, Cursor, Codex). For other agents — or if you prefer to use a project-level rules file — add the following to your `AGENTS.md`, `.rules`, `CLAUDE.md`, or equivalent:\n\n```markdown\n## Pantry — persistent notes\n\nYou have access to a persistent note storage system via the `pantry` MCP tools.\n\n**Session start — MANDATORY**: Before doing any work, retrieve notes from previous sessions:\n- Call `pantry_context` to get recent notes for this project\n- If the request relates to a specific topic, also call `pantry_search` with relevant terms\n\n**Session end — MANDATORY**: After any task that involved changes, decisions, bugs, or learnings, call `pantry_store` with:\n- `title`: short descriptive title\n- `what`: what happened or was decided\n- `why`: reasoning behind it\n- `impact`: what changed\n- `category`: one of `decision`, `pattern`, `bug`, `context`, `learning`\n- `details`: full context for a future agent with no prior knowledge\n\nDo not skip either step. Notes are how context survives across sessions.\n```\n\n## Semantic search (optional)\n\nKeyword search (FTS5) works with no extra setup. To also enable semantic vector search, configure an embedding provider in `~/.pantry/config.yaml`:\n\n**Ollama (local, free):**\n```yaml\nembedding:\n  provider: ollama\n  model: nomic-embed-text\n  base_url: http://localhost:11434\n```\nInstall [Ollama](https://ollama.com), then: `ollama pull nomic-embed-text`\n\n**OpenAI:**\n```yaml\nembedding:\n  provider: openai\n  model: text-embedding-3-small\n  api_key: sk-...\n```\n\n**OpenRouter:**\n```yaml\nembedding:\n  provider: openrouter\n  model: openai/text-embedding-3-small\n  api_key: sk-or-...\n```\n\nAfter changing providers, rebuild the vector index:\n```bash\npantry reindex\n```\n\n## Environment variables\n\nAll config file values can be overridden with environment variables. They take precedence over `~/.pantry/config.yaml` and are useful when the MCP host injects secrets into the environment instead of writing them to disk.\n\n| Variable | Description | Example |\n|----------|-------------|---------|\n| `PANTRY_HOME` | Override pantry home directory | `/data/pantry` |\n| `PANTRY_EMBEDDING_PROVIDER` | Embedding provider | `ollama`, `openai`, `openrouter` |\n| `PANTRY_EMBEDDING_MODEL` | Embedding model name | `text-embedding-3-small` |\n| `PANTRY_EMBEDDING_API_KEY` | API key for the embedding provider | `sk-...` |\n| `PANTRY_EMBEDDING_BASE_URL` | Base URL for the embedding API | `http://localhost:11434` |\n| `PANTRY_CONTEXT_SEMANTIC` | Semantic search mode | `auto`, `always`, `never` |\n\n### Examples\n\nUse OpenAI embeddings without putting the key in the config file:\n\n```bash\nPANTRY_EMBEDDING_PROVIDER=openai \\\nPANTRY_EMBEDDING_MODEL=text-embedding-3-small \\\nPANTRY_EMBEDDING_API_KEY=sk-... \\\npantry search \"rate limiting\"\n```\n\nPoint a second pantry instance at a different directory (useful for testing or per-workspace isolation):\n\n```bash\nPANTRY_HOME=/tmp/pantry-test pantry init\nPANTRY_HOME=/tmp/pantry-test pantry store -t \"test note\" -w \"testing\" -y \"because\"\n```\n\nPass the API key through the MCP server config so it is injected at launch time rather than stored on disk. Example for Claude Code (`~/.claude/claude_desktop_config.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"pantry\": {\n      \"command\": \"pantry\",\n      \"args\": [\"mcp\"],\n      \"env\": {\n        \"PANTRY_EMBEDDING_PROVIDER\": \"openai\",\n        \"PANTRY_EMBEDDING_MODEL\": \"text-embedding-3-small\",\n        \"PANTRY_EMBEDDING_API_KEY\": \"sk-...\"\n      }\n    }\n  }\n}\n```\n\nDisable semantic search entirely for a single invocation (falls back to FTS5 keyword search):\n\n```bash\nPANTRY_CONTEXT_SEMANTIC=never pantry search \"connection pool\"\n```\n\n## Commands\n\n```\npantry init                  Initialize pantry (~/.pantry)\npantry doctor                Check health and capabilities\npantry store                 Store a note\npantry search \u003cquery\u003e        Search notes\npantry retrieve \u003cid\u003e         Show full note details\npantry list                  List recent notes\npantry remove \u003cid\u003e           Delete a note\npantry notes                 List daily note files (alias: log)\npantry config                Show current configuration\npantry config init           Generate a starter config.yaml\npantry setup \u003cagent\u003e         Configure MCP for an agent\npantry uninstall \u003cagent\u003e     Remove agent MCP config\npantry reindex               Rebuild vector search index\npantry version               Print version\n```\n\n## Storing notes manually\n\n```bash\npantry store \\\n  -t \"Switched to JWT auth\" \\\n  -w \"Replaced session cookies with JWT\" \\\n  -y \"Needed stateless auth for API\" \\\n  -i \"All endpoints now require Bearer token\" \\\n  -g \"auth,jwt\" \\\n  -c \"decision\"\n```\n\n## Flag reference\n\n`pantry store`:\n\n| Flag | Short | Description |\n|------|-------|-------------|\n| `--title` | `-t` | Title (required) |\n| `--what` | `-w` | What happened or was learned (required) |\n| `--why` | `-y` | Why it matters |\n| `--impact` | `-i` | Impact or consequences |\n| `--tags` | `-g` | Comma-separated tags |\n| `--category` | `-c` | `decision`, `pattern`, `bug`, `context`, `learning` |\n| `--details` | `-d` | Extended details |\n| `--source` | `-s` | Source agent identifier |\n| `--project` | `-p` | Project name (defaults to current directory) |\n\n`pantry list` / `pantry search` / `pantry notes`:\n\n| Flag | Short | Description |\n|------|-------|-------------|\n| `--project` | `-p` | Filter to current project |\n| `--limit` | `-n` | Maximum results |\n| `--source` | `-s` | Filter by source agent |\n| `--query` | `-q` | Text filter (list only) |\n\n## Under the hood\n\n### CGO-free, pure Go\n\nPantry is built without CGO. SQLite runs as a WebAssembly module inside the process via [wazero](https://github.com/tetratelabs/wazero) — a zero-dependency, pure-Go WASM runtime. This means:\n\n- **No C compiler needed** — `go build` just works, no `gcc`, `musl`, or `zig` required\n- **True static binaries** — the distributed binaries have no shared library dependencies (`ldd` shows nothing)\n- **Cross-compilation is trivial** — all five platform targets (`GOOS`/`GOARCH`) build from a single `go build` invocation with `CGO_ENABLED=0`\n- **Reproducible builds** — no C toolchain version drift\n\nThe tradeoff: first query of a session pays a one-time ~10 ms WASM compilation cost. Subsequent queries are fast.\n\n### SQLite extensions\n\nTwo SQLite extensions are compiled into the binary as embedded WASM blobs:\n\n**[sqlite-vec](https://github.com/asg017/sqlite-vec)** — vector similarity search. Pantry uses it to store note embeddings as 768- or 1536-dimensional `float32` vectors in a `vec0` virtual table, then retrieves the nearest neighbours with a single SQL query:\n\n```sql\nSELECT note_id, distance\nFROM vec_notes\nWHERE embedding MATCH ?\nORDER BY distance\nLIMIT 20\n```\n\nThe extension is loaded at connection open time via `sqlite3_load_extension` equivalent in the WASM host.\n\n**FTS5** — SQLite's built-in full-text search virtual table. Notes are indexed in an `fts_notes` shadow table using the `porter` tokenizer (English stemming). FTS5 handles keyword search when no embedding provider is configured, and also runs alongside vector search as a hybrid fallback.\n\n### Storage layout\n\nNotes live in `~/.pantry/`:\n\n```\n~/.pantry/\n  config.yaml          # embedding provider, model, API key\n  pantry.db            # SQLite database (WAL mode)\n  shelves/\n    project/\n      YYYY-MM-DD.md    # daily Markdown files — human-readable, Obsidian-compatible\n```\n\nThe SQLite database holds structured note data and search indexes. The Markdown files in `shelves/` are append-only daily logs — they're the canonical human-readable view and survive even if the database is deleted (run `pantry reindex` to rebuild from them).\n\n### GORM + vendored gormlite\n\nThe ORM layer uses [GORM](https://gorm.io) with a vendored copy of [gormlite](https://github.com/ncruces/go-sqlite3/tree/main/gormlite) — the SQLite GORM dialector from the same `ncruces/go-sqlite3` ecosystem. It's vendored (at `internal/gormlite/`) rather than imported as a module because the gormlite sub-module is versioned independently from the parent `go-sqlite3` package, and the sqlite-vec WASM binary constrains the host runtime to `go-sqlite3 v0.23.x`. Vendoring decouples dialector quality from host runtime version.\n\n### Dependency count\n\nThe binary embeds everything it needs. Runtime dependencies: zero. The full `go.mod` direct dependency list:\n\n| Package | Role |\n|---------|------|\n| `ncruces/go-sqlite3` | SQLite via WASM/wazero |\n| `asg017/sqlite-vec-go-bindings` | Vector search extension (WASM blob) |\n| `tetratelabs/wazero` | Pure-Go WebAssembly runtime |\n| `gorm.io/gorm` | ORM |\n| `modelcontextprotocol/go-sdk` | MCP server |\n| `openai/openai-go` | OpenAI/OpenRouter embedding API |\n| `spf13/cobra` | CLI |\n| `google/uuid` | Note IDs |\n| `go.yaml.in/yaml/v3` | Config parsing |\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmobydeck%2Fpantry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmobydeck%2Fpantry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmobydeck%2Fpantry/lists"}