Skip to main content

Overview

The memory setup command group installs EchoVault integration hooks into various coding agents. This enables automatic memory context injection at session start.

Syntax

memory setup <agent> [OPTIONS]

Supported Agents

  • claude-code - Claude Code (Anthropic)
  • cursor - Cursor AI editor
  • codex - Codex AI
  • opencode - OpenCode (MCP server)

Subcommands

claude-code

Install hooks into Claude Code settings.
memory setup claude-code [OPTIONS]

Options

--config-dir
string
Path to .claude directory. Default: ~/.claude (global) or ./.claude (project).
--project
flag
Install in current project instead of globally (uses ./.claude).

Examples

Global installation:
memory setup claude-code
Output:
EchoVault hooks installed to /home/user/.claude
Project-specific installation:
memory setup claude-code --project
Output:
EchoVault hooks installed to /home/user/myproject/.claude
Custom directory:
memory setup claude-code --config-dir /path/to/.claude

cursor

Install hooks into Cursor hooks.json.
memory setup cursor [OPTIONS]

Options

--config-dir
string
Path to .cursor directory. Default: ~/.cursor (global) or ./.cursor (project).
--project
flag
Install in current project instead of globally (uses ./.cursor).

Examples

Global installation:
memory setup cursor
Output:
EchoVault hooks installed to /home/user/.cursor/hooks.json
Project-specific installation:
memory setup cursor --project
Custom directory:
memory setup cursor --config-dir /path/to/.cursor

codex

Install EchoVault section into Codex AGENTS.md and config.toml.
memory setup codex [OPTIONS]

Options

--config-dir
string
Path to .codex directory. Default: ~/.codex (global) or ./.codex (project).
--project
flag
Install in current project instead of globally (uses ./.codex).

Examples

Global installation:
memory setup codex
Output:
EchoVault integration added to /home/user/.codex/AGENTS.md and config.toml
Project-specific installation:
memory setup codex --project
Custom directory:
memory setup codex --config-dir /path/to/.codex

opencode

Install EchoVault MCP server into OpenCode.
memory setup opencode [OPTIONS]

Options

--project
flag
Install in current project instead of globally.

Examples

Global installation:
memory setup opencode
Output:
EchoVault MCP server installed to OpenCode
Project-specific installation:
memory setup opencode --project

Global vs Project Installation

Global installation (default)

memory setup cursor
  • Installs to home directory: ~/.cursor, ~/.claude, etc.
  • Works across all projects
  • Agent sees all memories (use --project flag in hooks to filter)

Project-specific installation

memory setup cursor --project
  • Installs to current directory: ./.cursor, ./.claude, etc.
  • Only active in this project
  • Useful for team-shared configurations

What Gets Installed

Claude Code

Adds memory context hook to .claude/settings.json:
{
  "hooks": {
    "session_start": "memory context --project --limit 10"
  }
}

Cursor

Adds memory hook to .cursor/hooks.json:
{
  "hooks": [
    {
      "name": "echovault-context",
      "command": "memory context --project --limit 10",
      "when": "session_start"
    }
  ]
}

Codex

Adds EchoVault section to .codex/AGENTS.md and registers the hook in config.toml.

OpenCode

Registers the EchoVault MCP server in OpenCode’s MCP configuration.

Verification

Check installation

Claude Code:
cat ~/.claude/settings.json
Cursor:
cat ~/.cursor/hooks.json
Codex:
cat ~/.codex/AGENTS.md | grep -A 10 "EchoVault"

Test the hook

# Simulate what the agent will run
memory context --project --limit 10

Troubleshooting

Hook not running

  1. Check installation:
    cat ~/.cursor/hooks.json
    
  2. Verify command works:
    memory context --project
    
  3. Check agent logs:
    • Cursor: Check developer console
    • Claude Code: Check extension logs

Permission errors

# Fix permissions
chmod +x $(which memory)

# Reinstall
memory setup cursor

Config directory not found

# Create it first
mkdir -p ~/.cursor

# Then install
memory setup cursor

Multiple Agents

You can install EchoVault for multiple agents:
memory setup cursor
memory setup claude-code
memory setup codex
memory setup opencode
Each agent will independently call memory context at session start.

Use Cases

Setup for new project

cd myproject

# Initialize memory
memory init
memory config init

# Install project-specific hooks
memory setup cursor --project
memory setup claude-code --project

# Test
memory context --project

Setup for all projects (global)

# Install globally
memory setup cursor
memory setup claude-code
memory setup codex
memory setup opencode

# Test
cd ~/anyproject
memory context --project

Team setup

cd team-project

# Project-specific installation
memory setup cursor --project

# Commit configuration
git add .cursor/
git commit -m "Add EchoVault integration"
git push

# Team members get hooks automatically
Use project-specific installation (--project) when working with a team to share the configuration via git.
After installation, restart your coding agent to activate the hooks. The hooks run automatically at session start.

Build docs developers (and LLMs) love