~/.engram/engram.db.
Installation
After installing Engram, the binary is available at$GOPATH/bin/engram (typically ~/go/bin/engram).
Usage
Core Commands
serve
Start the HTTP API server for agent integrations.number
Port number for the HTTP server. Default:
7437 (ENGR on phone keypad).mcp
Start the MCP (Model Context Protocol) server for AI agent integrations.string
Filter which tools to expose. Options:
agent- 11 tools for AI coding agentsadmin- 3 tools for manual curation (delete, stats, timeline)all- All 14 tools (default)- Comma-separated profiles:
agent,admin - Individual tool names:
mem_save,mem_search
- agent (11 tools):
mem_save,mem_search,mem_context,mem_session_summary,mem_session_start,mem_session_end,mem_get_observation,mem_suggest_topic_key,mem_capture_passive,mem_save_prompt,mem_update - admin (3 tools):
mem_delete,mem_stats,mem_timeline
tui
Launch the interactive terminal UI for browsing memories.- Browse sessions and observations
- Full-text search with FTS5
- View timelines and context
- Vim-style navigation (
j/k,Enter,Esc) - Catppuccin Mocha color scheme
Search & Retrieval
search
Search memories using FTS5 full-text search.string
required
Search query - natural language or keywords. Multiple words are automatically combined.
string
Filter by observation type:
decision, architecture, bugfix, pattern, config, discovery, learning, manualstring
Filter by project name
string
Filter by scope:
project or personalnumber
Maximum results to return (default: 10)
context
Show recent context from previous sessions.string
Filter context by project name. If omitted, shows all recent context.
timeline
Show chronological context around a specific observation.number
required
ID of the observation to center the timeline on
number
Number of observations to show before the target (default: 5)
number
Number of observations to show after the target (default: 5)
Memory Management
save
Save a memory from the command line.string
required
Short, searchable title for the memory
string
required
Memory content. Use the structured format with What, Why, Where, Learned
string
Observation type:
decision, architecture, bugfix, pattern, config, discovery, learning (default: manual)string
Project name to associate with this memory
string
Scope:
project (default) or personalstring
Topic key for upserts (e.g.,
architecture/auth-model). Memories with the same topic_key in the same project+scope are updated instead of creating duplicates.stats
Show memory system statistics.Import & Export
export
Export all memories to JSON.string
Output filename (default:
engram-export.json)import
Import memories from a JSON export file.string
required
JSON file to import (created by
engram export)Import uses
INSERT OR IGNORE for sessions to skip duplicates. All operations run in a single atomic transaction.Git Sync
sync
Export and import memories using Git-based chunked sync.boolean
Import new chunks from
.engram/ directory into local databaseboolean
Show sync status (local vs remote chunks, pending imports)
string
Filter export to a specific project. Default: current directory name
boolean
Export ALL projects (ignore directory-based filter)
Each
sync creates a new chunk file - old chunks are never modified. This prevents merge conflicts when multiple developers sync to the same repository.Agent Setup
setup
Install Engram plugin for AI coding agents.string
Agent name:
opencode, claude-code, gemini-cli, or codex. If omitted, shows interactive selection.- opencode - Installs to
~/.config/opencode/plugins/engram.ts - claude-code - Installs to
~/.claude/plugins/ - gemini-cli - Configures
~/.gemini/settings.json - codex - Configures
~/.codex/config.toml
Utility Commands
version
Print Engram version.help
Show help message.Exit Codes
0- Success1- Error (invalid command, missing arguments, operation failed)