Your personal knowledge base, maintained by AI. Just say what you want to save — AI handles the rest.
In OpenClaw or Claude Code, just say:
Please install Second Brain from https://github.com/zhiwehu/second-brain
AI will automatically: clone → setup → inject → done.
| What to Say | What Happens |
|---|---|
Save this to my second brain: [content] |
Stores and classifies the content |
Save this link: [URL] |
Fetches, summarizes, saves |
Search my second brain for [topic] |
Semantic search across all your knowledge |
Save this screenshot |
Extracts text, saves image + metadata |
Save this voice memo |
Transcribes, summarizes, stores |
Save this meeting notes |
Extracts decisions, action items,存档 |
Run health check |
Checks wiki health, fixes issues |
Compile schema |
Builds knowledge graph from your wiki |
7 content types: Tweets · Articles · Images · Voice · Files · Chats · Tasks
You say "save this" → AI processes → Stored in your knowledge base
↓
Raw file saved (images, audio, documents)
↓
AI extracts key information
↓
Classified into PARA (Projects/Areas/Resources/Archives)
↓
Written to wiki + cross-linked + logged
PARA Classification: AI automatically decides where content belongs:
- Projects — Active goals with deadlines
- Areas — Ongoing responsibilities
- Resources — Topics you're interested in
- Archives — Completed or abandoned items
Layer 1: raw/ → Original files (images, audio, tweets)
Layer 2: wiki/ → Processed knowledge (summaries, links)
Layer 3: wiki/schema/ → Concepts & relationships (weekly compile)
After installation, just talk to AI:
Save this to my second brain: [content]
Save this link to second brain: [URL]
Search my second brain for AI related content
Save that screenshot to second brain
Save today's meeting notes to second brain
| Type | Examples |
|---|---|
| Tweets | Twitter posts, Weibo, short thoughts |
| Articles | Blog posts, news, web pages |
| Images | Screenshots, photos (EXIF extracted) |
| Voice | Audio recordings (transcribed) |
| Files | PDF, Word, Excel, text documents |
| Chat | Meeting notes, chat logs |
| Tasks | Schedules, TODOs with deadlines |
Please upgrade my second brain
Run the second brain health check
Or manually:
./tools/doctor.sh
./tools/doctor.sh --fix # auto-fix issuesSet up automatic reminders using OpenClaw cron:
# Daily todo reminder (9 AM)
openclaw cron add \
--name "Second Brain - Daily Review" \
--cron "0 9 * * *" \
--tz "Asia/Shanghai" \
--session isolated \
--message "Read wiki/log.md and list all pending tasks for today" \
--announce --channel <your-channel> --to "<target>"
# Weekly health check (Sunday 8 PM)
openclaw cron add \
--name "Second Brain - Weekly Check" \
--cron "0 20 * * 0" \
--tz "Asia/Shanghai" \
--session isolated \
--message "Run ./tools/doctor.sh and report the results" \
--announce --channel <your-channel> --to "<target>"Layer 3 of the architecture — extract concepts and relationships from your wiki:
Compile my second brain schema
This extracts:
- Concepts (people, products, methods, technologies)
- Relations (influences, supports, uses, part_of)
- Properties (domain, type, first_seen)
Run manually when your wiki accumulates content:
./tools/compile_schema.sh --status # check status
./tools/compile_schema.sh --incremental # compile new content only
./tools/compile_schema.sh --full # full recompileSecond Brain uses a dual-directory architecture:
second-brain-source/ # Source code directory (cloned from GitHub)
├── tools/ # Utility scripts
├── process/ # AI processing templates
├── setup.sh # Installation script
├── upgrade.sh # Upgrade script
└── CLAUDE.md # AI config
~/second-brain/ # Data directory (your second brain)
├── .git/ # Independent git repo (manage with git)
├── wiki/ # Your knowledge base
│ ├── projects/ # Active projects
│ ├── areas/ # Ongoing responsibilities
│ ├── resources/ # Interesting topics
│ ├── archives/ # Completed/archived
│ └── schema/ # Concepts & relationships
├── raw/ # Raw materials (images/audio/files)
└── ... # Copied code files
Key Points:
second-brain-source/is clean source code, manage with git for your fork~/second-brain/is your data, with independent git for your knowledge base- Run
setup.shand it automatically creates your data directory
Git Management:
# Manage your data
cd ~/second-brain
git status
git add .
git commit -m 'Added new content'
git push # Push to your private GitHub/Gitee
# Upgrade source code
cd second-brain-source
git fetch upstream
./upgrade.shUse Obsidian to visually browse your wiki:
- Open Obsidian
- Click "Open Vault" → select
~/second-brain/(your data directory) - Obsidian will display all
.mdfiles inwiki/ - Non-markdown files (
.sh, images inraw/, etc.) are automatically hidden
Recommended Obsidian plugins:
- Dataview — Query wiki data with dynamic tables
- Templater — Automated templates
- Obsidian Git — Auto-backup to Git (push to your private repo)
Tip: Both OpenClaw/Claude Code and Obsidian work in your data directory (~/second-brain/). OpenClaw manages AI processing, Obsidian provides the visual graph view.
Install these for full functionality:
| Tool | Function | Install |
|---|---|---|
| Whisper | Speech-to-text | pip3 install whisper |
| exiftool | Image metadata | brew install exiftool |
| yt-dlp | YouTube/Bilibili subtitles | brew install yt-dlp |
| agent-reach | Twitter/Xiaohongshu/WeChat | see below |
| qmd | Semantic search (recommended) | npm install -g @tobilu/qmd |
agent-reach install:
Please install agent-reach: https://raw.githubusercontent.com/Panniantong/agent-reach/main/docs/install.md
qmd setup:
npm install -g @tobilu/qmd
qmd collection add $(pwd)/wiki --name second-brain
qmd embedConvert web articles to markdown with one click:
- Install Obsidian Web Clipper extension
- Configure to save to
second-brain/raw/articles/ - Clip articles while browsing → they go directly to raw/
This makes ingestion much faster — clip first, process later.
After clipping an article with images:
- In Obsidian Settings → Files and links → set "Attachment folder path" to
raw/assets/ - Bind hotkey: Search "Download" → "Download attachments for current file"
- After clipping, press the hotkey → all images download locally
This ensures LLMs can view images directly from local files.
Use Marp to create presentations from wiki content:
- Install Marp plugin in Obsidian
- Write markdown with Marp syntax
- Export to PPT/PDF
Example:
---
marp: true
theme: default
---
# My Presentation
- Point 1
- Point 2This lets you generate slide decks directly from your accumulated knowledge.
Q: Where is my data stored?
A: In ~/second-brain/wiki/ and ~/second-brain/raw/. Your data is managed with an independent git repository, pushable to your private GitHub/Gitee.
Q: Why separate source code and data?
A: This way you can upgrade code without affecting your data. Source code in second-brain-source/, your data in ~/second-brain/.
Q: Do I need to maintain it manually?
A: No. AI automatically updates index and log. Just regularly git push to backup your data.
Q: How is this different from regular notes? A: Second Brain automatically classifies using PARA, remembers relationships between content, and runs regular health checks.
Q: How do I upgrade?
A: Download the latest source to second-brain-source/, then run ./upgrade.sh. Your wiki/ and raw/ data will not be lost.
Q: What is Schema and when should I compile it?
A: Schema is Layer 3 — it extracts concepts and relationships from your wiki content. Compile when your wiki has accumulated significant content (weekly recommended). Use @compile command or run ./tools/compile_schema.sh --incremental.
Want to stay updated with the latest changes?
If you fork this repo, you can receive updates from the original:
Click the "Fork" button on github.com/zhiwehu/second-brain
git clone https://github.com/YOUR_USERNAME/second-brain.git second-brain-source
cd second-brain-source./setup.shThis will:
- Create your data directory (
~/second-brain/) - Initialize git repo to manage your data
- Optional: push to your private GitHub
git remote add upstream https://github.com/zhiwehu/second-brain.gitWhen updates are available, run:
cd second-brain-source
./upgrade.shThis fetches latest code from original repo and overlays to your data directory. Your wiki/ and raw/ data stays safe.
If you fix a bug or add a feature, submit a Pull Request on GitHub!
For manual installation or contributing, see README_DEV.md.
For Chinese version, see README_ZH.md / README_DEV_ZH.md.