# Basic Memory Pi Setup

Set up Basic Memory for a Pi workspace.

- Repository: https://github.com/basicmachines-co/basic-memory (4440 stars)
- Category: AI and agents
- License: AGPL-3.0
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add basicmachines-co/basic-memory --skill basic-memory-pi-setup -g -a claude-code -y`
Codex: `npx skills add basicmachines-co/basic-memory --skill basic-memory-pi-setup -g -a codex -y`
Cursor: `npx skills add basicmachines-co/basic-memory --skill basic-memory-pi-setup -g -a cursor -y`
Gemini CLI: `npx skills add basicmachines-co/basic-memory --skill basic-memory-pi-setup -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add basicmachines-co/basic-memory`

## Description

Set up Basic Memory for a Pi workspace. Use when Basic Memory is not configured, /bm-status shows no project, recall returns setup guidance, or the user asks to enable durable memory, choose CLI vs MCP, or configure automatic continuity.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Set up Basic Memory for Pi

Use this skill when the user wants Basic Memory continuity in a Pi workspace or when recall reports that the workspace is not configured.

## Goal

Create one explicit, project-local Pi configuration file:

```text
.pi/basic-memory.json
```

This keeps routing predictable and avoids mutating the user's global Basic Memory default project.

## Steps

1. Check status with `/bm-status` when available.
2. Ask which Basic Memory project should own this workspace's Pi checkpoints, unless the user already named one.
3. Prefer a project name for readability. Use `projectId` only when disambiguation is needed.
4. Create `.pi/basic-memory.json` in the workspace with opinionated defaults:

```json
{
  "transport": "cli",
  "project": "PROJECT_NAME",
  "captureFolder": "pi/sessions",
  "useHookFlow": true,
  "autoRecall": true,
  "autoCapture": true
}
```

5. If the user wants MCP mode, install the adapter and switch transport:

```bash
pi install npm:pi-mcp-adapter
```

```json
{
  "transport": "mcp",
  "project": "PROJECT_NAME",
  "captureFolder": "pi/sessions",
  "useHookFlow": true,
  "autoRecall": true,
  "autoCapture": true
}
```

6. If the user wants automatic recall/capture or MCP tools, confirm they trust this workspace's project mapping, then set `BASIC_MEMORY_PI_TRUST_WORKSPACE=1` in the environment used to launch Pi. A project mapping alone does not enable automation. Manual `/bm-recall` and `/bm-capture` remain available with an explicit mapping without this trust setting.
7. Run `/bm-status` and check the effective auto recall/capture state, then `/bm-recall setup` or `/bm-capture Pi setup checkpoint` to verify the path.

## Defaults and escape hatches

The rest: https://github.com/basicmachines-co/basic-memory/blob/HEAD/integrations/pi/skills/basic-memory-pi-setup/SKILL.md
