Codex CLI
通过 nmem CLI 和自定义提示在 Codex 中使用 Nowledge Mem,无需配置 MCP。
技能兼容
Codex 支持自定义提示——安装后即可使用内置斜杠命令,无需配置 MCP。
在 Codex 对话中直接使用斜杠命令保存会话、读取每日简报、提炼洞察。
开始之前
- Nowledge Mem 已在本地运行(安装指南)
- 已安装 Codex CLI
安装步骤
安装 nmem CLI
# 方式一(推荐):使用 uvx,无需额外安装
curl -LsSf https://astral.sh/uv/install.sh | sh
uvx --from nmem-cli nmem --version
# 方式二:pip 安装
pip install nmem-cli在 Windows/Linux 上安装了 Nowledge Mem 桌面应用时,
nmem已内置。macOS 或远程服务器上请使用uvx或手动安装。
安装自定义提示
全新安装:
curl -fsSL https://raw.githubusercontent.com/nowledge-co/community/main/nowledge-mem-codex-prompts/install.sh | bash更新安装:
curl -fsSL https://raw.githubusercontent.com/nowledge-co/community/main/nowledge-mem-codex-prompts/install.sh -o /tmp/install.sh && bash /tmp/install.sh --force && rm /tmp/install.sh命令列表
在 Codex 对话中输入 / 并搜索 "memory"、"save" 或 "distill",或直接使用以下命令:
| 命令 | 功能 |
|---|---|
/prompts:read_working_memory | 加载每日 Working Memory 简报 |
/prompts:save_session | 保存当前会话(nmem t save --from codex) |
/prompts:distill | 提炼洞察到记忆(nmem m add) |
排查问题
- "Command not found: nmem" → 使用
uvx --from nmem-cli nmem --version或pip install nmem-cli - "Command not found: uvx" →
curl -LsSf https://astral.sh/uv/install.sh | sh - 会话未列出 → 确保你在正确的项目目录中
相关
- 集成概览 — MCP、浏览器扩展、对话导入
- Claude Code · Claude Desktop · Alma · OpenClaw · Raycast · 内置 Web 聊天