Fastest way to scaffold your LLM powered personal knowledge base - Obsidian, Claude Code, qmd, Github
JavaScript aiampclaude-codecodexcursorgithubknowledge-baseknowledge-graphknowledge-managementllmobsidianobsidian-vaultqmdsecond-brain
# Getting Started
## Requirements
- [mise](https://mise.jdx.dev/) — auto-installed by the CLI if missing
- [Claude Code](https://claude.ai/code) — the CLI that runs the wiki
- [Obsidian](https://obsidian.md/) — optional but recommended
## Step 1 — Scaffold
```bash
npx claude-second-brain
```
Or install globally for a shorter command (`csb` is an alias):
```bash
npm i -g claude-second-brain
csb # same as: claude-second-brain
```
The CLI will ask:
- **Brain name** — what to call this brain (default: `my-brain`)
- **Git remote** — optionally host your vault on **[GitHub](/remotes/github)** (requires `gh` CLI) or **[Cloudflare Artifacts](/remotes/cloudflare-artifacts)** (requires a Cloudflare account + wrangler)
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`.
## Step 2 — Generate vector embeddings
```bash
cd ~/.claude-second-brain/my-brain && pnpm qmd:reindex
```
Generates 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:
```bash
git remote add origin https://github.com/you/my-brain.git
git push -u origin main
```
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.
## Multiple brains
Run `npx claude-second-brain` (or `csb` if installed globally) again 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-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](/cli) for `ls`, `use`, `rm`, `path`, `qmd`, `exec`, and `doctor` subcommands that manage and target specific brains.
## Access from anywhere
**Edit anywhere — Claude Code on desktop or mobile.** Claude Code's GitHub integration lets you open the repo and work from anywhere — 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](https://github.com/Vinzent03/obsidian-git) — no setup required. Your wiki syncs automatically on every commit. For iOS: put the repo folder inside iCloud Drive — Obsidian Mobile picks it up natively.
**Browse anywhere — GitHub.** It's a plain GitHub repo. View and edit files directly in the browser at any time.