@onebrain-ai/cli 2.3.3 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,643 +1,68 @@
1
- <p align="center">
2
- <picture>
3
- <source media="(prefers-color-scheme: dark)" srcset="assets/header-dark.png">
4
- <img alt="OneBrain — Your AI Thinking Partner" src="assets/header-light.png" width="640">
5
- </picture>
6
- </p>
1
+ # @onebrain-ai/cli
7
2
 
8
- <p align="center">
9
- <a href="https://onebrain.run"><img alt="Website" src="https://img.shields.io/badge/onebrain.run-0a0a14?style=for-the-badge&labelColor=ff2d92"></a>
10
- <a href="https://x.com/onebrain_run"><img alt="@onebrain_run on X" src="https://img.shields.io/badge/follow-@onebrain__run-000000?style=for-the-badge&logo=x&logoColor=white"></a>
11
- <a href="https://github.com/onebrain-ai/onebrain/stargazers"><img alt="GitHub stars" src="https://img.shields.io/github/stars/onebrain-ai/onebrain?style=for-the-badge&color=00f3ff&logo=github"></a>
12
- </p>
13
- <p align="center">
14
- <a href="https://www.npmjs.com/package/@onebrain-ai/cli"><img alt="npm" src="https://img.shields.io/npm/v/@onebrain-ai/cli?style=for-the-badge&logo=npm&color=cb3837&label=%40onebrain-ai%2Fcli"></a>
15
- <a href="PLUGIN-CHANGELOG.md"><img alt="Plugin version" src="https://img.shields.io/github/package-json/v/onebrain-ai/onebrain?filename=.claude%2Fplugins%2Fonebrain%2F.claude-plugin%2Fplugin.json&style=for-the-badge&label=plugin&color=ff2d92"></a>
16
- <a href="LICENSE"><img alt="License" src="https://img.shields.io/badge/license-MIT-7c3aed?style=for-the-badge"></a>
17
- </p>
18
-
19
- <p align="center">
20
- <em>Your AI forgets everything when the session ends.<br>
21
- Your notes, your AI, and your tools live in separate silos.<br>
22
- OneBrain fixes both — giving you a thinking partner that remembers everything.</em>
23
- </p>
24
-
25
- <p align="center">
26
- <strong>Your personal AI OS</strong> — persistent memory, 29+ skills, and a full local stack<br>
27
- (Claude Code + Obsidian + tmux + Telegram), entirely on your own machine.
28
- </p>
29
-
30
- <p align="center">
31
- <a href="#installation">Get Started →</a> &nbsp;·&nbsp; <a href="#commands">View Commands →</a>
32
- </p>
33
-
34
- ---
35
-
36
- ## What is OneBrain?
37
-
38
- OneBrain is an AI operating system layer built on top of Obsidian. It gives your AI agent persistent memory, a structured knowledge vault, and 29+ pre-built skills — so every session picks up exactly where the last one left off.
39
-
40
- Unlike chat-based AI tools, OneBrain lives in plain Markdown files you own forever. No cloud sync required. No proprietary format. Just your agent, your vault, your data.
41
-
42
- > Most tools ask you to query an AI. OneBrain **co-evolves** with you — every preference you teach sharpens the agent, every link it surfaces sharpens you.
43
-
44
- **The bidirectional flow:**
45
-
46
- - **Human → Agent** — Every preference, decision, and correction becomes persistent memory. The agent calibrates to you with every interaction.
47
- - **Agent → Human** — Captures, classifies, links, and synthesizes the noise of your day — so your attention stays on what only you can do.
48
-
49
- <p align="center">
50
- <picture>
51
- <source media="(prefers-color-scheme: dark)" srcset="assets/diagrams/bidir-flow-dark.svg">
52
- <img alt="Bidirectional flow — Human sends preferences, decisions, and corrections to Agent; Agent returns captures, links, and synthesis. Every interaction sharpens both." src="assets/diagrams/bidir-flow-light.svg" width="640">
53
- </picture>
54
- </p>
55
-
56
- **Harness-agnostic** — Claude Code · Gemini CLI · OpenAI Codex · Qwen · or BYO LLM via API key. [See the architecture ↓](#the-harness-os-architecture)
57
-
58
- ---
59
-
60
- ## The Harness OS Architecture
61
-
62
- OneBrain doesn't compete with Claude Code, Gemini CLI, or any other AI harness — **it extends them**. Whichever harness you drive, OneBrain adds the persistent memory, skill surface, and personal calibration that harnesses don't ship with. Same harness; suddenly it remembers who you are, what you're working on, and how you like to work — all while your Obsidian vault stays the durable source of truth underneath.
63
-
64
- <p align="center">
65
- <picture>
66
- <source media="(prefers-color-scheme: dark)" srcset="assets/diagrams/harness-os-stack-dark.svg">
67
- <img alt="OneBrain Harness OS — 4-layer architecture: OneBrain (plugin + CLI) on top, Harness, LLM, Obsidian Vault as the source of truth at the base" src="assets/diagrams/harness-os-stack-light.svg" width="780">
68
- </picture>
69
- </p>
70
-
71
- | # | Layer | Role | What lives here |
72
- |---|---|---|---|
73
- | 01 | **OneBrain** | OS layer (plugin + CLI) | 29+ skills · lifecycle hooks · vault sync · indexing · checkpoints · harness routing |
74
- | 02 | **Harness** | Agentic runtime | Bring your own — Claude Code · Gemini CLI · Codex · Qwen · ... |
75
- | 03 | **LLM** | Intelligence source | Local (mlx, ollama) · cloud (claude, gemini, gpt) · raw API |
76
- | 04 | **Obsidian Vault** | Source of truth | Plain Markdown — notes, memory, decisions, knowledge graph |
77
-
78
- The **Harness** layer is where most AI tools pick a fight with each other. We don't — pick whichever harness you love. By familiarity, by task, or by cost. Your vault stays the same.
79
-
80
- ### Extend, don't replace
81
-
82
- A great harness already knows how to talk to an LLM, edit files, and run shell commands. It does **not** know who you are, what you've decided last week, or how you prefer to work. OneBrain fills exactly that gap.
83
-
84
- | | What OneBrain adds | Why it matters |
85
- |---|---|---|
86
- | 🧠 | **Memory** — Identity, preferences, decisions, project state — promoted across four tiers as it earns trust | The harness alone starts every session from zero. OneBrain doesn't. |
87
- | ⚡ | **Skills** — 31+ vault-aware verbs (`/braindump`, `/research`, `/distill`, `/learn`, `/wrapup`, …) | Pre-built workflows the harness would otherwise need you to script every time. |
88
- | 🎯 | **Calibration** — Every correction, every preference, every learned habit tunes the agent to *you* | The longer you use it, the sharper it gets — your vault is the training data. |
89
- | 🔀 | **Continuity** — Context lives in the vault, not the harness | Switch from Claude Code to Gemini CLI to Codex. Same memory. Same skills. Same agent. |
90
-
91
- > Pick a harness for **how it lets you work** (CLI, IDE, mobile, API). Pick OneBrain for **how it remembers you** across all of them.
92
-
93
- ---
94
-
95
- ## One Vault, All Projects — The Command Center
96
-
97
- Obsidian becomes your dispatch hub for everything you do:
98
-
99
- - **Read once, understand all** — agent context lives in one place, never re-explained.
100
- - **Code in repos, orchestration in vault** — agent dispatches from here to wherever the work actually lives.
101
- - **Markdown replaces Slack / Linear / Notion** — version-controlled, AI-readable, yours forever.
102
-
103
- <p align="center">
104
- <picture>
105
- <source media="(prefers-color-scheme: dark)" srcset="assets/diagrams/vault-hub-dark.svg">
106
- <img alt="Obsidian as command center — eight spokes radiate from the vault to CLI/repo, website, cloud infra, social media, office docs, project notes, research, and MCP server" src="assets/diagrams/vault-hub-light.svg" width="460">
107
- </picture>
108
- </p>
109
-
110
- The agent reaches outward FROM the vault to every surface where the work actually lives. No tab juggling. No tool sprawl.
111
-
112
- ---
113
-
114
- ## Every Session Sharpens Both
115
-
116
- OneBrain runs as a tight 3-step loop. Each cycle, both sides sharpen.
117
-
118
- <p align="center">
119
- <picture>
120
- <source media="(prefers-color-scheme: dark)" srcset="assets/diagrams/coevo-loop-dark.svg">
121
- <img alt="Co-Evolution loop — three nodes (01 CAPTURE at top, 02 EVOLVE at bottom-right, 03 WRAPUP at bottom-left) connected by curved arrows flowing clockwise" src="assets/diagrams/coevo-loop-light.svg" width="350">
122
- </picture>
123
- </p>
124
-
125
- 1. **Capture** — Talk to the agent in natural language. It writes, classifies, and links your thoughts in real time. → `/braindump` · `/capture` · `/bookmark`
126
- 2. **Evolve** — `/research` and `/distill` expand your knowledge. `/learn` deepens the agent. The loop tightens. → `/research` · `/distill` · `/learn`
127
- 3. **Wrapup** — `/wrapup` consolidates the session log. `/recap` promotes lessons to memory. → `/wrapup` · `/recap`
128
-
129
- ### Behind the loop
130
-
131
- After `/onboarding`, your AI agent:
132
-
133
- 1. **Loads your identity** — name, role, goals, communication style, active projects
134
- 2. **Greets you with context** — inbox status, overdue tasks, patterns from recent sessions
135
- 3. **Remembers everything** — decisions, preferences, and insights accumulate over time
136
- 4. **Suggests next actions** — based on what's in your vault, not what it can infer from scratch
137
-
138
- ---
139
-
140
- ## Memory System
141
-
142
- OneBrain uses a four-tier memory system — knowledge sinks downward as it gets validated, while the agent recalls upward on demand. The Semantic tier has two loading modes (always-loaded and lazy-loaded).
143
-
144
- <p align="center">
145
- <picture>
146
- <source media="(prefers-color-scheme: dark)" srcset="assets/diagrams/memory-tiers-dark.svg">
147
- <img alt="Memory tiers — four-stage persistence stack: WORKING (00-inbox + current session) at top, EPISODIC (07-logs), SEMANTIC (05-agent/MEMORY.md + memory/), and KNOWLEDGE (03-knowledge) at the base" src="assets/diagrams/memory-tiers-light.svg" width="780">
148
- </picture>
149
- </p>
150
-
151
- | Tier | Location | What it stores | Promoted by |
152
- |------|----------|---------------|-------------|
153
- | **Working** | `00-inbox/` + current session | Raw captures, active conversation | `/consolidate`, `/wrapup` |
154
- | **Episodic** | `07-logs/YYYY/MM/` | Session summaries, decisions, action items | `/wrapup`, auto-checkpoint |
155
- | **Semantic** (always-loaded) | `05-agent/MEMORY.md` + `05-agent/MEMORY-INDEX.md` | Identity + Active Projects + Critical Behaviors + memory file registry | `/learn`, `/onboarding` |
156
- | **Semantic** (lazy-loaded) | `05-agent/memory/` | Behavioral patterns, domain facts — loaded on demand via MEMORY-INDEX.md | `/learn`, `/recap`, `/memory-review` |
157
- | **Knowledge** | `03-knowledge/` | Permanent synthesized notes | `/distill` |
158
-
159
- ### Memory Promotion
160
-
161
- Each tier has specific skills responsible for writing to it. Knowledge moves down the stack only as fast as it earns trust.
162
-
163
- | Layer | Storage | Written by |
164
- |---|---|---|
165
- | Session log | `07-logs/` | `/wrapup` (end of session) |
166
- | Memory files | `05-agent/memory/` | `/learn` (user-driven, single fact), `/recap` (batch synthesis), `/memory-review` (edits) |
167
- | Always-loaded — Identity | `05-agent/MEMORY.md` | `/onboarding` (one-time), manual edits |
168
- | Always-loaded — Active Projects | `05-agent/MEMORY.md` | `/learn` (project lifecycle events), manual edits |
169
- | Always-loaded — Critical Behaviors | `05-agent/MEMORY.md` | `/learn` only (user explicitly teaches behavior; must meet all 3 threshold conditions) |
170
- | Always-loaded — Memory registry | `05-agent/MEMORY-INDEX.md` | Any skill writing to `memory/` (`/learn`, `/recap`, `/memory-review`) |
171
-
172
- **Promotion pipeline:**
173
- session → session log (`/wrapup`) → `memory/` files (`/recap`) → `MEMORY.md` Critical Behaviors (`/learn`)
174
-
175
- **Rules:**
176
- - `/wrapup` writes session logs only — does not promote to `memory/`
177
- - `/learn` writes to `memory/` immediately; only skill that writes to MEMORY.md Critical Behaviors
178
- - `/recap` batch-promotes from session logs → `memory/` only — does NOT write to MEMORY.md
179
- - Only behaviors applying every session with high-impact failure if missed → MEMORY.md Critical Behaviors
180
- - `MEMORY-INDEX.md` is loaded every session alongside `MEMORY.md` — it is the registry that enables lazy-loading of `memory/` files; updated automatically by any skill that writes to `memory/`
181
-
182
- ### Automatic Session Saving
183
-
184
- OneBrain has automatic behaviors that run without you doing anything:
185
-
186
- | Behavior | Trigger | What it does |
187
- |----------|---------|-------------|
188
- | **Auto Checkpoint** | Every 15 messages, every 30 min, or before context compression | Writes a checkpoint file to `07-logs/YYYY/MM/` as a safety net |
189
- | **Auto Session Summary** | You say "bye", "good night", "I'm done for today", etc. — only if `/wrapup` was not already run this session AND ≥ 3 exchanges | Saves a silent session log (marked `auto-saved: true`) without showing any output |
190
-
191
- **How they work together:**
192
-
193
- - Say "bye" → Auto Session Summary fires silently and saves a session log. No extra steps needed.
194
- - If you already ran `/wrapup` manually and then say "bye": Auto Session Summary **skips** — the log was already written.
195
- - If the session ends with no signal (browser closed, terminal killed): Auto Checkpoint files serve as the recovery mechanism. At next session start, Phase 2 automatically synthesizes any orphaned checkpoints into a session log.
196
-
197
- **`/wrapup` is manual only.** Run it yourself when you want a visible, full session summary with output shown.
198
-
199
- **Pausing long work across sessions.** For multi-day tasks that don't fit one session, run `/pause` to save a snapshot, then `/resume` in a future session to pick up seamlessly. Pause snapshots accumulate per-thread in `07-logs/pause/`; the next `/wrapup` consolidates them into one session log. This fills the gap between auto-checkpoint (involuntary) and `/wrapup` (terminal).
200
-
201
- **The practical result:** Just say "bye" and everything is saved. If the session ends unexpectedly, you lose at most 15 messages — the last checkpoint recovers the rest.
202
-
203
- > Auto Checkpoint runs on Claude Code (`Stop` hook) and Gemini CLI (`AfterAgent` hook), and uses the `onebrain` CLI binary. Install with `npm install -g @onebrain-ai/cli`. Auto Session Summary works with any agent that follows INSTRUCTIONS.md.
204
-
205
- ---
206
-
207
- ## Built for Synergetic Thinking
208
-
209
- OneBrain doesn't just store markdown. Every feature exists to make you and the agent better at each other's job.
210
-
211
- | | Feature | Description |
212
- |---|---|---|
213
- | 🧠 | **Persistent Memory** | Remembers your name, goals, preferences, and decisions across every session |
214
- | 🖥️ | **Personal AI OS** | Full local stack: Claude Code + Obsidian + tmux + Telegram — no cloud infra needed |
215
- | ⚡ | **31+ Skills** | Braindump, research, consolidate, bookmark, import files, daily briefing, and more |
216
- | 📂 | **Vault-native Markdown** | Plain Markdown, no lock-in. Your data stays yours forever |
217
- | 🔀 | **Multi-Harness OS** | Switch between Claude Code, Gemini CLI, Codex, Qwen, or BYO LLM — context never breaks. [See architecture ↑](#the-harness-os-architecture) |
218
- | 🔌 | **Zero Config** | Clone, open in Obsidian, run `/onboarding`. Ready in under 2 minutes |
219
- | 📓 | **Session Logs & Checkpoints** | Every conversation saved with summaries and action items. Auto-checkpoints fire every 15 messages or 30 min so nothing is lost mid-session *(supported on Claude Code and Gemini CLI)* |
220
- | 💾 | **Auto Session Summary** | When you say "bye", the agent silently saves a complete session log — no `/wrapup` needed |
221
- | 🔗 | **Knowledge Synthesis** | `/consolidate` turns inbox captures into permanent connected knowledge |
222
- | 🔬 | **Confidence-scored Memory** | Every insight carries `[conf:high/medium/low]` + `[verified:YYYY-MM-DD]` — knowledge that grows more reliable with use |
223
- | 💎 | **Knowledge Distillation** | `/distill` crystallizes a completed research thread into a permanent structured note in your knowledge base |
224
- | 🩺 | **Vault Doctor** | `/doctor` audits broken links, orphan notes, stale memory, and inbox backlog; `--fix` auto-repairs confidence scores and wikilinks |
225
- | 🎓 | **Teachable AI** | `/learn` permanently shapes how your agent thinks and responds |
226
- | 🪄 | **Smart Memory Review** | `/memory-review` lets you interactively prune, update, or archive memory entries one by one |
227
- | 🔒 | **Concurrent-session Safe** | Each session generates an isolated 6-char token — multiple parallel sessions never mix checkpoints |
228
- | 📱 | **Mobile Access** | Send instructions and receive briefings from anywhere via Telegram |
229
- | ⚙️ | **CLI Binary** | `onebrain` binary handles checkpoints, session init, doctor, vault-sync, and updates — no Bun, Python, or Node.js required |
230
-
231
- ---
232
-
233
- ## Use Cases
234
-
235
- ### 🖥️ Personal AI OS
236
-
237
- Run OneBrain as your personal AI operating system — a complete AI environment that runs locally with no cloud infrastructure required.
238
-
239
- **Recommended stack:**
240
-
241
- | Tool | Role |
242
- |------|------|
243
- | [Claude Code](https://claude.ai/code) | Your AI agent, running in the terminal |
244
- | [Obsidian](https://obsidian.md) | Your vault — single source of truth for memory and knowledge |
245
- | [tmux](https://github.com/tmux/tmux) | Persistent sessions that survive disconnects and reboots |
246
- | [Telegram](https://telegram.org) | Mobile access: send instructions, receive briefings from anywhere |
247
-
248
- **Setting up the full stack:**
249
-
250
- 1. Install OneBrain and open your vault in Obsidian ([Get Started](#installation))
251
- 2. Start a tmux session: `tmux new -s onebrain`
252
- 3. Start Claude Code in your vault directory: `claude`
253
- 4. Run `/telegram:configure` to connect Claude Code's built-in Telegram channel — no custom bot or external infra needed
254
- 5. From any device, open Telegram and send instructions directly to your OneBrain agent
255
-
256
- Your agent, your vault, your data — forever.
257
-
258
- ### 🧠 Thinking Partner
259
-
260
- Use OneBrain as a daily thinking partner. Capture ideas with `/braindump`, research topics with `/research`, synthesize knowledge with `/consolidate`, and surface connections you'd never find manually with `/connect`.
261
-
262
- ### 📚 Knowledge Base Builder
263
-
264
- Turn your AI into a knowledge curator: research, summarize, import files, and build a connected Markdown knowledge base that grows smarter over time.
265
-
266
- ---
267
-
268
- ## Installation
269
-
270
- ### Pick Your Harness
271
-
272
- Each harness reads OneBrain's instruction file automatically. Install it, run it inside your vault, and the plugin loads on first prompt.
273
-
274
- | Harness | Install | Run | Reads |
275
- |---|---|---|---|
276
- | **Claude Code** *(recommended)* | `npm install -g @anthropic-ai/claude-code` | `claude` | `CLAUDE.md` |
277
- | **Gemini CLI** | `npm install -g @google/gemini-cli` | `gemini` | `GEMINI.md` |
278
- | **OpenAI Codex** | `npm install -g @openai/codex` | `codex` | `AGENTS.md` |
279
- | **Qwen Code** | `npm install -g @qwen-code/qwen-code` | `qwen` | `AGENTS.md` |
280
-
281
- > Auto-checkpoint and stop-hook coverage ship for Claude Code (`Stop` + optional `PostToolUse` qmd) and Gemini CLI (`AfterAgent` + optional `AfterTool` qmd) out of the box. Slash commands are namespaced on Gemini (`/onebrain:braindump`) to avoid collisions with built-ins; on Claude they invoke directly (`/braindump`). Other harnesses gain hook coverage as upstream support lands.
282
-
283
- ### 1. Install the OneBrain CLI
3
+ npm wrapper for the [OneBrain CLI](https://github.com/onebrain-ai/onebrain-cli) — the local-first Rust binary that powers the [OneBrain](https://onebrain.run) personal AI OS for Obsidian.
284
4
 
285
5
  ```bash
286
6
  npm install -g @onebrain-ai/cli
287
- # or: bun install -g @onebrain-ai/cli
288
- ```
289
-
290
- The installer automatically downloads the correct compiled binary for your platform — no Bun installation required.
291
-
292
- ### 2. Create and initialize your vault
293
-
294
- ```bash
295
- mkdir my-vault && cd my-vault
296
- onebrain init
7
+ onebrain --version
8
+ # → onebrain 3.0.0
297
9
  ```
298
10
 
299
- ### 3. Open Obsidian
300
-
301
- File → Open Folder as Vault → select this folder
302
-
303
- ### 4. Personalize your vault
304
-
305
- In your harness: `/onboarding`
11
+ ## What this package does
306
12
 
307
- > **Adding OneBrain to an existing vault?** `cd` into it and run `onebrain init`
13
+ On install, the `postinstall.js` script downloads the platform-native binary from the matching [GitHub Release](https://github.com/onebrain-ai/onebrain-cli/releases) and places it at `./bin/onebrain` (or `onebrain.exe` on Windows). The `onebrain` command is a thin Node shim that execs the native binary.
308
14
 
309
- ### Bring Your Own LLM (via Claude Code)
310
-
311
- Already love Claude Code? Use it as a universal frontend. Point `ANTHROPIC_BASE_URL` at any OpenAI-compatible endpoint — Claude Code stays the harness, the LLM behind it changes per task.
312
-
313
- ```bash
314
- # Recommended: claude-code-router handles Anthropic ↔ provider translation
315
- npm install -g @musistudio/claude-code-router
316
- ccr code # first-run config, then launches Claude Code via the router
317
- # (later) ccr stop # tear down the router before going native again
318
-
319
- # Or direct: point ANTHROPIC_BASE_URL at any Anthropic-protocol endpoint
320
- export ANTHROPIC_BASE_URL=https://your-router-or-anthropic-compatible-host
321
- export ANTHROPIC_API_KEY=sk-byok-key
322
- cd vault && claude
323
-
324
- # Switch back to native Claude any time (manual-export route)
325
- unset ANTHROPIC_BASE_URL ANTHROPIC_API_KEY
326
- claude
327
- ```
328
-
329
- | Route | What it gets you |
15
+ | Host | Binary downloaded |
330
16
  |---|---|
331
- | **Local** (mlx, ollama, llama.cpp) | Cost-free routine work, full privacy. Pair with [`litellm`](https://github.com/BerriAI/litellm) or [`claude-code-router`](https://github.com/musistudio/claude-code-router). |
332
- | **Cloud BYOK** (Claude, Gemini, GPT, Groq, OpenRouter) | Pay-as-you-go premium reasoning. One env-var swap, no code changes. |
333
- | **Hybrid** (route by task or by cost) | Cheap models for routine, premium when it counts. |
334
-
335
- Same vault. Same skills. Same memory. The LLM swaps; OneBrain doesn't notice.
336
-
337
- ---
338
-
339
- > **After `/update`:** Run `/reload-plugins` to pick up changes in your current session, or simply start a new session.
340
-
341
- ---
342
-
343
- <a id="commands"></a>
344
-
345
- <!-- NEW-BADGE-CLEANUP: remove the green NEW shields.io badges from /search, /pause, /resume, /schedule-* on or after 2026-05-19 -->
346
-
347
- ## 📋 31+ Commands
348
-
349
- Skills are organized by workflow phase. **Gemini CLI users:** prepend the `onebrain:` namespace, e.g. `/onebrain:braindump` instead of `/braindump` (avoids collisions with Gemini built-in commands like `/help` and `/tasks`).
350
-
351
- ### 📥 INPUT — Capture & ingest
352
-
353
- | Command | What it does |
354
- |---------|-------------|
355
- | `/onboarding` | First-run setup — run this first · *first run only* |
356
- | `/braindump` | Dump everything on your mind — it gets classified and filed |
357
- | `/capture` | Quick note with auto-linking to related notes |
358
- | `/bookmark [url]` | Save a URL with AI-generated name, description, and category to Bookmarks.md |
359
- | `/summarize [url]` | Fetch a URL and save a deep summary note |
360
- | `/import [path]` | Import local files (PDF, Word, images, scripts) into vault notes |
361
- | `/reading-notes` | Turn a book or article into structured notes |
362
- | `/research [topic]` | Web research → structured note in your vault |
363
-
364
- ### ⚙️ PROCESS — Synthesize & organize
365
-
366
- | Command | What it does |
367
- |---------|-------------|
368
- | `/consolidate` | Process inbox into permanent knowledge |
369
- | `/distill [topic]` | Crystallize a completed topic thread into a permanent knowledge note in `03-knowledge/` |
370
- | `/connect` | Find connections between notes, suggest wikilinks |
371
- | `/recap` | Cross-session synthesis — batch-promote recurring insights from session logs into `memory/` files (does NOT write to MEMORY.md) |
372
- | `/weekly` | Review the week, surface patterns, set intentions |
373
- | `/daily` | Daily briefing — surfaces tasks and last session context, then saves your focus as a daily note |
374
- | `/learn` | Teach the agent something — facts about your world or behavioral preferences |
375
-
376
- ### 🔍 RECALL — Retrieve & navigate
377
-
378
- | Command | What it does |
379
- |---------|-------------|
380
- | `/search` ![NEW](https://img.shields.io/badge/NEW-success?style=flat-square) | General vault retrieval — answers what + why questions across MEMORY, sessions, plans, decisions logs, notes |
381
- | `/tasks` | Live task dashboard in Obsidian — creates/updates `TASKS.md` with always-current query sections |
382
- | `/moc` | Vault portal in Obsidian — creates/updates `MOC.md` with projects, areas, knowledge, tasks, and pinned links |
383
- | `/memory-review` | Interactive review of memory files — keep, update, deprecate, or delete entries |
384
-
385
- ### 🔧 MAINTAIN — System housekeeping
386
-
387
- | Command | What it does |
388
- |---------|-------------|
389
- | `/update` | Update skills, config, and plugins from GitHub |
390
- | `/doctor` | Vault + config health check — broken links, orphan notes, stale memory entries, inbox backlog |
391
- | `/reorganize` | Migrate flat notes into organized subfolders |
392
- | `/clone` | Package your agent context for transfer to a new vault |
393
- | `/qmd` | Set up fast vault search index — enables semantic search across all notes |
394
- | `/help` | List all available commands with descriptions |
395
- | `/wrapup` | Wrap up session — merges any auto-checkpoints and saves full summary to session log |
396
- | `/pause` ![NEW](https://img.shields.io/badge/NEW-success?style=flat-square) | Save a snapshot of long-running work mid-flight so a future session can `/resume` (does NOT end the session or clear context) |
397
- | `/resume` ![NEW](https://img.shields.io/badge/NEW-success?style=flat-square) | Load the latest snapshot of an active pause thread and pick up seamlessly in a fresh session |
398
- | `/schedule-add` ![NEW](https://img.shields.io/badge/NEW-success?style=flat-square) | Interactive wizard for adding a recurring scheduled skill |
399
- | `/schedule-once` ![NEW](https://img.shields.io/badge/NEW-success?style=flat-square) | One-shot wizard: schedule a skill to run once at a specific datetime |
400
- | `/schedule-list` ![NEW](https://img.shields.io/badge/NEW-success?style=flat-square) | Show all scheduled entries |
401
- | `/schedule-remove` ![NEW](https://img.shields.io/badge/NEW-success?style=flat-square) | Remove a scheduled entry |
402
-
403
- <details>
404
- <summary><strong>📁 Vault Structure</strong></summary>
405
- <br>
406
-
407
- Vault folders are created during `/onboarding`.
408
-
409
- ```
410
- onebrain/
411
- ├── 00-inbox/ Raw braindumps and captures (process regularly)
412
- │ └── imports/ Staging area for /import (drop files here)
413
- ├── 01-projects/ Active projects with inline tasks
414
- ├── 02-areas/ Ongoing responsibilities (health, finances, career...)
415
- ├── 03-knowledge/ Your own synthesized thinking and insights
416
- ├── 04-resources/ External info — research output, summaries, reference
417
- ├── 05-agent/ AI-specific context and memory
418
- │ ├── MEMORY.md Identity + Active Projects + Critical Behaviors
419
- │ ├── MEMORY-INDEX.md Registry of all memory files — loaded every session, enables lazy-loading
420
- │ └── memory/ All memory files — behavioral patterns, domain context, project facts
421
- ├── 06-archive/ Completed projects and archived areas
422
- ├── 07-logs/ Session logs and checkpoints (YYYY/MM/ subfolders)
423
- ├── attachments/ Copied files from /import --attach
424
- │ ├── pdf/
425
- │ ├── images/
426
- │ └── video/
427
- ├── TASKS.md Live task dashboard (created by /tasks, opened in Obsidian)
428
- ├── MOC.md Vault portal — Map of Content (created by /moc)
429
- ├── CLAUDE.md Instructions for Claude Code
430
- ├── GEMINI.md Instructions for Gemini CLI
431
- ├── AGENTS.md Universal agent instructions
432
- ├── vault.yml Your vault configuration (created during onboarding)
433
- ├── .claude/plugins/ AI skills, hooks, and shared INSTRUCTIONS (read by Claude Code)
434
- └── .gemini/ Gemini CLI project config — hooks + namespaced slash commands
435
- ```
436
-
437
- The core workflow: capture everything to inbox → process with `/consolidate` → synthesize into knowledge or save as reference → archive what's done.
438
-
439
- **`00-inbox/`** — Raw braindumps and captures
440
- Process regularly. Everything unclassified lands here first. The `imports/` subfolder is the staging area for `/import` — copy files there and run `/import` to distill them into vault notes.
441
-
442
- **`01-projects/`** — Active work with a clear goal and end date
443
- Examples: `work/Website Redesign.md`, `personal/Japan Trip 2026.md`
444
-
445
- **`02-areas/`** — Ongoing responsibilities that never "complete"
446
- Examples: `health/Running Log.md`, `finances/Budget 2026.md`
447
-
448
- **`03-knowledge/`** — Your own synthesized thinking
449
- Conclusions, frameworks, and insights you've developed — not raw reference material.
450
- Examples: `productivity/Deep Work Principles.md`, `technology/When to Use Microservices.md`
451
-
452
- **`04-resources/`** — External information saved for reference
453
- Output from `/research`, `/summarize`, `/reading-notes`, `/import`, and saved reference material.
454
- Examples: `research/Zettelkasten Method.md`, `code-snippets/Go HTTP Middleware.md`
455
-
456
- **`05-agent/`** — Your agent's portable mind
457
- Everything the AI knows about you. Copy this folder to move your agent to a new vault.
458
- - `MEMORY.md` — Identity + Active Projects + Critical Behaviors — loaded every session
459
- - `MEMORY-INDEX.md` — Registry of all memory files — loaded every session, enables lazy-loading of `memory/` files
460
- - `memory/` — All memory files — behavioral patterns, domain context, project facts
461
-
462
- **`06-archive/`** — Completed projects and retired areas
463
- Organized by date archived: `06-archive/YYYY/MM/`.
464
-
465
- **`07-logs/`** — Session logs and checkpoints
466
- Session logs: `07-logs/YYYY/MM/YYYY-MM-DD-session-NN.md` — generated by `/wrapup` or auto-saved at session end.
467
- Checkpoints: `07-logs/YYYY/MM/YYYY-MM-DD-{session_token}-checkpoint-NN.md` — auto-generated by hooks every 15 messages or 30 minutes, and before context compression. Incorporated and deleted by `/wrapup` when wrapping up.
468
-
469
- </details>
470
-
471
- ## Task Syntax
472
-
473
- OneBrain creates tasks in [Obsidian Tasks](https://publish.obsidian.md/tasks/) plugin format:
474
-
475
- ```
476
- - [ ] Task description 📅 2026-03-25
477
- - [ ] High priority task 🔺 📅 2026-03-22
478
- ```
17
+ | macOS Apple Silicon | `onebrain-aarch64-apple-darwin.tar.gz` |
18
+ | macOS Intel | `onebrain-x86_64-apple-darwin.tar.gz` |
19
+ | Linux ARM64 (glibc) | `onebrain-aarch64-unknown-linux-gnu.tar.gz` |
20
+ | Linux x86_64 (glibc) | `onebrain-x86_64-unknown-linux-gnu.tar.gz` |
21
+ | Windows ARM64 | `onebrain-aarch64-pc-windows-msvc.zip` |
22
+ | Windows x86_64 | `onebrain-x86_64-pc-windows-msvc.zip` |
479
23
 
480
- Tasks live inline in your notes the Tasks plugin surfaces them across the vault. Run `/tasks` to open a live dashboard in Obsidian (`TASKS.md` at vault root) with sections for overdue, due this week, unscheduled, due later, and recently completed.
24
+ Linux musl usersinstall directly from GitHub Releases (musl binary is published there but the npm wrapper currently maps glibc).
481
25
 
482
- ---
483
-
484
- ## OneBrain Cloud
485
-
486
- Multi-device sync and hosted agent runtimes. Your unified intelligence travels with you.
487
-
488
- | Tier | What you get | Status |
489
- |---|---|---|
490
- | **FREE** | Local vault · OSS skills · BYOK | ✅ Available now |
491
- | **PRO** | Sync · mobile · hosted runtime | 🟡 [Join waitlist](https://onebrain.run) |
492
- | **TEAM** | Shared intelligence · team mesh | 🟡 Coming soon |
493
-
494
- ---
495
-
496
- ## Scheduling
497
-
498
- OneBrain skills can run automatically on a schedule via your OS scheduler (macOS launchd; Linux + Windows coming soon). Configure in `vault.yml`:
499
-
500
- ```yaml
501
- schedule:
502
- - cron: "0 9 * * *" # daily 9am
503
- skill: /daily
504
- - cron: "0 18 * * 5" # Friday 6pm
505
- skill: /weekly
506
- - cron: "0 12 * * 0" # Sunday noon
507
- skill: /recap
508
- ```
509
-
510
- For a one-shot reminder, use `at:` instead of `cron:`:
511
-
512
- ```yaml
513
- schedule:
514
- - at: "2026-05-13 14:30"
515
- skill: /reminder
516
- ```
517
-
518
- After firing, the launchd plist auto-uninstalls itself.
519
-
520
- Register schedules:
26
+ ## Alternative install paths
521
27
 
522
28
  ```bash
523
- onebrain register-schedule
524
- ```
29
+ # Homebrew (macOS / Linux)
30
+ brew tap onebrain-ai/onebrain
31
+ brew install onebrain
525
32
 
526
- Or use the interactive wizards from inside your vault:
33
+ # Direct GitHub Release download
34
+ curl -L https://github.com/onebrain-ai/onebrain-cli/releases/latest
527
35
 
36
+ # In-place self-update once installed
37
+ onebrain update
528
38
  ```
529
- /schedule-add # recurring schedule wizard
530
- /schedule-once # one-shot wizard
531
- /schedule-list # show all scheduled entries
532
- /schedule-remove # remove an entry
533
- ```
534
-
535
- Output goes to `[logs_folder]/scheduler/YYYY/MM/YYYY-MM-DD-{skill}.md` as readable markdown.
536
-
537
- ### Command mode (CLI binaries, hook-style)
538
-
539
- For CLI maintenance tasks that aren't OneBrain skills, use the `command + args[]` shape:
540
-
541
- ```yaml
542
- schedule:
543
- - cron: "0 3 * * 0"
544
- command: onebrain
545
- args: [qmd-reindex]
546
- - cron: "0 5 * * *"
547
- command: rsync
548
- args: [-av, /vault, /backup]
549
- ```
550
-
551
- This matches the same shape Claude Code uses for `hooks` in `settings.json` — direct binary invocation with positional argv. No wrapper skill needed.
552
-
553
- ### Quick start — preset bundles
554
39
 
555
- Don't want to hand-craft cron entries? OneBrain ships three preset tiers. New vaults are prompted during `/onboarding`; existing vaults can trigger the selector by running `/schedule-add` when the `schedule:` block is empty.
40
+ The npm wrapper, Homebrew formula, and direct GH Release download all converge on the same binary pick the one that fits your environment.
556
41
 
557
- - **Minimal** — `/daily` briefing only
558
- - **Essentials (default)** — `/daily` + `/weekly` Friday + `/recap` Sunday
559
- - **Maintenance Plus** — Essentials + `/doctor` monthly + `/tasks` daily + `onebrain qmd-reindex` Sunday (mixes skill + command modes)
42
+ ## Skipping postinstall
560
43
 
561
- Canonical tier definitions live at `.claude/plugins/onebrain/skills/_shared/schedule-presets.md`.
44
+ For CI environments that supply the binary out-of-band, set `ONEBRAIN_CLI_SKIP_POSTINSTALL=1` before `npm install`:
562
45
 
563
- CLI flags:
564
-
565
- | Flag | Purpose |
566
- |---|---|
567
- | `--dry-run` | Print plist without writing |
568
- | `--remove` | Remove all OneBrain schedules |
569
- | `--refresh` | Re-emit plists after vault move |
570
- | `--resume <skill>` | Resume an auto-paused skill |
571
- | `--status` | Show registered schedules + run history |
572
- | `--test <skill>` | Manually invoke a scheduled skill once |
573
-
574
- **Note:** OneBrain's scheduler is distinct from Claude Code's `/loop` (in-session) and `/schedule` (cloud-hosted). OneBrain runs locally and writes to your vault.
575
-
576
- ---
577
-
578
- <details>
579
- <summary><strong>⚙️ Prerequisites & Detailed Setup</strong></summary>
580
- <br>
581
-
582
- ### Prerequisites
583
-
584
- **Required:** [git](https://git-scm.com) — used to version-control your vault.
585
-
586
- | Platform | Install command |
587
- |----------|----------------|
588
- | macOS (Homebrew) | `brew install git` |
589
- | macOS (Xcode CLT) | `xcode-select --install` |
590
- | Windows (winget) | `winget install --id Git.Git` |
591
- | Windows (Chocolatey) | `choco install git` |
592
- | Debian / Ubuntu | `sudo apt install git` |
593
- | Fedora / RHEL | `sudo dnf install git` |
594
- | Arch | `sudo pacman -S git` |
595
-
596
- Verify with `git --version` before running the installer.
597
-
598
- **Optional:** [bun](https://bun.sh) — not required for most users. `npm install -g @onebrain-ai/cli` automatically downloads a compiled binary for your platform. Bun is only needed if you're on an unsupported platform or want to install from source.
599
-
600
- **Windows:** Git for Windows (above) includes Git Bash, which provides the `bash` environment required to run all hooks.
601
-
602
- ### Community Plugins
603
-
604
- These three plugins are pre-configured in vault settings — install them via **Settings → Community plugins → Browse**, then click **Trust author and enable plugins** when prompted:
605
-
606
- - **Tasks** — task management with due dates
607
- - **Dataview** — query notes like a database
608
- - **Terminal** — run your AI agent from within Obsidian
609
-
610
- These are recommended but optional:
611
-
612
- - **Templater** — advanced templates
613
- - **Calendar** — visual calendar view
614
- - **Tag Wrangler** — manage tags across vault
615
- - **QuickAdd** — fast capture workflows
616
- - **Obsidian Git** — version control for your vault
617
-
618
- ### Claude Code Skills (Optional)
619
-
620
- For Obsidian-specific Claude Code skills (markdown, bases, canvas, and more), install the [Obsidian Skills](https://github.com/kepano/obsidian-skills) plugin separately:
621
-
622
- ```
623
- /plugin marketplace add kepano/obsidian-skills
624
- /plugin install obsidian@obsidian-skills
46
+ ```bash
47
+ ONEBRAIN_CLI_SKIP_POSTINSTALL=1 npm install -g @onebrain-ai/cli
625
48
  ```
626
49
 
627
- </details>
50
+ The shim still runs but exits with `command not found` (127) until the binary is staged at `node_modules/@onebrain-ai/cli/bin/onebrain`.
628
51
 
629
- ---
52
+ ## Migration from v2.x
630
53
 
631
- ## Customization
54
+ This is the first v3 release on npm. v2.x was the TypeScript/Bun implementation and is now deprecated — use this v3 package going forward. See the [v3.0.0 CHANGELOG](https://github.com/onebrain-ai/onebrain-cli/blob/main/CHANGELOG.md) for the full migration story.
632
55
 
633
- Edit `05-agent/MEMORY.md` directly to update your identity, goals, or recurring context at any time. The AI picks up changes on the next session start.
56
+ ## Releasing
634
57
 
635
- The full set of AI instructions that govern your agent's behavior lives in [`.claude/plugins/onebrain/INSTRUCTIONS.md`](.claude/plugins/onebrain/INSTRUCTIONS.md). You can read it to understand how your agent works. Note that `/update` will overwrite this file — add any session-level customizations to your `CLAUDE.md` instead, so they survive updates.
58
+ Source for this package lives at `npm-wrapper/` in the [`onebrain-ai/onebrain-cli`](https://github.com/onebrain-ai/onebrain-cli) repository. Publishes happen automatically from the `npm-publish` job in `.github/workflows/release.yml` whenever a stable `vMAJOR.MINOR.PATCH` tag is pushed:
636
59
 
637
- ## Contributing
60
+ 1. The job uses npm Trusted Publishers (OIDC `id-token: write`) — there is no long-lived `NPM_TOKEN` secret to rotate.
61
+ 2. `npm version "$VERSION" --no-git-tag-version --allow-same-version` rewrites `package.json` to match the git tag, so the wrapper version always equals the binary release version.
62
+ 3. `npm publish --access public --provenance` ships the package with a Sigstore attestation linking it to the exact workflow run and commit.
638
63
 
639
- Pull requests welcome. See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
64
+ Tags containing `-` (e.g. `v3.0.1-rc.1`) are treated as prereleases and skip the npm publish step. Do not publish this package manually from a local clone — the trusted-publisher policy only honors publishes that originate from this workflow.
640
65
 
641
66
  ## License
642
67
 
643
- [MIT](LICENSE)
68
+ [AGPL-3.0-only](LICENSE) — matches the upstream CLI binary. If you make a modified version available to users over a network (AGPL §13 — SaaS, internal APIs, any networked interaction), you must release your modifications under the same license. For commercial licensing inquiries, contact [hello@onebrain.run](mailto:hello@onebrain.run).