Copilot CLI
GitHub Copilot CLI plugin with Working Memory bootstrap, guided recall, and incremental session capture into Mem.
copilot plugin marketplace add nowledge-co/community
copilot plugin install nowledge-mem@nowledge-community
bash "$HOME/.copilot/installed-plugins/nowledge-community/nowledge-mem/scripts/install-hooks.sh"Plugin-native path
Copilot CLI supports plugins and lifecycle hooks. Install the plugin once, keep
nmem available locally, and Copilot can start with Working Memory,
search when past context matters, and keep appending your session into Mem.
This is the dedicated Nowledge path for GitHub Copilot CLI. It is closer to
Claude Code than to generic MCP: the plugin brings its own hooks, skills, and
capture runtime. At the same time, Copilot still decides when to use the
model-mediated skills, so project guidance such as AGENTS.md still
helps when you want stronger proactive recall and distillation.
How you'll know it's working
Start a new Copilot session and ask What was I working on? You should
see your recent focus and priorities. Then ask Copilot to save or checkpoint the
session and confirm the thread appears in Mem.
Before You Start
- Nowledge Mem running locally (installation) or a reachable remote Mem server
- GitHub Copilot CLI installed
nmemCLI in yourPATH
Setup
Install nmem
# Option 1: use the bundled CLI from the Mem desktop app
# Settings -> Preferences -> Developer Tools -> Install CLI
# Option 2: pip
pip install nmem-cli
# Option 3: pipx
pipx install nmem-cliThen verify:
nmem statusOn Windows and Linux with the Nowledge Mem desktop app, nmem is already bundled.
Install the plugin
copilot plugin marketplace add nowledge-co/community
copilot plugin install nowledge-mem@nowledge-community
bash "$HOME/.copilot/installed-plugins/nowledge-community/nowledge-mem/scripts/install-hooks.sh"Restart Copilot CLI after installation.
The install script copies the capture runtime into ~/.copilot/nowledge-mem-hooks/.
You can re-run it safely after updates.
WSL bridge when needed
If Copilot CLI runs inside WSL, but nmem is installed on Windows through the
Mem desktop app, create this bridge inside WSL:
mkdir -p ~/.local/bin && cat > ~/.local/bin/nmem << 'SHIMEOF'
#!/bin/bash
python3 - "$@" <<'PY'
import subprocess
import sys
cmd = subprocess.list2cmdline(["nmem.cmd", *sys.argv[1:]])
raise SystemExit(subprocess.run(["cmd.exe", "/s", "/c", cmd]).returncode)
PY
SHIMEOF
chmod +x ~/.local/bin/nmemThis lets Copilot running in WSL call the Windows nmem cleanly.
Add project guidance when you want stronger initiative
The plugin handles Working Memory bootstrap and session capture on its own. If
you also want Copilot to search or distill more proactively in
continuation-heavy repos, merge the package AGENTS.md into your project root:
git clone https://github.com/nowledge-co/community.git /tmp/nowledge-community
cp /tmp/nowledge-community/nowledge-mem-copilot-cli-plugin/AGENTS.md ./AGENTS.md
rm -rf /tmp/nowledge-communityIf your repo already has an AGENTS.md, merge the Nowledge section instead of
overwriting the file.
Configure remote Mem when needed
nmem config client set url https://mem.example.com
nmem config client set api-key nmem_your_keyThis writes the shared local client config used by the plugin and nmem.
What Happens Automatically
The plugin uses Copilot CLI hooks for four things:
- SessionStart on startup, resume, and clear: load Working Memory with
nmem --json wm read - SessionStart after compaction: reload Working Memory and remind Copilot to checkpoint important findings
- UserPromptSubmit: keep search and save guidance close to each turn
- Stop: capture the recorded Copilot session asynchronously after each response
The Stop hook appends only the new conversation content. It does not keep re-importing the whole session each time.
Skills
The Copilot plugin keeps the user-facing surface simple. It does not ship a
separate command-doc layer for save, search, or status. Instead, it relies on
skills and the underlying nmem CLI.
| Skill | When it helps | What it does |
|---|---|---|
read-working-memory | Session start, "what am I working on?" | Loads today's Working Memory briefing |
search-memory | Prior work, earlier rationale, past discussions | Searches durable memories and prior threads |
distill-memory | A real decision or learning emerged | Saves durable knowledge into Mem |
save-thread | "Save this session", "Checkpoint this" | Saves a concise session summary thread on explicit request |
For direct troubleshooting outside the skill surface, run nmem status in your terminal.
Update
copilot plugin marketplace update nowledge-community
copilot plugin update nowledge-mem
bash "$HOME/.copilot/installed-plugins/nowledge-community/nowledge-mem/scripts/install-hooks.sh"Then restart Copilot CLI.
Customize Safely
Use Copilot's own instruction files instead of editing the installed plugin:
.github/instructions/*.instructions.mdfor shared repo rules~/.copilot/instructions/*.instructions.mdfor your personal rules across repos
For the full host-by-host map, see Customize Integration Behavior.
Troubleshooting
nmem not found
Install nmem-cli with pip or pipx, or use the bundled CLI from the Mem desktop app.
Working Memory never appears
Restart Copilot CLI after installation. Then run nmem status to confirm the local client can reach Mem.
Threads are not appearing in Mem
Re-run install-hooks.sh, then check ~/.copilot/nowledge-mem-hooks/hook-log.jsonl.
The capture path is designed to be idempotent, so re-running the installer is safe.
Copilot only reads Working Memory, but rarely searches or distills
That usually means the bootstrap hook is working, but your repo does not yet
give Copilot strong enough behavioral guidance. Merge the plugin AGENTS.md
into your project root, then retry with a continuation-style question.