Getting Started
Requirements
- pnpm 10+ on Node 22+, or mise — if pnpm isn't installed, the CLI installs mise and uses it to fetch node + pnpm
- An AI coding agent that supports Agent Skills — Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf, Goose, … Setup asks which ones to install the skills for.
- Obsidian — optional but recommended
Step 1 — Scaffold
npx claude-second-brainOr install globally for a shorter command (csb is an alias):
npm i -g claude-second-brain
csb # same as: claude-second-brainThe CLI will ask:
- Brain name — what to call this brain (default:
my-brain) - Git remote — optionally host your vault on GitHub (requires
ghCLI) or Cloudflare Artifacts (requires a Cloudflare account + wrangler) - Register qmd collections after install? — runs
pnpm qmd:setuponce dependencies are installed - Install skills for which agents? — Claude Code plus any detected agent is preselected; see Install skills for any agent
Every question is asked up front, so the rest of setup runs unattended.
Creates the brain at ~/.claude-second-brain/my-brain/, registers it in ~/.claude-second-brain/config.toml, runs pnpm install (using your system pnpm 10+, or mise to fetch node + pnpm if it's missing), registers the qmd collections, installs the skills for the agents you picked, and runs git init.
Step 2 — Generate vector embeddings
csb reindex my-brain # or: npx claude-second-brain reindex my-brainGenerates local vector embeddings. First run downloads ~2GB of GGUF models — once.
Step 3 — Open in Obsidian (and push to GitHub if not done)
If you created a GitHub repo during setup, it's already pushed — skip straight to opening in Obsidian.
If you skipped GitHub during setup, connect it now:
git remote add origin https://github.com/you/my-brain.git
git push -u origin mainOpen ~/.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.
Multiple brains
Run csb create <name> (or npx claude-second-brain create <name>) to create additional brains. Each gets its own folder under ~/.claude-second-brain/ and its own isolated qmd index. The global skills (/brain-ingest, /brain-remember, /brain-search, /brain-refresh) always operate on the default brain in ~/.claude-second-brain/config.toml. The first brain created is set as the default automatically.
See the CLI Reference for ls, use, rm, path, qmd, exec, skills, git-token, upgrade, and doctor subcommands that manage and target specific brains.
Access from anywhere
Edit anywhere — your agent on desktop, web or mobile. The vault is a plain git repo, so any agent that can clone it can work on it: run it locally, or use a cloud agent with GitHub access (Claude Code on the web and mobile, Codex cloud, Copilot coding agent, Cursor background agents, …) to ingest a source, run a query, or update a page from your phone.
Read anywhere — Obsidian desktop and mobile. Open the repo as an Obsidian vault. The bundled .obsidian folder pre-configures obsidian-git — no setup required. Your wiki syncs automatically on every commit. For iPhone and iPad, see iCloud sync.
Browse anywhere — your git host. It's a plain git repo. On GitHub (or any host with a web UI), view and edit files directly in the browser at any time.