Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 17 additions & 7 deletions integrations.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
"threadSave": {
"method": "cli-native",
"runtime": "claude-code",
"command": "nmem t save --from claude-code"
"command": "nmem t save --from claude-code",
"historicalCommand": "nmem t sync --from claude-code --all-projects"
},
"autonomy": {
"bootstrap": "automatic",
Expand All @@ -45,7 +46,8 @@
"bestResultRequires": [
"Install the native connector",
"Keep nmem available on this machine",
"Restart Claude Code after install or update"
"Restart Claude Code after install or update",
"Run nmem t sync --from claude-code --all-projects --apply only when you want to import older Claude Code sessions"
]
},
"install": {
Expand Down Expand Up @@ -135,7 +137,8 @@
"threadSave": {
"method": "cli-native",
"runtime": "gemini-cli",
"command": "nmem t save --from gemini-cli"
"command": "nmem t save --from gemini-cli",
"historicalCommand": "nmem t sync --from gemini-cli --all-projects"
},
"autonomy": {
"bootstrap": "automatic",
Expand All @@ -146,7 +149,8 @@
"Install the Gemini extension",
"Keep the bundled MCP endpoint local, or use nmem config mcp show --host gemini-cli to override mcpServers.nowledge-mem for remote Mem",
"Keep nmem available on this machine",
"Start a fresh Gemini CLI session after install"
"Start a fresh Gemini CLI session after install",
"Run nmem t sync --from gemini-cli --all-projects --apply only when you want to import older Gemini CLI sessions"
]
},
"install": {
Expand Down Expand Up @@ -188,7 +192,8 @@
"threadSave": {
"method": "hook+cli-native",
"runtime": "codex",
"command": "nmem t save --from codex"
"command": "nmem t save --from codex",
"historicalCommand": "nmem t sync --from codex --all-projects"
},
"autonomy": {
"bootstrap": "guided",
Expand All @@ -200,6 +205,7 @@
"Run the bundled hook setup after install or update so Codex enables lifecycle hooks, enables plugin-bundled hooks, keeps the Nowledge Mem Stop hook enabled in /hooks, and can install a managed MCP override from nmem config when needed",
"Use the bundled local MCP server, or use nmem config mcp show --host codex to override mcp_servers.nowledge-mem for remote Mem or authenticated localhost",
"Keep nmem available on this machine",
"Run nmem t sync --from codex --all-projects --apply only when you want to import older Codex sessions",
"Merge the package AGENTS.md into the project for stronger follow-through"
]
},
Expand Down Expand Up @@ -672,7 +678,7 @@
"name": "Pi",
"category": "coding",
"type": "plugin",
"version": "0.8.0",
"version": "0.8.1",
"directory": "nowledge-mem-pi-package",
"transport": "plugin+cli",
"capabilities": {
Expand All @@ -686,7 +692,8 @@
},
"threadSave": {
"method": "plugin-capture",
"note": "The Pi extension syncs completed session branches as Mem threads; save-thread remains available for curated handoff summaries."
"historicalCommand": "nmem t sync --from pi",
"note": "The Pi extension syncs completed session branches as Mem threads; nmem t sync --from pi can backfill older Pi session files; nowledge-mem-pi-sync remains an older-CLI fallback; save-thread remains available for curated handoff summaries."
},
"autonomy": {
"bootstrap": "guided",
Expand All @@ -697,6 +704,7 @@
"Install the Pi package",
"Keep nmem available on this machine",
"Restart Pi after install or update so the extension is loaded",
"Run nmem t sync --from pi --apply only when you want to import older Pi sessions",
"Use save-thread only when you want an extra curated handoff summary"
]
},
Expand Down Expand Up @@ -786,6 +794,7 @@
},
"threadSave": {
"method": "sdk-extract",
"historicalCommand": "nmem t sync --from opencode --all-projects",
"note": "save_thread reads session messages via OpenCode SDK and posts to Nowledge Mem thread API over HTTP; save_handoff available as lighter alternative"
},
"autonomy": {
Expand All @@ -797,6 +806,7 @@
"Install the native OpenCode plugin",
"Use local mode for real session auto-sync",
"Keep nmem available for memory operations and handoff flows",
"Run nmem t sync --from opencode --all-projects --apply only when you want to import older OpenCode sessions",
"Run nmem config client set url/api-key once when Mem is remote"
]
},
Expand Down
16 changes: 16 additions & 0 deletions nowledge-mem-claude-code-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,22 @@ That writes the shared local client config used by `nmem` and the plugin. You ca

In remote mode, the Stop and PreCompact hooks still read Claude session files locally through `nmem t save --from claude-code` on the machine where Claude Code is running, then upload the normalized messages to Mem. The remote Mem server does not need direct access to your `~/.claude` directory.

### Import older sessions

Automatic capture starts after the plugin and hooks are installed. To backfill older Claude Code sessions, preview first:

```bash
nmem t sync --from claude-code --all-projects --limit 20
```

Then import:

```bash
nmem t sync --from claude-code --all-projects --apply
```

Use `-p /path/to/project` instead of `--all-projects` when you only want one project. The command reads local Claude Code session files and writes to the Mem server configured in `nmem`.

## Spaces

Spaces are optional. If one Claude Code process naturally belongs to one project or agent lane, launch Claude Code with:
Expand Down
14 changes: 14 additions & 0 deletions nowledge-mem-codex-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,20 @@ if ($null -eq $HookSetup) {

This enables Codex lifecycle hooks and plugin-bundled hooks, keeps the Nowledge Mem packaged Stop hook enabled in `/hooks`, then installs a small host-level Stop hook for Codex builds that still need `~/.codex/hooks.json`. The Stop hook shells out to `nmem t save --from codex`, so local mode and remote Mem mode use the same `nmem` client configuration. If both the bundled hook and the host-level fallback are visible, the hook runtime suppresses the duplicate save for the same transcript state.

To backfill older Codex sessions, preview first:

```bash
nmem t sync --from codex --all-projects --limit 20
```

Then import:

```bash
nmem t sync --from codex --all-projects --apply
```

Use `-p /path/to/project` instead of `--all-projects` when you only want one project. The command reads local Codex rollout files and writes to the Mem server configured in `nmem`.

On current Codex builds, `plugin_hooks = true` is the separate gate that lets Codex load `hooks/hooks.json` from installed plugins. If Codex shows the Nowledge Mem Stop hook in `/hooks`, it should be enabled.

The same setup also asks `nmem` for a Codex MCP config. If `nmem` has a saved API key or a non-default endpoint, the script writes a managed `mcp_servers.nowledge-mem` block into `~/.codex/config.toml`. This is the safest path for remote Mem and for localhost setups that require auth.
Expand Down
2 changes: 1 addition & 1 deletion nowledge-mem-gemini-cli
14 changes: 14 additions & 0 deletions nowledge-mem-opencode-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,20 @@ Nowledge Mem captures OpenCode sessions in three complementary ways:

**Remote mode note:** Background auto-sync (1) reads OpenCode's local SQLite database, so it only works when both tools run on the same machine. The plugin tools (2, 3) work in both local and remote mode.

To backfill older OpenCode sessions, preview first:

```bash
nmem t sync --from opencode --all-projects --limit 20
```

Then import:

```bash
nmem t sync --from opencode --all-projects --apply
```

Use `-p /path/to/project` instead of `--all-projects` when you only want one project. The command reads OpenCode's local session database or legacy JSON storage and writes to the Mem server configured in `nmem`.

## Hooks

The plugin uses two OpenCode hooks:
Expand Down
7 changes: 7 additions & 0 deletions nowledge-mem-pi-package/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,20 @@ All notable changes to the Nowledge Mem Pi package will be documented in this fi
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.8.1] - 2026-06-10

### Fixed

- Exposed `nowledge-mem-pi-sync` as the package binary so older `nmem` installs can still backfill historical Pi sessions.

## [0.8.0] - 2026-06-10

### Added

- Added a native Pi extension that automatically syncs completed Pi sessions into Nowledge Mem threads.
- Session capture is idempotent: the plugin writes stable Pi entry IDs and appends only new transcript messages.
- Added final flushes for session switches, compaction, and shutdown so `/new`, resume, and exit keep thread history complete.
- Added `nowledge-mem-pi-sync`, a preview-first historical import command for older Pi session files.

## [0.7.1] - 2026-06-07

Expand Down
33 changes: 33 additions & 0 deletions nowledge-mem-pi-package/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,39 @@ Then have a short Pi exchange and check recent threads:
nmem t list --source pi -n 5
```

## Import Older Pi Sessions

The extension keeps new Pi conversations synced automatically. To backfill sessions that happened before you installed the package, run the history sync command.

Preview first. This scans Pi session files and makes no changes:

```bash
nmem t sync --from pi --limit 20
```

Import after the preview looks right:

```bash
nmem t sync --from pi --apply
```

The command uses the same local or remote Mem configuration as the extension: `~/.nowledge-mem/config.json`, `NMEM_API_URL`, `NMEM_API_KEY`, and optional `NMEM_SPACE`. It is safe to rerun: thread IDs come from Pi session IDs, and messages use stable Pi entry IDs with backend deduplication.

Useful options:

```bash
nmem t sync --from pi --session-dir ~/.pi/agent/sessions --limit 20
nmem t sync --from pi --space work --apply
```

When you pass `--session-dir`, only that directory is scanned. Without it, the command uses Pi's standard session locations.

If your installed `nmem` does not have `t sync` yet, use the package fallback:

```bash
npx -p nowledge-mem-pi nowledge-mem-pi-sync --apply
```

## Update

```bash
Expand Down
2 changes: 1 addition & 1 deletion nowledge-mem-pi-package/extensions/nowledge-mem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { basename } from "node:path";
import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";

const SOURCE_APP = "pi";
const PLUGIN_VERSION = "0.8.0";
const PLUGIN_VERSION = "0.8.1";
const DEFAULT_API_URL = "http://127.0.0.1:14242";
const CONFIG_PATH = `${homedir()}/.nowledge-mem/config.json`;
const MAX_MESSAGE_CHARS = 20_000;
Expand Down
5 changes: 4 additions & 1 deletion nowledge-mem-pi-package/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
{
"name": "nowledge-mem-pi",
"version": "0.8.0",
"version": "0.8.1",
"description": "Cross-tool memory for Pi. Recall past decisions, search knowledge from every AI tool, and save what matters.",
"keywords": ["pi-package"],
"author": "Nowledge Labs",
"license": "MIT",
"bin": {
"nowledge-mem-pi-sync": "./scripts/sync-history.mjs"
},
"pi": {
"extensions": ["./extensions/nowledge-mem.ts"],
"skills": ["./skills"]
Expand Down
Loading