Skip to content
Back to search

orimem

MarketplaceWorks with Claude CodeGitHub

OriMem: long-term memory for coding agents, kept in your own Obsidian vault.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/wen5555--orimem/badge.svg)](/listings/wen5555--orimem)

HTML

<a href="/listings/wen5555--orimem"><img src="/api/listings/wen5555--orimem/badge.svg" alt="findsafeskills safety rating" /></a>

Install

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

These steps run a script from the network that findsafeskills does not scan.

**Let your agent install it** (recommended). Paste this into Claude Code, Codex, DeepSeek Harness or any coding agent:

Install and set up OriMem for me by following https://raw.githubusercontent.com/Wen5555/OriMem/main/llms-install.md

The agent asks you four questions (vault folder, folder language, capture, search mode), installs without further prompts, connects every agent it finds, verifies with `orimem doctor` and tells you what to restart. If OriMem is already set up (for example from another agent), it skips all of that and only connects itself. The steps it follows are in [llms-install.md](llms-install.md).

**Or run the installer yourself:**

**Windows (PowerShell)**

irm https://raw.githubusercontent.com/Wen5555/OriMem/main/scripts/install.ps1 | iex

**macOS / Linux**

curl -LsSf https://raw.githubusercontent.com/Wen5555/OriMem/main/scripts/install.sh | sh

The installer sets up [uv](https://github.com/astral-sh/uv) if needed, installs OriMem into an isolated environment (about 130 MB, Python provided by uv), then runs `orimem init`. `init` asks a few questions — vault path, folder language (Chinese or English, from your system locale), conversation capture (default on), daily summary (default "ask me later") — downloads the 490 MB embedding model, and connects every agent it finds. Restart your agents afterwards.

No Obsidian yet? Not required: the vault is a plain Markdown folder. `init` prepares it for a good first open (welcome note, new notes to the inbox, daily notes to the daily folder) and tells you how to install or add it; `orimem open` opens it later. Short on disk or offline? `orimem init --lexical` skips the model and uses full-text search only (switch back any time with `orimem config set recall.mode hybrid`).

| What | Size | |---|---| | OriMem environment (onnxruntime, numpy, tokenizers, …) | ~130 MB | | Embedding model (`model.onnx` + tokenizer) | ~490 MB (none with `--lexical`) | | uv + Python 3.12, only if not already installed | ~70 MB + ~70 MB | | **Typical total** | **~0.6 GB** (~0.75 GB on a bare machine; ~0.13 GB lexical-only) | | Optional PyTorch backend (`orimem-mcp[torch]`) | +1 GB or more |

Then just talk to your agent:

> *"What did we decide about the export feature last week?"* > *"Record that the WebGPU renderer is done and the next step is drag-to-reorder layers."*

Using several agents

OriMem is installed **once per computer**. Claude Code, Codex and DeepSeek Harness all share the same vault, embedding model, index and settings, so adding an agent never re-downloads or re-asks anything.

| Situation | What to do | |---|---| | The agents are already installed when you set OriMem up | Nothing: `init` connects every agent it finds. | | You install another agent later (e.g. OriMem set up from Codex, dsh installed next week) | Nothing: the next time any agent uses OriMem, the new agent is connected in the background (`agents.auto_connect`). Restart it once. | | You want it connected right now | `orimem install --agent dsh` (or `claude`, `codex`), or paste the one-line prompt above into that agent: it sees OriMem is already set up and only connects itself. | | You removed an agent on purpose | `orimem uninstall --agent codex`; it is remembered and never reconnected automatically. `orimem install --agent codex` brings it back. | | Check what is connected | `orimem doctor` lists connected agents, agents found but not connected, and any step an agent still needs. |

One-time steps per agent:

- **Codex** runs new hooks only after you approve them: on the next `codex` start accept "Hooks need review" (or open `/hooks` and press `t`). Until then the MCP tools work and conversations are still captured every 2 minutes, but project context is not injected. Approve again if Codex says the hooks changed after an upgrade.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 14 lines
  1. {
  2. "name": "orimem",
  3. "description": "OriMem: long-term memory for coding agents, kept in your own Obsidian vault.",
  4. "owner": {
  5. "name": "Wen5555"
  6. },
  7. "plugins": [
  8. {
  9. "name": "orimem",
  10. "source": "./",
  11. "description": "Long-term memory in your own Obsidian vault: hybrid recall, verified write-back and conversation capture over MCP. Requires the orimem CLI."
  12. }
  13. ]
  14. }
README.md · README · 312 lines · 2 findings marked
  1. <div align="center">
  2. <img src="assets/icon.png" width="96" alt="OriMem icon">
  3. # OriMem
  4. **Long-term memory for coding agents, kept in your own Obsidian vault.**
  5. One local MCP server and one skill, shared by Claude Code, Codex and DeepSeek Harness —
  6. recall project context across sessions, write confirmed results back with receipts, and capture every conversation automatically.
  7. [![CI](https://github.com/Wen5555/OriMem/actions/workflows/ci.yml/badge.svg)](https://github.com/Wen5555/OriMem/actions/workflows/ci.yml)
  8. ![Python](https://img.shields.io/badge/python-3.11%20%7C%203.12%20%7C%203.13-blue)
  9. ![MCP](https://img.shields.io/badge/MCP-server-8A2BE2)
  10. ![Platforms](https://img.shields.io/badge/platform-Windows%20%7C%20macOS%20%7C%20Linux-lightgrey)
  11. [![License: MIT](https://img.shields.io/badge/license-MIT-green)](LICENSE)
  12. **English** · [简体中文](README.zh-CN.md)
  13. </div>
  14. <!-- mcp-name: io.github.Wen5555/orimem -->
  15. ---
  16. ## Why OriMem
  17. Coding agents forget everything when a session ends, and each agent keeps its history in its own private format. OriMem gives them **one shared, human-readable memory**:
  18. - 🗂️ **Your vault is the memory.** Plain Markdown in an Obsidian vault you can read, edit and back up. The index is just a cache.
  19. - 🔎 **Hybrid recall.** Multilingual E5 embeddings + SQLite FTS5 + wiki-links. Short snippets first, exact evidence on demand, so context stays small.
  20. - ✅ **Verified write-back.** `prepare_record → diff → commit_record` with hash checks, backups, read-back and receipts. It never silently overwrites a note you edited.
  21. - 🎙️ **Automatic capture.** Hooks save each Claude Code / Codex / dsh session as a transcript note when a turn ends. Tool output, reasoning, injected system context, sub-agents and automations are left out.
  22. - 📅 **Daily summary (opt-in).** The agent asks you once; if you agree, a scheduled job writes the day's journal through the same verified writer.
  23. - 🔒 **Local only.** No cloud calls, no telemetry. The embedding model is pinned and checksum-verified, and runs on CPU through ONNX Runtime (no PyTorch needed).
  24. ## Quick start
  25. **Let your agent install it** (recommended). Paste this into Claude Code, Codex, DeepSeek Harness or any coding agent:
  26. ```text
  27. Install and set up OriMem for me by following https://raw.githubusercontent.com/Wen5555/OriMem/main/llms-install.md
  28. ```
  29. The agent asks you four questions (vault folder, folder language, capture, search mode), installs without further prompts, connects every agent it finds, verifies with `orimem doctor` and tells you what to restart. If OriMem is already set up (for example from another agent), it skips all of that and only connects itself. The steps it follows are in [llms-install.md](llms-install.md).
  30. **Or run the installer yourself:**
  31. **Windows (PowerShell)**
  32. ```powershell
  33. irm https://raw.githubusercontent.com/Wen5555/OriMem/main/scripts/install.ps1 | iex
  34. ```
  35. **macOS / Linux**
  36. ```bash
  37. curl -LsSf https://raw.githubusercontent.com/Wen5555/OriMem/main/scripts/install.sh | sh
    • Note: Pipes a downloaded script directly into a shell (curl | sh / wget | bash)
    • Line 58 on GitHub
  38. ```
  39. The installer sets up [uv](https://github.com/astral-sh/uv) if needed, installs OriMem into an isolated environment (about 130 MB, Python provided by uv), then runs `orimem init`. `init` asks a few questions — vault path, folder language (Chinese or English, from your system locale), conversation capture (default on), daily summary (default "ask me later") — downloads the 490 MB embedding model, and connects every agent it finds. Restart your agents afterwards.
  40. No Obsidian yet? Not required: the vault is a plain Markdown folder. `init` prepares it for a good first open (welcome note, new notes to the inbox, daily notes to the daily folder) and tells you how to install or add it; `orimem open` opens it later. Short on disk or offline? `orimem init --lexical` skips the model and uses full-text search only (switch back any time with `orimem config set recall.mode hybrid`).
  41. | What | Size |
  42. |---|---|
  43. | OriMem environment (onnxruntime, numpy, tokenizers, …) | ~130 MB |
  44. | Embedding model (`model.onnx` + tokenizer) | ~490 MB (none with `--lexical`) |
  45. | uv + Python 3.12, only if not already installed | ~70 MB + ~70 MB |
  46. | **Typical total** | **~0.6 GB** (~0.75 GB on a bare machine; ~0.13 GB lexical-only) |
  47. | Optional PyTorch backend (`orimem-mcp[torch]`) | +1 GB or more |
  48. Then just talk to your agent:
  49. > *"What did we decide about the export feature last week?"*
  50. > *"Record that the WebGPU renderer is done and the next step is drag-to-reorder layers."*
  51. ### Using several agents
  52. OriMem is installed **once per computer**. Claude Code, Codex and DeepSeek Harness all share the same vault, embedding model, index and settings, so adding an agent never re-downloads or re-asks anything.
  53. | Situation | What to do |
  54. |---|---|
  55. | The agents are already installed when you set OriMem up | Nothing: `init` connects every agent it finds. |
  56. | You install another agent later (e.g. OriMem set up from Codex, dsh installed next week) | Nothing: the next time any agent uses OriMem, the new agent is connected in the background (`agents.auto_connect`). Restart it once. |
  57. | You want it connected right now | `orimem install --agent dsh` (or `claude`, `codex`), or paste the one-line prompt above into that agent: it sees OriMem is already set up and only connects itself. |
  58. | You removed an agent on purpose | `orimem uninstall --agent codex`; it is remembered and never reconnected automatically. `orimem install --agent codex` brings it back. |
  59. | Check what is connected | `orimem doctor` lists connected agents, agents found but not connected, and any step an agent still needs. |
  60. One-time steps per agent:
  61. - **Codex** runs new hooks only after you approve them: on the next `codex` start accept "Hooks need review" (or open `/hooks` and press `t`). Until then the MCP tools work and conversations are still captured every 2 minutes, but project context is not injected. Approve again if Codex says the hooks changed after an upgrade.
  62. - **DeepSeek Harness** installed from npm (`@deepseek-ai/dsh`) does not ship the hook bridge; `orimem install` adds it to each profile through `dsh plugin`, which needs `pnpm` (`npm install -g pnpm`). The desktop app already includes it.
  63. - **Claude Code** can use the plugin instead of `orimem install` (below); OriMem then leaves Claude's own settings alone.
  64. <details>
  65. <summary>Other ways to install</summary>
  66. ```bash
  67. uv tool install "orimem-mcp>=1.0.0rc2"
  68. ```
  69. ```bash
  70. pipx install "orimem-mcp>=1.0.0rc2"
  71. ```
  72. The `>=1.0.0rc2` part makes uv/pip take the newest OriMem, release candidates included (other packages stay on stable releases); the installers above do the same.
  73. The PyPI distribution is `orimem-mcp`; the command it installs is `orimem`. To run the MCP server without installing it first, use `uvx --from orimem-mcp orimem mcp`.
  74. ```bash
  75. orimem init
  76. ```
  77. Non-interactive: `orimem init --yes --vault ~/Notes --agents claude,codex`. Behind a slow network, the installer switches to mirrors automatically when PyPI is unreachable (`ORIMEM_MIRROR=cn` forces it).
  78. </details>
  79. ## Supported agents
  80. | Agent | MCP server | Skill | Hooks (capture on turn end) | Transcripts read from |
  81. |---|---|---|---|---|
  82. | **Claude Code** | `claude mcp add -s user orimem` | `~/.claude/skills/orimem` | `~/.claude/settings.json` | `~/.claude/projects/*/<uuid>.jsonl` |
  83. | **Codex** | `[mcp_servers.orimem]` in `~/.codex/config.toml` | `~/.codex/skills/orimem` | `~/.codex/hooks.json` | `~/.codex/sessions/**/rollout-*.jsonl` |
  84. | **DeepSeek Harness (dsh)** | `dsh-mcp-client` entry in the profile's `cordis.patch.yml` | `~/.dsh/skills/orimem` | `dsh-hooks-claude-code` bridge | `~/.dsh/sessions/**/session.v4.jsonl.zstd` |
  85. | Any other MCP client | `orimem snippet` prints the JSON | copy the skill folder | — | — |
  86. **Claude Code users** can also install it as a plugin (MCP server, skill and hooks in one step; still needs the `orimem` command):
  87. ```text
  88. /plugin install orimem --marketplace Wen5555/OriMem
  89. ```
  90. On older Claude Code versions: `/plugin marketplace add Wen5555/OriMem`, then `/plugin install orimem@orimem`.
  91. **DeepSeek Harness users** can also add the [`dsh-orimem`](integrations/dsh) bundle from the community plugin market (or `dsh plugin --profile <name> add dsh-orimem-<version>.tgz` from a [release](https://github.com/Wen5555/OriMem/releases)); it needs the `orimem` command from the quick start.
  92. `orimem install` and `orimem uninstall` only add or remove OriMem's own entries, and every edited file is backed up first. Marker blocks in TOML/YAML files are removed byte for byte; JSON files keep all other content.
  93. ## How it works
  94. ```mermaid
  95. flowchart LR
  96. subgraph Agents
  97. CC[Claude Code]
  98. CX[Codex]
  99. DS[DeepSeek Harness]
  100. end
  101. CC & CX & DS -- "MCP (stdio)" --> M[orimem mcp]
  102. CC & CX & DS -. "Stop hook" .-> H[orimem hook]
  103. M --> S[(local service<br/>loopback only)]
  104. H -- "capture this session" --> S
  105. S --> I[(SQLite: chunks · E5 vectors<br/>FTS5 · links · ledger)]
  106. S <--> V[/"Obsidian vault<br/>(Markdown = source of truth)"/]
  107. S -- "every 2 min" --> T[agent transcripts]
  108. ```
  109. - **Recall:** `task_context` binds the current project; `recall` returns ranked snippets; `evidence` fetches exact source text with offsets and hashes.
  110. - **Write-back:** the agent proposes a complete note change; OriMem checks the expected hash, backs up, writes, re-reads, verifies the claimed text and issues a receipt.
  111. - **Capture:** per-agent parsers mirror ordinary user/assistant turns into one pipeline, which stages them and projects stable transcript notes into the vault's evidence folder. The Stop hook only hands the session to the running service (falling back to a detached capture process) and is registered as `async` for Claude Code and Codex, so it never delays a turn; dsh runs hooks synchronously, where it returns in a fraction of a second. Context hooks (session start, prompt submit) stay synchronous because their output is the injected project context. Every parse records the client/format version and checks the transcript shape; unsupported formats are not captured and drift shows up in `orimem doctor`.
  112. ## Configuration
  113. Settings live in `~/.orimem/config.toml`. Change them with `orimem config set <key> <value>` or ask your agent, which uses the `config_set` tool.
  114. | Key | Default | Meaning |
  115. |---|---|---|
  116. | `vault` | `~/.orimem/vault` | Obsidian vault path |
  117. | `capture.enabled` | `true` | Capture conversations into the vault |
  118. | `capture.sources` | `["claude","codex","dsh"]` | Which agents to capture |
  119. | `capture.since` | install time | Older sessions are not back-filled (`orimem capture --backfill` does it on request) |
  120. | `capture.exclude_cwd` | `[]` | Never capture sessions started in these folders |
  121. | `daily_summary.enabled` | `"ask"` | `"ask"` = ask once, off until answered · `true` · `false` |
  122. | `daily_summary.time` | `"22:30"` | When the daily job runs |
  123. | `daily_summary.agent` | auto | `claude` or `codex` runs the summary |
  124. | `recall.mode` | `"hybrid"` | `hybrid` = vectors + full text (needs the model) · `lexical` = full text and links only, no model |
  125. | `recall.hf_endpoint` | auto | Model download endpoint (falls back to hf-mirror.com) |
  126. | `mcp.tools` | `"core"` | `core` publishes 8 everyday tools · `all` adds the advanced ones |
  127. | `mcp.extra` | `[]` | With `core`: individual advanced tools to publish, e.g. `["health"]` |
  128. | `agents.auto_connect` | `true` | Connect agents installed after OriMem (they share the vault, model and settings) |
  129. | `projects.link` | `"auto"` | `auto`: a new project folder (git checkout or build manifest) gets its own project page automatically · `offer`: the agent suggests it once · `off` |
  130. | `projects.import_history` | `true` | Auto-linking also imports that folder's conversations from before the install |
  131. | `projects.record` | `true` | In a linked project, agents keep the project page up to date when a session delivers something |
  132. | `profile.share` | `true` | Share the vault-root profile note with every agent at session start (`profile.max_chars`, default 1500) |
  133. | `layout.language` | system locale | `zh` or `en` folder preset |
  134. | `layout.<role>` | preset | Override one folder: `inbox`, `drafts`, `projects`, `courses`, `areas`, `knowledge`, `daily`, `weekly`, `archive`, `evidence`, `legacy`, `workspace`; also `course_home`, `weekly_note`, `knowledge_index` |
  135. | `layout.extra_writable` | `[]` | Further folders automatic write-back may touch |
  136. | `maintenance.backup_days` | `30` | Keep write-back backups and finished batch records this long |
  137. | `maintenance.projection_backup_days` | `3` | Backups of auto-generated transcript notes are kept only briefly |
  138. ## Reference
  139. <details>
  140. <summary><b>CLI</b></summary>
  141. | Command | What it does |
  142. |---|---|
  143. | `orimem install / uninstall [--agent claude,codex,dsh] [--dsh-profile NAME]` | Connect or disconnect agents |
  144. | `orimem init [-y] [--lang zh\|en] [--lexical] [--json]` | First-time setup (re-running it is safe) |
  145. | `orimem doctor [--json]` | One-screen health check: vault, index, search, agents, capture, Obsidian, storage |
  146. | `orimem prune [--dry-run]` | Delete old write-back backups and finished batch records (also runs daily) |
  147. | `orimem open` | Open the vault in Obsidian (or say how to install/add it) |
  148. | `orimem onboard scan / import --cwd DIR [--days N] / status` | Bring conversations from before the install in, by working folder |
  149. | `orimem link [--cwd DIR]` | Create or bind the project page for a folder (the hook does this automatically) |
  150. | `orimem capture [--source X] [--session ID] [--backfill]` | Capture now |
  151. | `orimem sync` · `orimem recall "query" --scope "10 项目"` | Index / search from the shell |
  152. | `orimem daily status / run [--dry-run] / apply` | Daily summary |
  153. | `orimem model status / download [--torch] / import DIR` | Embedding model |
  154. | `orimem config get / set / path` | Settings |
  155. | `orimem snippet` | MCP JSON + AGENTS.md snippet for other clients |
  156. | `orimem --home DIR …` | Use another data directory (written into generated agent commands) |
  157. </details>
  158. <details>
  159. <summary><b>MCP tools</b></summary>
  160. Published by default (8):
  161. | Tool | Purpose |
  162. |---|---|
  163. | `task_context` | Bind the current folder/task to a project entry |
  164. | `recall` | Hybrid (or lexical) search, snippets |
  165. | `evidence` | Exact source text for result ids |
  166. | `initialize` | Create or bind a project/course entry to a folder (checks for duplicates; several folders per project) |
  167. | `list_sessions` · `get_session_messages` | Browse captured conversations |
  168. | `prepare_record` · `commit_record` | Verified write-back |
  169. `config_set` is also published while the daily summary is still "ask", so the agent can record the answer.
  170. Advanced (`orimem config set mcp.tools all`, or list some in `mcp.extra`):
  171. | Tool | Purpose |
  172. |---|---|
  173. | `lifecycle` | Source reading, candidates, corrections |
  174. | `health` · `sync` · `archive_history` | Maintenance |
  175. | `config_get` · `config_set` · `capture_now` | Settings, capture now |
  176. </details>
  177. <details>
  178. <summary><b>Vault layout</b></summary>
  179. `init` picks the Chinese or English preset from your locale (`--lang` to choose); every folder can be renamed with `orimem config set layout.<role> "<path>"` (existing notes are not moved). `orimem config get layout` shows the resolved layout.
  180. ```text
  181. English preset Chinese preset
  182. 00 Inbox/ (AI Drafts/) 00 收件箱/ (AI 草稿/) inbox, knowledge candidates
  183. 10 Projects/ 10 项目/ one page per project
  184. 15 Courses/<course>/Course Home 15 课程/<课程>/课程主页
  185. 30 Knowledge/ 30 知识/ reusable knowledge
  186. 50 Journal/Daily · Weekly 50 日记/每日 · 每周
  187. 90 Archive/Conversations/ 90 归档/对话佐证/ captured transcripts
  188. 95 AI Workspace/ 95 AI 工作区/ agent work notes
  189. ```
  190. Agents may write projects, courses (homepage only), knowledge, daily/weekly journals, AI drafts and the AI workspace (plus `layout.extra_writable`). The evidence folder is written only by OriMem's capture, and the profile note only when a plan carries `profile_update: true` (an explicit request from you). `.obsidian` is only written once, when `init` creates a vault Obsidian has never opened; files outside the vault are never touched. Vaults set up by 0.1.x keep `90 归档/Codex佐证`.
  191. </details>
  192. ## FAQ
  193. **What happens when I upgrade?** `uv tool upgrade orimem-mcp` (or re-run the installer), then restart your agents. Coming from 0.1.x: `uv tool install --force "orimem-mcp>=1.0.0rc2"` once, since that install was pinned to stable releases. The first time the new version runs, it refreshes its own MCP/skill/hook entries in the agents it is already installed into and adds anything new to the vault (it never overwrites a note). `orimem doctor` shows the result.
  194. **Does OriMem keep growing on disk?** Write-back keeps backups and receipts, so a retention policy runs daily: transcript-note backups are kept 3 days, other backups 30 days (`maintenance.*`). `orimem doctor` shows the storage used and `orimem prune` cleans up immediately.
  195. **Are secrets removed from captured conversations?** No. Transcripts are stored as you typed them, because a rewritten transcript is no longer evidence. Don't paste secrets into agent chats, exclude sensitive folders with `capture.exclude_cwd`, and keep the vault out of public sync if it holds sensitive work. Tool output and secrets that only appear in tool calls are not captured.
  196. **Do I need Obsidian?** No. Agents read and write the Markdown folder directly; Obsidian is the optional UI. `orimem doctor` shows whether it is installed and whether the vault is added.
  197. **Can I run without the embedding model?** Yes: `orimem config set recall.mode lexical` (or `init --lexical`). Recall then uses SQLite full-text search and links only; set `hybrid` and run `orimem model download` + `orimem sync` to get vectors back.
  198. **What happens when I start working in a new project?** Nothing for you to do. The first session in a project folder (a git checkout or a folder with a build manifest) creates its project page, binds the folder (worktrees and extra clones are recognised), imports that folder's conversations from before the install as evidence, and the agent fills in an overview. If a similarly named entry already exists, the agent asks once whether to bind or create. From then on every session there gets the project context, and agents update the page when a session delivers something. Set `projects.link` to `offer` or `off` to change this. For older history across many folders: `orimem onboard scan` lists them, `orimem onboard import --cwd <folder>` brings the chosen ones in.
  199. **How do agents share what they know about me?** `init` puts a profile note at the vault root (`About Me.md` / `个人画像.md`). Whatever you write there reaches every agent at session start (Claude Code via the MCP server instructions, Codex and dsh also via the session hook); an empty template is never shared. Agents change it only when you explicitly ask them to remember something about you. Don't put secrets in it: it is sent to whichever model provider each agent uses.
  200. **I set OriMem up from Codex. Does dsh (or Claude Code) get it too?** Yes. OriMem is installed once per computer and every agent shares the same vault, model and settings. Agents installed later are connected automatically the next time any agent uses OriMem (`agents.auto_connect`; agents you removed with `orimem uninstall --agent X` stay removed), or right away with `orimem install --agent dsh`. Codex asks you once to approve OriMem's hooks (`/hooks`). With the npm build of dsh, OriMem adds the hook plugin dsh needs (this uses `pnpm`).
  201. **Do the hooks slow my agent down?** Capture runs in the background (`async` Stop hook in Claude Code and Codex). The session-start and prompt hooks take about a quarter of a second because they inject project context.
  202. **Do I need a GPU or PyTorch?** No. Embeddings run on CPU through ONNX Runtime. `orimem[torch]` plus `orimem model download --torch` enables the optional PyTorch backend, which produces identical vectors.
  203. **Can I use my existing vault?** Yes. Point `vault` at it. OriMem only adds the folders it needs and never rewrites existing notes outside the verified write-back flow.
  204. **I'm in mainland China.** Both installers detect an unreachable PyPI and switch to the Tsinghua PyPI mirror, the npmmirror Python builds and hf-mirror.com.
  205. **How do I turn capture off for a project?** `orimem config set capture.exclude_cwd '["D:/work/secret"]'`. To turn it off everywhere: `orimem config set capture.enabled false`.
  206. **How do I remove everything?** `orimem uninstall`, then `uv tool uninstall orimem-mcp`. Your vault and `~/.orimem` stay until you delete them.
  207. ## Roadmap
  208. - [x] Configurable / English vault layout
  209. - [x] Full-text-only mode without the model
  210. - [ ] More agents (Cursor, Gemini CLI, OpenCode)
  211. - [ ] Optional quantized ONNX model for low-memory machines
  212. ## Contributing
  213. ```bash
  214. git clone https://github.com/Wen5555/OriMem && cd OriMem
  215. ```
  216. ```bash
  217. uv venv && uv pip install -e ".[test]"
  218. ```
  219. ```bash
  220. uv run pytest
  221. ```
  222. A manual end-to-end checklist for each agent is in [docs/TESTING.md](docs/TESTING.md). Issues and pull requests are welcome.
  223. ## License
  224. [MIT](LICENSE)
scripts/install.ps1 · Bundled script · 78 lines · 1 finding marked
  1. <#
  2. OriMem one-line installer for Windows.
  3. irm https://raw.githubusercontent.com/Wen5555/OriMem/main/scripts/install.ps1 | iex
    • Note: Runs a downloaded PowerShell script (iex / Invoke-Expression)
    • Line 4 on GitHub
  4. Environment overrides:
  5. ORIMEM_SOURCE package source (default: the newest orimem-mcp on PyPI, release candidates included,
  6. falling back to the GitHub main archive)
  7. ORIMEM_INIT_ARGS arguments for `orimem init` (default: interactive); "skip" skips init
  8. ORIMEM_MIRROR "cn" forces China mirrors, "none" disables auto-detection
  9. ORIMEM_NO_MODIFY_PATH=1 do not add uv's tool directory to the user PATH
  10. #>
  11. $ErrorActionPreference = 'Stop'
  12. $Fallback = 'https://github.com/Wen5555/OriMem/archive/refs/heads/main.zip'
  13. # A pre-release in the requirement lets uv pick OriMem release candidates; dependencies stay stable.
  14. $Source = if ($env:ORIMEM_SOURCE) { $env:ORIMEM_SOURCE } else { 'orimem-mcp>=1.0.0rc2' }
  15. function Step($text) { Write-Host "==> $text" -ForegroundColor Cyan }
  16. function Test-Url($url) {
  17. try { Invoke-WebRequest -Uri $url -Method Head -TimeoutSec 5 -UseBasicParsing | Out-Null; return $true } catch { return $false }
  18. }
  19. # 1. Mirrors for networks where PyPI / GitHub are slow or blocked.
  20. $useCn = $env:ORIMEM_MIRROR -eq 'cn'
  21. if (-not $env:ORIMEM_MIRROR) { $useCn = -not (Test-Url 'https://pypi.org/simple/pip/') }
  22. if ($useCn) {
  23. Step 'Using China mirrors (Tsinghua PyPI, npmmirror Python builds, hf-mirror.com)'
  24. $env:UV_DEFAULT_INDEX = 'https://pypi.tuna.tsinghua.edu.cn/simple'
  25. $env:UV_PYTHON_INSTALL_MIRROR = 'https://registry.npmmirror.com/-/binary/python-build-standalone'
  26. $env:HF_ENDPOINT = 'https://hf-mirror.com'
  27. }
  28. # 2. uv (manages Python and an isolated tool environment).
  29. if (-not (Get-Command uv -ErrorAction SilentlyContinue)) {
  30. Step 'Installing uv'
  31. $installed = $false
  32. if (-not $useCn) {
  33. try { Invoke-RestMethod https://astral.sh/uv/install.ps1 | Invoke-Expression; $installed = $true } catch { }
  34. }
  35. if (-not $installed) {
  36. $py = Get-Command python -ErrorAction SilentlyContinue
  37. if (-not $py) { throw 'Could not install uv. Install it from https://docs.astral.sh/uv/ and re-run.' }
  38. $indexArgs = if ($useCn) { @('-i', $env:UV_DEFAULT_INDEX) } else { @() }
  39. & python -m pip install --user --upgrade uv @indexArgs
  40. }
  41. $env:Path = "$env:USERPROFILE\.local\bin;$env:APPDATA\Python\Scripts;$env:Path"
  42. if (-not (Get-Command uv -ErrorAction SilentlyContinue)) {
  43. $uvExe = Get-ChildItem "$env:APPDATA\Python" -Recurse -Filter uv.exe -ErrorAction SilentlyContinue | Select-Object -First 1
  44. if ($uvExe) { $env:Path = "$($uvExe.DirectoryName);$env:Path" } else { throw 'uv was installed but is not on PATH; open a new terminal and re-run.' }
  45. }
  46. }
  47. # 3. OriMem itself.
  48. Step "Installing OriMem from $Source"
  49. uv tool install --force --python 3.12 $Source
  50. if ($LASTEXITCODE -ne 0 -and -not $env:ORIMEM_SOURCE) {
  51. Step "PyPI install failed; installing from $Fallback"
  52. uv tool install --force --python 3.12 $Fallback
  53. }
  54. if ($LASTEXITCODE -ne 0) { throw 'uv tool install failed' }
  55. if (-not $env:ORIMEM_NO_MODIFY_PATH) { uv tool update-shell | Out-Null }
  56. $toolBin = (uv tool dir --bin).Trim()
  57. $env:Path = "$toolBin;$env:Path"
  58. # 4. First-time setup.
  59. if ($env:ORIMEM_INIT_ARGS -eq 'skip') {
  60. Step 'Skipping init (run `orimem init` later)'
  61. } else {
  62. Step 'Running orimem init'
  63. $initArgs = if ($env:ORIMEM_INIT_ARGS) { $env:ORIMEM_INIT_ARGS -split ' ' } else { @() }
  64. & orimem init @initArgs
  65. }
  66. Write-Host ''
  67. Write-Host 'OriMem is installed. Restart Claude Code / Codex / DeepSeek Harness to load it.' -ForegroundColor Green
  68. Write-Host ' orimem doctor check the setup'
  69. Write-Host ' uv tool upgrade orimem-mcp update later (re-running this installer works too)'
scripts/install.sh · Bundled script · 75 lines · 1 finding marked
  1. #!/bin/sh
  2. # OriMem one-line installer for macOS / Linux.
  3. #
  4. # curl -LsSf https://raw.githubusercontent.com/Wen5555/OriMem/main/scripts/install.sh | sh
    • Note: Pipes a downloaded script directly into a shell (curl | sh / wget | bash)
    • Line 4 on GitHub
  5. #
  6. # Environment overrides:
  7. # ORIMEM_SOURCE package source (default: the newest orimem-mcp on PyPI, release candidates included,
  8. # falling back to the GitHub main archive)
  9. # ORIMEM_INIT_ARGS arguments for `orimem init` (default: interactive); "skip" skips init
  10. # ORIMEM_MIRROR "cn" forces China mirrors, "none" disables auto-detection
  11. # ORIMEM_NO_MODIFY_PATH=1 do not add uv's tool directory to shell profiles
  12. set -eu
  13. FALLBACK=https://github.com/Wen5555/OriMem/archive/refs/heads/main.zip
  14. # A pre-release in the requirement lets uv pick OriMem release candidates; dependencies stay stable.
  15. SOURCE="${ORIMEM_SOURCE:-orimem-mcp>=1.0.0rc2}"
  16. step() { printf '\033[36m==> %s\033[0m\n' "$1"; }
  17. reachable() { curl -fsS -o /dev/null -m 5 -I "$1" 2>/dev/null; }
  18. # 1. Mirrors for networks where PyPI / GitHub are slow or blocked.
  19. USE_CN=0
  20. case "${ORIMEM_MIRROR:-auto}" in
  21. cn) USE_CN=1 ;;
  22. none) USE_CN=0 ;;
  23. *) reachable https://pypi.org/simple/pip/ || USE_CN=1 ;;
  24. esac
  25. if [ "$USE_CN" = 1 ]; then
  26. step "Using China mirrors (Tsinghua PyPI, npmmirror Python builds, hf-mirror.com)"
  27. export UV_DEFAULT_INDEX=https://pypi.tuna.tsinghua.edu.cn/simple
  28. export UV_PYTHON_INSTALL_MIRROR=https://registry.npmmirror.com/-/binary/python-build-standalone
  29. export HF_ENDPOINT=https://hf-mirror.com
  30. fi
  31. # 2. uv (manages Python and an isolated tool environment).
  32. if ! command -v uv >/dev/null 2>&1; then
  33. step "Installing uv"
  34. if [ "$USE_CN" = 0 ] && curl -LsSf https://astral.sh/uv/install.sh | sh; then
  35. :
  36. elif command -v python3 >/dev/null 2>&1; then
  37. if [ "$USE_CN" = 1 ]; then python3 -m pip install --user --upgrade uv -i "$UV_DEFAULT_INDEX"
  38. else python3 -m pip install --user --upgrade uv; fi
  39. else
  40. echo "Could not install uv. Install it from https://docs.astral.sh/uv/ and re-run." >&2; exit 1
  41. fi
  42. PATH="$HOME/.local/bin:$PATH"; export PATH
  43. fi
  44. # 3. OriMem itself.
  45. step "Installing OriMem from $SOURCE"
  46. if ! uv tool install --force --python 3.12 "$SOURCE"; then
  47. [ -z "${ORIMEM_SOURCE:-}" ] || exit 1
  48. step "PyPI install failed; installing from $FALLBACK"
  49. uv tool install --force --python 3.12 "$FALLBACK"
  50. fi
  51. [ -n "${ORIMEM_NO_MODIFY_PATH:-}" ] || uv tool update-shell >/dev/null 2>&1 || true
  52. PATH="$(uv tool dir --bin):$PATH"; export PATH
  53. # 4. First-time setup (reads answers from the terminal even when piped from curl).
  54. if [ "${ORIMEM_INIT_ARGS:-}" = skip ]; then
  55. step "Skipping init (run 'orimem init' later)"
  56. elif [ -n "${ORIMEM_INIT_ARGS:-}" ]; then
  57. step "Running orimem init $ORIMEM_INIT_ARGS"
  58. # shellcheck disable=SC2086
  59. orimem init $ORIMEM_INIT_ARGS
  60. elif [ -r /dev/tty ]; then
  61. step "Running orimem init"
  62. orimem init </dev/tty
  63. else
  64. step "Running orimem init --yes (no terminal attached)"
  65. orimem init --yes
  66. fi
  67. printf '\n\033[32mOriMem is installed. Restart Claude Code / Codex / DeepSeek Harness to load it.\033[0m\n'
  68. echo " orimem doctor check the setup"
  69. echo " uv tool upgrade orimem-mcp update later (re-running this installer works too)"

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.