@onebrain-ai/cli 2.1.15 → 2.2.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 +6 -5
- package/dist/onebrain +45 -24
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -198,7 +198,7 @@ OneBrain has automatic behaviors that run without you doing anything:
|
|
|
198
198
|
|
|
199
199
|
**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.
|
|
200
200
|
|
|
201
|
-
> Auto Checkpoint
|
|
201
|
+
> 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.
|
|
202
202
|
|
|
203
203
|
---
|
|
204
204
|
|
|
@@ -214,7 +214,7 @@ OneBrain doesn't just store markdown. Every feature exists to make you and the a
|
|
|
214
214
|
| 📂 | **Vault-native Markdown** | Plain Markdown, no lock-in. Your data stays yours forever |
|
|
215
215
|
| 🔀 | **Multi-Harness OS** | Switch between Claude Code, Gemini CLI, Codex, Qwen, or BYO LLM — context never breaks. [See architecture ↑](#the-harness-os-architecture) |
|
|
216
216
|
| 🔌 | **Zero Config** | Clone, open in Obsidian, run `/onboarding`. Ready in under 2 minutes |
|
|
217
|
-
| 📓 | **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 *(
|
|
217
|
+
| 📓 | **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)* |
|
|
218
218
|
| 💾 | **Auto Session Summary** | When you say "bye", the agent silently saves a complete session log — no `/wrapup` needed |
|
|
219
219
|
| 🔗 | **Knowledge Synthesis** | `/consolidate` turns inbox captures into permanent connected knowledge |
|
|
220
220
|
| 🔬 | **Confidence-scored Memory** | Every insight carries `[conf:high/medium/low]` + `[verified:YYYY-MM-DD]` — knowledge that grows more reliable with use |
|
|
@@ -276,7 +276,7 @@ Each harness reads OneBrain's instruction file automatically. Install it, run it
|
|
|
276
276
|
| **OpenAI Codex** | `npm install -g @openai/codex` | `codex` | `AGENTS.md` |
|
|
277
277
|
| **Qwen Code** | `npm install -g @qwen-code/qwen-code` | `qwen` | `AGENTS.md` |
|
|
278
278
|
|
|
279
|
-
> Auto-checkpoint and
|
|
279
|
+
> 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.
|
|
280
280
|
|
|
281
281
|
### 1. Install the OneBrain CLI
|
|
282
282
|
|
|
@@ -342,7 +342,7 @@ Same vault. Same skills. Same memory. The LLM swaps; OneBrain doesn't notice.
|
|
|
342
342
|
|
|
343
343
|
## 📋 24+ Commands
|
|
344
344
|
|
|
345
|
-
The full skill surface, alphabetized by workflow.
|
|
345
|
+
The full skill surface, alphabetized by workflow. **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`).
|
|
346
346
|
|
|
347
347
|
| Command | What it does |
|
|
348
348
|
|---------|-------------|
|
|
@@ -402,7 +402,8 @@ onebrain/
|
|
|
402
402
|
├── GEMINI.md Instructions for Gemini CLI
|
|
403
403
|
├── AGENTS.md Universal agent instructions
|
|
404
404
|
├── vault.yml Your vault configuration (created during onboarding)
|
|
405
|
-
|
|
405
|
+
├── .claude/plugins/ AI skills, hooks, and shared INSTRUCTIONS (read by Claude Code)
|
|
406
|
+
└── .gemini/ Gemini CLI project config — hooks + namespaced slash commands
|
|
406
407
|
```
|
|
407
408
|
|
|
408
409
|
The core workflow: capture everything to inbox → process with `/consolidate` → synthesize into knowledge or save as reference → archive what's done.
|
package/dist/onebrain
CHANGED
|
@@ -9558,7 +9558,7 @@ var init_lib = __esm(() => {
|
|
|
9558
9558
|
var require_package = __commonJS((exports, module) => {
|
|
9559
9559
|
module.exports = {
|
|
9560
9560
|
name: "@onebrain-ai/cli",
|
|
9561
|
-
version: "2.
|
|
9561
|
+
version: "2.2.0",
|
|
9562
9562
|
description: "CLI for OneBrain \u2014 personal AI OS for Obsidian with persistent memory, 24+ skills, and Claude Code integration",
|
|
9563
9563
|
keywords: [
|
|
9564
9564
|
"onebrain",
|
|
@@ -10205,20 +10205,6 @@ function applyPermissions(settings) {
|
|
|
10205
10205
|
}
|
|
10206
10206
|
return added;
|
|
10207
10207
|
}
|
|
10208
|
-
async function registerGeminiHooks(vaultRoot) {
|
|
10209
|
-
const geminiSettingsPath = join4(vaultRoot, ".gemini", "settings.json");
|
|
10210
|
-
try {
|
|
10211
|
-
const text = await readFile(geminiSettingsPath, "utf8");
|
|
10212
|
-
const settings = JSON.parse(text);
|
|
10213
|
-
applyHooks(settings);
|
|
10214
|
-
await writeSettings(geminiSettingsPath, settings);
|
|
10215
|
-
} catch (err) {
|
|
10216
|
-
if (err.code !== "ENOENT") {
|
|
10217
|
-
process.stderr.write(`register-hooks: gemini warning: ${err instanceof Error ? err.message : String(err)}
|
|
10218
|
-
`);
|
|
10219
|
-
}
|
|
10220
|
-
}
|
|
10221
|
-
}
|
|
10222
10208
|
async function registerDirectPath() {
|
|
10223
10209
|
const home = homedir();
|
|
10224
10210
|
const candidates = [join4(home, ".zshrc"), join4(home, ".bashrc"), join4(home, ".profile")];
|
|
@@ -10316,9 +10302,6 @@ async function runRegisterHooks(opts = {}) {
|
|
|
10316
10302
|
if (!isTTY)
|
|
10317
10303
|
note("permissions ok");
|
|
10318
10304
|
}
|
|
10319
|
-
if (harness === "gemini") {
|
|
10320
|
-
await registerGeminiHooks(vaultRoot);
|
|
10321
|
-
}
|
|
10322
10305
|
if (harness === "direct") {
|
|
10323
10306
|
await registerDirectPath();
|
|
10324
10307
|
}
|
|
@@ -10495,6 +10478,43 @@ async function syncPluginFiles(extractedDir, vaultRoot, unlinkFn = unlink2) {
|
|
|
10495
10478
|
}
|
|
10496
10479
|
return { filesAdded, filesRemoved };
|
|
10497
10480
|
}
|
|
10481
|
+
async function syncGeminiConfig(extractedDir, vaultRoot, unlinkFn = unlink2) {
|
|
10482
|
+
const sourceGemini = join5(extractedDir, ".gemini");
|
|
10483
|
+
const destGemini = join5(vaultRoot, ".gemini");
|
|
10484
|
+
try {
|
|
10485
|
+
await stat4(sourceGemini);
|
|
10486
|
+
} catch {
|
|
10487
|
+
return { filesAdded: 0, filesRemoved: 0 };
|
|
10488
|
+
}
|
|
10489
|
+
await mkdirIdempotent(destGemini);
|
|
10490
|
+
const sourceFiles = await listFilesRecursive(sourceGemini);
|
|
10491
|
+
const sourceRelSet = new Set(sourceFiles.map((f2) => relative(sourceGemini, f2)));
|
|
10492
|
+
const destFiles = await listFilesRecursive(destGemini);
|
|
10493
|
+
const destRelSet = new Set(destFiles.map((f2) => relative(destGemini, f2)));
|
|
10494
|
+
const staleRels = [];
|
|
10495
|
+
for (const rel of destRelSet) {
|
|
10496
|
+
if (!sourceRelSet.has(rel))
|
|
10497
|
+
staleRels.push(rel);
|
|
10498
|
+
}
|
|
10499
|
+
let filesAdded = 0;
|
|
10500
|
+
for (const srcPath of sourceFiles) {
|
|
10501
|
+
const rel = relative(sourceGemini, srcPath);
|
|
10502
|
+
const destPath = join5(destGemini, rel);
|
|
10503
|
+
await mkdirIdempotent(dirname2(destPath));
|
|
10504
|
+
const content = await readFile2(srcPath);
|
|
10505
|
+
await writeFile3(destPath, content);
|
|
10506
|
+
filesAdded++;
|
|
10507
|
+
}
|
|
10508
|
+
let filesRemoved = 0;
|
|
10509
|
+
for (const rel of staleRels) {
|
|
10510
|
+
const destPath = join5(destGemini, rel);
|
|
10511
|
+
try {
|
|
10512
|
+
await unlinkFn(destPath);
|
|
10513
|
+
filesRemoved++;
|
|
10514
|
+
} catch {}
|
|
10515
|
+
}
|
|
10516
|
+
return { filesAdded, filesRemoved };
|
|
10517
|
+
}
|
|
10498
10518
|
async function copyRootDocs(extractedDir, vaultRoot) {
|
|
10499
10519
|
const docs = ["CONTRIBUTING.md", "CHANGELOG.md", "PLUGIN-CHANGELOG.md"];
|
|
10500
10520
|
for (const doc of docs) {
|
|
@@ -10821,9 +10841,10 @@ async function runVaultSync(vaultRoot, opts = {}) {
|
|
|
10821
10841
|
stopSpinner(`onebrain-ai/onebrain@${branch} (v${result.version})`);
|
|
10822
10842
|
startSpinner("\uD83D\uDCC2", "Syncing files");
|
|
10823
10843
|
try {
|
|
10824
|
-
const
|
|
10825
|
-
|
|
10826
|
-
result.
|
|
10844
|
+
const pluginResult = await syncPluginFiles(extractedDir, vaultRoot, unlinkFn);
|
|
10845
|
+
const geminiResult = await syncGeminiConfig(extractedDir, vaultRoot, unlinkFn);
|
|
10846
|
+
result.filesAdded = pluginResult.filesAdded + geminiResult.filesAdded;
|
|
10847
|
+
result.filesRemoved = pluginResult.filesRemoved + geminiResult.filesRemoved;
|
|
10827
10848
|
} catch (err) {
|
|
10828
10849
|
stopSpinner("plugin sync failed");
|
|
10829
10850
|
const msg = err instanceof Error ? err.message : String(err);
|
|
@@ -10968,7 +10989,7 @@ var import_picocolors5 = __toESM(require_picocolors(), 1);
|
|
|
10968
10989
|
var import_picocolors = __toESM(require_picocolors(), 1);
|
|
10969
10990
|
function resolveBinaryVersion() {
|
|
10970
10991
|
if (true)
|
|
10971
|
-
return "2.
|
|
10992
|
+
return "2.2.0";
|
|
10972
10993
|
try {
|
|
10973
10994
|
const pkg = require_package();
|
|
10974
10995
|
return pkg.version ?? "dev";
|
|
@@ -13199,8 +13220,8 @@ function patchUtf8(stream) {
|
|
|
13199
13220
|
}
|
|
13200
13221
|
|
|
13201
13222
|
// src/index.ts
|
|
13202
|
-
var VERSION = "2.
|
|
13203
|
-
var RELEASE_DATE = "2026-05-
|
|
13223
|
+
var VERSION = "2.2.0";
|
|
13224
|
+
var RELEASE_DATE = "2026-05-07";
|
|
13204
13225
|
patchUtf8(process.stdout);
|
|
13205
13226
|
patchUtf8(process.stderr);
|
|
13206
13227
|
var VERSION_STRING = `OneBrain v${VERSION} \u2014 released ${RELEASE_DATE}`;
|