claude-second-brain 0.6.0 → 1.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
@@ -58,26 +58,27 @@ Everything is pre-configured. You bring the sources.
58
58
  npx claude-second-brain
59
59
  ```
60
60
 
61
+ Or install globally — `csb` is a shorter alias:
62
+
63
+ ```bash
64
+ npm i -g claude-second-brain
65
+ csb
66
+ ```
67
+
61
68
  The CLI will ask:
62
- - **Folder name** — where to create your vault (default: `my-brain`)
63
- - **qmd index path** — where to store the local search index (default: `~/.cache/qmd/index.sqlite`)
69
+ - **Brain name** — what to call this brain (default: `my-brain`)
64
70
  - **GitHub repo** — optionally create a private repo and push automatically (requires `gh` CLI)
65
71
 
66
- Then scaffolds the vault, installs `mise` + `node` + `pnpm`, runs `pnpm install`, and `git init`.
72
+ Creates the brain at `~/.claude-second-brain/my-brain/`, registers it in `~/.claude-second-brain/config.toml`, installs `mise` + `node` + `pnpm`, runs `pnpm install`, and `git init`.
67
73
 
68
- **Step 2 — Initialize inside Claude Code**
74
+ **Step 2 — Generate vector embeddings**
69
75
 
70
76
  ```bash
71
- cd my-brain && claude
77
+ cd ~/.claude-second-brain/my-brain
78
+ pnpm qmd:reindex
72
79
  ```
73
80
 
74
- Then run:
75
-
76
- ```
77
- /setup
78
- ```
79
-
80
- Registers the qmd collections and generates local vector embeddings. First run downloads ~2GB of GGUF models — once.
81
+ First run downloads ~2GB of GGUF models — once per machine. qmd collections are already registered by the CLI during scaffolding.
81
82
 
82
83
  **Step 3 — Open in Obsidian (and push to GitHub if not done)**
83
84
 
@@ -90,7 +91,7 @@ git remote add origin https://github.com/you/my-brain.git
90
91
  git push -u origin main
91
92
  ```
92
93
 
93
- Open `my-brain/` as a vault in Obsidian — the folder is already a valid Obsidian vault. The Git plugin is pre-configured — enable it and sync is automatic.
94
+ Open `~/.claude-second-brain/my-brain/` as a vault in Obsidian — the folder is already a valid Obsidian vault. The Git plugin is pre-configured — enable it and sync is automatic.
94
95
 
95
96
  ---
96
97
 
@@ -112,10 +113,6 @@ The wiki ships with a set of slash commands that cover the full workflow. No man
112
113
 
113
114
  **`/brain-rebuild`** — **Destructive.** Redesigns the qmd schema: analyzes the wiki, proposes new collections and contexts, waits for your approval, then patches `scripts/qmd/setup.ts`, drops the old index, and rebuilds embeddings from scratch. Use only when the current structure no longer fits how you search.
114
115
 
115
- ### Setup
116
-
117
- **`/setup`** — First-time initialization. Registers the qmd collections and generates local vector embeddings. Run once after scaffolding.
118
-
119
116
  ---
120
117
 
121
118
  ## Access from anywhere
@@ -223,34 +220,59 @@ All pages cross-link with Obsidian `[[wikilinks]]`. Contradictions are flagged w
223
220
 
224
221
  ## Directory layout
225
222
 
223
+ All brains live under `~/.claude-second-brain/`. A central `config.toml` tracks them.
224
+
226
225
  ```
227
- my-brain/
228
- ├── CLAUDE.md The schema. Claude reads this every session.
229
- ├── raw-sources/ ← Your raw inputs. Claude never modifies these.
230
- ├── articles/
231
- ├── pdfs/
232
- └── personal/
233
- ├── wiki/ ← Claude owns this entirely.
234
- ├── index.md
235
- ├── log.md
236
- │ ├── overview.md
237
- │ ├── sources/
238
- └── qa/
239
- └── scripts/qmd/ ← Semantic search setup and re-indexing
226
+ ~/.claude-second-brain/
227
+ ├── config.toml Brain registry (default brain, paths, git remotes)
228
+ └── my-brain/
229
+ ├── CLAUDE.md ← The schema. Claude reads this every session.
230
+ ├── raw-sources/ ← Your raw inputs. Claude never modifies these.
231
+ ├── articles/
232
+ ├── pdfs/
233
+ └── personal/
234
+ ├── wiki/ ← Claude owns this entirely.
235
+ │ ├── index.md
236
+ │ ├── log.md
237
+ ├── overview.md
238
+ │ ├── sources/
239
+ │ └── qa/
240
+ ├── scripts/qmd/ ← Semantic search setup and re-indexing
241
+ └── .qmd/ ← qmd index (gitignored)
240
242
  ```
241
243
 
244
+ ## Multiple brains
245
+
246
+ Run `npx claude-second-brain` again to create additional brains. Each gets its own folder, its own qmd index, and its own git remote — fully isolated. The global skills (`/brain-ingest`, `/brain-search`, `/brain-refresh`) always operate on the **default brain** declared in `config.toml`. The first brain you create is set as the default automatically.
247
+
248
+ Manage brains from the CLI (`csb` is the short alias — swap for `npx claude-second-brain` if not installed globally):
249
+
250
+ ```bash
251
+ csb ls # list all brains (default marked with *)
252
+ csb use <name> # switch the default brain
253
+ csb rm <name> # remove a brain (deletes its folder + config entry)
254
+ csb path # print the default brain's directory
255
+ csb path qmd # print the default brain's qmd index path
256
+ csb path config # print ~/.claude-second-brain/config.toml
257
+ csb qmd query -c wiki "<terms>" # run qmd against the default brain
258
+ csb exec -- pnpm qmd:reindex # run any command inside the default brain
259
+ csb doctor # verify tools, config, and each brain
260
+ ```
261
+
262
+ Every subcommand accepts `--help` for details (`csb rm --help`, `csb path --help`, …).
263
+
242
264
  ---
243
265
 
244
266
  ## Installing and updating skills
245
267
 
246
- Skills are slash commands Claude Code loads from `.claude/skills/[name]/SKILL.md`. `/brain-ingest`, `/brain-search`, and `/brain-refresh` install globally to `~/.claude/skills/` during setup so they work in any Claude Code session. `/brain-rebuild`, `/lint`, `/setup`, and `/qmd-cli` live inside the vault at `.claude/skills/`.
268
+ Skills are slash commands Claude Code loads from `.claude/skills/[name]/SKILL.md`. `/brain-ingest`, `/brain-search`, and `/brain-refresh` install globally to `~/.claude/skills/` during setup so they work in any Claude Code session. `/brain-rebuild` and `/lint` live inside the vault at `.claude/skills/`.
247
269
 
248
270
  ### Update the built-in wiki skills
249
271
 
250
272
  The wiki's own skills are scaffolded at creation time. To pull in improvements, use `npx skills` pointing to the template skills directory in this repo:
251
273
 
252
274
  ```bash
253
- # Install or update all 7 wiki skills from the latest template
275
+ # Install or update all 5 wiki skills from the latest template
254
276
  npx skills add https://github.com/jessepinkman9900/claude-second-brain/tree/main/template/.claude/skills -a claude-code -y
255
277
 
256
278
  # Or update a specific skill