# How do I install jevmem?

Install jevmem in four steps: add the plugin in the Claude app (**Plugins → Discover → jevmem → Add**), install the CLI with `npm install -g jevmem`, save your TypeSafe API key with `jevmem key`, and run `jevmem enable` in your project's folder.

Last updated: 2026-10-04 · jevmem 0.6.4 · [Install](https://avinash-jetwani.github.io/jevmem/install/) · [Source on GitHub](https://github.com/Avinash-jetwani/jevmem)

Once it runs, deciding what to save takes 0.28 s and costs $0.00016 per message, at TypeSafe's listed price for Jev (measured on 66 held-out turns with jevmem 0.6.0, one run on 2026-09-30, [results](https://github.com/Avinash-jetwani/jevmem/blob/main/results/eval-heldout-2026-09-30-v060.json)). The rest of this page is the repository's install and upgrade notes.

You need a [TypeSafe AI key](https://console.typesafe.ai/keys) for Jev. jevmem writes each line itself; an OpenAI or Anthropic writer is optional and off unless you set `writer` in `jevmem.config.json` ([configuration](https://github.com/Avinash-jetwani/jevmem/blob/main/docs/configuration.md#the-one-line-writer)).

**Option 1: Claude Code plugin (recommended)**

## From the Claude plugin directory

This needs Claude Code 2.1.273 or later: earlier versions don't sync the plugins you add in the Claude app ([Claude Code docs](https://code.claude.com/docs/en/plugins/loading#synced-plugins)).

1. In the Claude app: **Plugins → Discover → jevmem → Add**. The app warns you before it adds the plugin; the warning is about the plugin's local MCP server, `jevmem mcp`, a command the plugin runs on your computer (the CLI from step 2).
2. Install the CLI the plugin runs:

   ```bash
   npm install -g jevmem
   ```

3. Add your TypeSafe key (from [console.typesafe.ai/keys](https://console.typesafe.ai/keys)): run this, then paste the key when it asks. It doesn't show the key as you paste, and saves it in `~/.jevmem/env`, readable only by you.

   ```bash
   jevmem key
   ```

4. In a terminal, in your project's folder, run `jevmem enable`. The plugin does nothing in a project until you do.
5. Start Claude Code in that project, signed in with the same Claude account as the app. The plugin shows as `jevmem@synced` (run `/reload-plugins` if Claude Code asks).
6. `jevmem doctor` checks the setup. If Claude Code shows "jevmem: CLI not found", see [if the plugin can't find the CLI](https://avinash-jetwani.github.io/jevmem/install/#if-the-plugin-cant-find-the-cli).

Claude Code's own memory may also say it saved something; `JEVMEM.md` shows what jevmem saved.

## From the jevmem marketplace

```bash
npm install -g jevmem
claude plugin marketplace add Avinash-jetwani/jevmem
claude plugin install jevmem@jevmem
cd your-project && jevmem enable
```

Add your key with `jevmem key` as in step 3 above, or enter it in Claude Code with `/plugin configure jevmem`, which Claude Code keeps in your system's secure credential store (the `claude plugin install` shell command doesn't ask for it). That setting exists only for a plugin installed from a marketplace: the directory's `jevmem@synced` has no Configure options.

## If the plugin can't find the CLI

The plugin runs the `jevmem` CLI from npm, so install that first. The hooks find it on the PATH Claude Code gives them or, when that PATH lacks it (the desktop app's can), in `/opt/homebrew/bin`, `/usr/local/bin`, `~/.local/bin`, `~/.volta/bin` or the newest Node version under `~/.nvm`. Without it, an enabled project shows "jevmem: CLI not found, so memory is off in this project" on the first prompt of each session, and the MCP server fails to start (`/mcp` shows it as failed). The plugin does nothing until you run `jevmem enable` in a project; what it runs, and how to switch it off: [docs/hooks.md](https://github.com/Avinash-jetwani/jevmem/blob/main/docs/hooks.md#the-claude-code-plugin).

**Option 2: npm** (also sets up Cursor and Codex)

```bash
npm install -g jevmem
cd your-project
jevmem init --tool claude
```

`init` creates `JEVMEM.md`, `jevmem.config.json` and `.jevmem/`, and registers the three Claude Code hooks ([details](https://github.com/Avinash-jetwani/jevmem/blob/main/docs/hooks.md#what-init-sets-up)). Hooks don't get your shell's variables and jevmem doesn't read shell profiles, so save the key with `jevmem key`, which puts it in `~/.jevmem/env`. `jevmem doctor` checks the setup.

**Already have a `CLAUDE.md`?** `jevmem import` splits `CLAUDE.md`, `AGENTS.md` and `.cursor/rules/*` into statements, puts each through the same gate as a turn, and prints what it would add; `--apply` writes them. `--from claude-auto-memory` also reads Claude Code's own auto memory for the project. The source files are only read.

## Works with

What is automatic and what depends on the agent:

| Tool | Setup | Capture | Recall |
|---|---|---|---|
| **Claude Code** | the plugin, or `jevmem init --tool claude` | **Automatic**, every turn, via the `Stop` hook | **Automatic**, every prompt, via `UserPromptSubmit` |
| **Codex** | `jevmem init --tool codex` | **Automatic while `jevmem watch` runs** (it tails Codex's session log for this project and runs the same decide → write path); otherwise agent-initiated via MCP `add_memory`, prompted by an `AGENTS.md` section | Agent-initiated: `search_memory` via MCP, prompted by `AGENTS.md` |
| **Cursor** | `jevmem init --tool cursor` | Agent-initiated: a `.cursor/rules/jevmem.mdc` rule tells the agent to call MCP `add_memory` when you state a decision. Nothing is captured if it doesn't | Agent-initiated: the rule tells it to call `search_memory` before non-trivial tasks |
| **Claude Desktop** | `jevmem init --tool claude-desktop` prints a config snippet to paste (one project per config, named with `--root`) | Manual: ask it to call `add_memory` (no hook, no rule file) | On request: `search_memory` |

MCP `add_memory` goes through the same gate as the hook. Client configs: [docs/mcp.md](https://github.com/Avinash-jetwani/jevmem/blob/main/docs/mcp.md).

## Upgrading

**Upgrading to 0.6.4.** From 0.6.0, 0.6.1, 0.6.2 or 0.6.3, `npm install -g jevmem@latest` is the whole upgrade: the plugin's hooks have not changed since 0.6.0, and the directory and marketplace plugins move to 0.6.4 with the CLI. From 0.5.x, one of the paths below, tested on 2026-09-30 on the 0.6.0 build in a temporary HOME with a project set up on 0.5.10 that kept its lines ([results/upgrade-2026-09-30.txt](https://github.com/Avinash-jetwani/jevmem/blob/main/results/upgrade-2026-09-30.txt)); 0.6.1 to 0.6.4 change nothing in them:

- **From the Claude plugin directory (`jevmem@synced`)**: `npm install -g jevmem@latest` brings everything the two hooks run, dead ends, the new recall, the line made from Jev's sentences, the subagent fix, and `jevmem guard test`, at once. The guard's `PreToolUse` hook is in the 0.6.x plugin, which the directory serves after the release moves its `directory` branch; until your app syncs it, the new CLI runs under the two hooks of the 0.5.7 plugin and the guard is off in plugin sessions. Claude Code downloads plugin updates in the background each time it starts ([Claude Code docs](https://code.claude.com/docs/en/plugins/loading#synced-plugins)), and a session that is open then says `Plugins changed. Run /reload-plugins to activate.`; `jevmem doctor` shows which plugin version is on disk and which CLI its hooks run. If doctor still shows the old version, start `claude` once in a terminal, signed in with the same Claude account as the app: that is what picked up 0.6.2 on the author's Mac.
- **From the jevmem marketplace (`jevmem@jevmem`)**: `npm install -g jevmem@latest`, then update the plugin in Claude Code (`/plugin`, or `claude plugin update jevmem@jevmem`); Claude Code picks up the new plugin because its version changed. With the 0.6.x plugin and an older CLI, the plugin prints one warning line and skips the guard's hook.
- **With `jevmem init` hooks**: `npm install -g jevmem@latest`, then run `jevmem init --tool claude` again in each project: it adds the `PreToolUse` hook next to the two it registered before and changes nothing else; `JEVMEM.md`, `jevmem.config.json` and `.jevmem/` are kept. Until then the two existing hooks already run the new CLI, and `jevmem doctor` says the guard hook is missing. A `jevmem.config.json` written by an earlier version has no `guard` block and gets the defaults (`ask` mode).

## The limits, in short

- jevmem needs a TypeSafe API key ([where to get one, and the install steps](https://avinash-jetwani.github.io/jevmem/install/)).
- Message text is sent to TypeSafe to be scored, with common secrets scrubbed first ([what leaves your machine](https://avinash-jetwani.github.io/jevmem/privacy/)).
- It is automatic in Claude Code, automatic in Codex while `jevmem watch` runs, and in Cursor only when the agent calls it ([what each tool does](https://avinash-jetwani.github.io/jevmem/install/#works-with)).
- Rules every task must follow still belong in `CLAUDE.md` ([jevmem next to CLAUDE.md](https://avinash-jetwani.github.io/jevmem/compare/)).
- The guard is a backstop, not a sandbox ([what it misses](https://avinash-jetwani.github.io/jevmem/guard/#limits)).

Every limit, with the numbers: [the FAQ](https://avinash-jetwani.github.io/jevmem/faq/#what-are-jevmems-limits).
