Skip to main content

Local-first developer memory layer

Project description

Recall

Local-first developer memory layer. Captures every developer activity — terminal commands, git commits, file edits, repo opens, AI chat sessions — into a structured SQLite database with a FAISS vector index. Enables natural language recall:

recall ask "what did I work on last Tuesday?"
recall ask "how did I fix the auth bug?"
recall today
recall timeline

Quick Start

pip install dev-recall
recall init
source .zshrc  # or .bashrc

recall init will:

  1. Create ~/.local/share/recall/ and ~/.config/recall/
  2. Initialize the SQLite database + FAISS vector index
  3. Install the zsh/bash shell hook (appends source line to your rc file)
  4. Set git config --global core.hooksPath to capture all commits
  5. Start the background daemon (via systemd user service or subprocess)

Commands

Command Description
recall init First-time setup
recall ask "<query>" Natural language search with LLM answer
recall today Summary of today's activity
recall week Summary of this week's activity
recall timeline Chronological event list for a day
recall search "<query>" Raw hybrid search (no LLM)
recall repos List all tracked repos
recall stats Capture statistics
recall export Export events as JSON or CSV
recall config View/edit configuration
recall privacy list Show what's captured
recall privacy delete Delete captured events
recall privacy ignore --cmd "pattern" Add a privacy filter
recall daemon start/stop/status/logs Manage the background daemon
recall mcp-serve Start MCP server (for Claude Code / Copilot)
recall vscode install Build and install VS Code extension

Architecture

Collectors (shell hook, git hooks, VS Code ext, AI log watcher)
    ↓ events (TSV files + HTTP POST)
Daemon (FileWatcher → Enricher → SessionDetector → DB insert → Embedder)
    ↓
Storage (SQLite events.db + FTS5, FAISS vectors.faiss)
    ↓
Query (Hybrid FAISS+FTS5 → RRF → LLM via OpenRouter)
    ↓
CLI + MCP Server

Data Sources

Shell commands (zsh / bash)

Add to ~/.zshrc (done automatically by recall init):

source ~/.config/dev-recall/hook.zsh

Git commits

recall init sets core.hooksPath globally — all future commits in any repo are captured.

VS Code activity

Install the extension:

recall vscode install

AI chat sessions

Automatically scanned from:

  • GitHub Copilot Chat: ~/.config/Code/User/workspaceStorage/*/GitHub.copilot-chat/debug-logs/
  • Claude Code: ~/.claude/projects/*/sessions/
  • Aider: .aider.chat.history.md in git repos
  • Cursor: ~/.config/Cursor/User/workspaceStorage/

LLM Integration

Recall uses OpenRouter for the ask command and daily summaries.

export OPENROUTER_API_KEY=sk-or-...
recall ask "what was I debugging yesterday?"

Without an API key, recall ask falls back to --no-llm mode (shows retrieved events directly). All other commands work fully offline.


MCP Server

Use Recall as a context source in Claude Code or VS Code Copilot:

Claude Code (~/.config/claude/mcp.json):

{
  "mcpServers": {
    "dev-recall": {
      "command": "dev-recall",
      "args": ["mcp-serve"]
    }
  }
}

VS Code / Copilot (.vscode/mcp.json):

{
  "servers": {
    "dev-recall": {
      "type": "stdio",
      "command": "dev-recall",
      "args": ["mcp-serve"]
    }
  }
}

Available MCP tools: recall, today_summary, recent_repos, find_command, timeline


Privacy

  • Commands matching *password*, *secret*, *token* etc. are dropped before storage
  • AI chat messages are truncated to 200 characters (intent only, not full content)
  • File saves store only path + language, never file content
  • All data is local only — LLM calls send only small event snippets, only when you run ask
  • Default retention: 90 days (configurable)
recall privacy list           # see what's captured
recall privacy delete --before 2026-01-01
recall privacy ignore --cmd "*mycompany*"

Configuration

Config file: ~/.config/dev-recall/config.json

recall config                          # show all settings
recall config daemon_port 8080        # change port
recall config retention_days 30       # shorter retention

Key settings:

{
  "daemon_port": 27182,
  "embedding_model": "all-MiniLM-L6-v2",
  "llm_model": "anthropic/claude-sonnet-4",
  "retention_days": 90,
  "capture": { "terminal": true, "git": true, "vscode": true, "ai_chat": true }
}

Data Storage

~/.local/share/dev-recall/
├── events.db       # SQLite (events + FTS5 + sessions + daily_summaries)
├── vectors.faiss   # FAISS vector index
├── shell.tsv       # shell hook ring buffer
├── git.tsv         # git hook ring buffer
└── daemon.pid      # running daemon PID

~/.config/dev-recall/
├── config.json
├── hook.zsh / hook.bash
└── git-hooks/post-commit + post-checkout

Development

git clone <repo>
cd dev-recall
pip install -e ".[dev]"
pytest

Sandbox testing

recall init makes system-wide changes (modifies ~/.zshrc, sets a global git config core.hooksPath, starts a background daemon). Use the provided Docker sandbox to test safely without touching your host environment.

Prerequisites: Docker

# Interactive shell — explore freely
./sandbox.sh

# Run the full test suite
./sandbox.sh test

# Run `recall init` and inspect every file it creates
./sandbox.sh init

# Run any arbitrary command
./sandbox.sh "recall --help"

What the sandbox isolates:

Risk Mitigation
Modifies ~/.zshrc Only affects the container's home directory
Sets global git config core.hooksPath Sandboxed git config, discarded on exit
Starts a background daemon Killed automatically when the container exits
Network calls to OpenRouter Blocked via --network none
Privilege escalation --cap-drop ALL --security-opt no-new-privileges

Alternatively, use a throwaway VM: multipass launch --name dev-recall-test


Roadmap

  • v0.1 (current): Shell + git + daemon + CLI ask/today/timeline/stats
  • v0.2: VS Code extension + AI chat parsers + week/repos/search/export + auto-summary
  • v0.3: MCP server + privacy management + Aider/Cursor parsers
  • v1.0: Cross-machine sync + web dashboard + Wakatime-compatible API

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dev_recall-0.2.5.tar.gz (69.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dev_recall-0.2.5-py3-none-any.whl (75.7 kB view details)

Uploaded Python 3

File details

Details for the file dev_recall-0.2.5.tar.gz.

File metadata

  • Download URL: dev_recall-0.2.5.tar.gz
  • Upload date:
  • Size: 69.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for dev_recall-0.2.5.tar.gz
Algorithm Hash digest
SHA256 ad3d85fdd1263d7452cfd8c6f43a546ccd07a3cba6d1281535e72e68c2da6ae3
MD5 5400e9841e4f3f92bef3fc0578728fbf
BLAKE2b-256 a8c9dc4770393d072e75c6e9ac077c02fb8fa4b3e51b04c42795579d9711a3b5

See more details on using hashes here.

File details

Details for the file dev_recall-0.2.5-py3-none-any.whl.

File metadata

  • Download URL: dev_recall-0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 75.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for dev_recall-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 698e4c5a855cf83e2158db6718471af5a6e4ac266cab8f4640c0e990910320ee
MD5 8940b26133381b9876819a460b6f1988
BLAKE2b-256 1f16e3d6abbfa190233f0d6c96c2922a1f5b3377c0a70dbe376601aa329de1f2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page