hmem-setuplisted
Install: claude install-skill Bumblebiber/hmem
# hmem Setup
## Recommended: `hmem init`
Install hmem globally, then run the interactive installer:
```bash
npm install -g hmem-mcp
hmem init
```
`hmem init` performs all setup steps automatically:
1. Detects installed AI tools (Claude Code, Gemini CLI, OpenCode, Cursor, Windsurf, Cline)
2. Asks for installation scope (system-wide or project-local)
3. Creates the memory directory and optional example database
4. Writes `.mcp.json` with the correct paths for each detected tool
5. Adds session-start instructions to the tool's config file (CLAUDE.md, GEMINI.md, etc.)
6. Creates `hmem.config.json` with sensible defaults
7. Installs all 4 auto-memory hooks (Claude Code only — see Hook Reference below)
8. Copies skill files (slash commands) to the tool's skill directory
After `hmem init`, install the slash-command skills:
```bash
npx hmem update-skills
```
Restart your AI tool and call `read_memory()` to verify.
Non-interactive mode (CI / scripting):
```bash
hmem init --global --tools claude-code --dir ~/.hmem --no-example
```
---
## Hook Reference (Claude Code)
`hmem init` registers 4 hooks in `~/.claude/settings.json`. Each hook is a bash script in `~/.claude/hooks/`.
### 1. UserPromptSubmit — memory load + checkpoint reminder
Script: `~/.claude/hooks/hmem-startup.sh`
- **First message**: injects `additionalContext` telling the agent to call `read_memory()` silently.
- **Every Nth message** (N = `checkpointInterval`, default 20): injects a checkpoint reminder.
-