Local-first Markdown infrastructure

Your notes stay yours. Their links stay healthy.

2ndBrain CLI is the maintenance layer for a growing Markdown vault—safe refactors, precise link checks, scoped Git backups, and a visual knowledge graph. No account. No migration. No lock-in.

Node.js 20+macOS · Linux · WindowsApache-2.0
my-brain / health check
$ brain links --stats --orphans

Notes247
Internal links1,382
Broken links0
Missing embeds0
Ambiguous WikiLinks0

✓ Vault health check passed
A+Link healthEverything resolves locally
plain .md files
Plain Markdown
Local by default
Git-aware
Obsidian-compatible

Built for the messy middle

Write freely.
Maintain confidently.

Your editor helps you create notes. 2ndBrain CLI handles the maintenance work that becomes fragile as hundreds of files, links, and assets accumulate.

01SAFE REFACTOR

Rename without breaking context

Move or rename a note while updating relative Markdown links, resolved WikiLinks, and matching image folders. Preview every change with --dry-run.

02READ ONLY

Find decay before it spreads

Catch broken links, missing headings and blocks, missing embeds, ambiguous WikiLinks, backlinks, and orphans.

03SCOPED GIT

Keep recoverable history

Commit—and optionally push—only the configured notes repository. Your surrounding workspace stays outside the boundary.

04LOCAL WEBUI

See the system, not just the files

Browse notes, link health, reviews, backlinks, and a knowledge graph from a dashboard that listens only on your machine.

Fits your existing vault

From folder to clarity in three steps.

No import pipeline and no proprietary database. Point 2ndBrain CLI at ordinary Markdown files and start with a read-only health check.

STEP 01

Inspect

Run a read-only diagnostic against any Markdown or Obsidian vault—without initializing or moving it.

brain doctor /path/to/notes
STEP 02

Understand

Open the local dashboard to explore notes, health signals, reviews, and relationships in context.

brain --vault /path/to/notes web --open
STEP 03

Maintain

Refactor with a preview, capture new ideas, and preserve the result in scoped Git history.

brain rename old new --dry-run

One local control room

Your vault, made visible.

The WebUI turns the same local Markdown into an operational view. Read and edit notes, trace links, review what matters, and explore the graph without sending content to a hosted service.

  • Dashboard and recent notes
  • Link-health diagnostics
  • Interactive knowledge graph
  • Local note capture and editing

Click a screenshot to bring it forward ↗

Safety is a product feature

Clear boundaries. Boring surprises.

A tool that changes a knowledge base should make its limits obvious. Read-only checks, dry-run refactors, local networking, and vault-scoped Git behavior are designed into the workflow.

Read the security policy →
Local network onlyThe WebUI binds to 127.0.0.1 by default, not the public network.
Read-only by defaultDoctor, link scans, backlinks, status, reviews, and dry runs do not change files.
Repository-scoped GitBackups and the watcher operate only on the configured notes repository.
Preview before refactorUse --dry-run and Git history before a large rename or move.

Small commands, clear intent

A focused toolkit for daily maintenance.

Use one command at a time, or keep the watcher running for lightweight background maintenance.

brain doctorInspect an existing vault

Check structure and configuration without writing anything.

brain linksAudit link health

Find broken targets, orphans, missing embeds, and ambiguous WikiLinks.

brain backlinksTrace incoming context

See which notes point to the one you are working on.

brain rename / moveRefactor safely

Update a note and the links that depend on it, with dry-run previews.

brain backupPreserve history

Commit and optionally push the configured notes repository.

brain webOpen the visual layer

Launch the local dashboard, editor, checks, reviews, and graph.

Give your notes a maintenance layer.

Install globally, enter any workspace, and start with a new brain or inspect an existing Markdown vault.

npm install -g @qwtang/brain-cli