A local AI knowledge management solution for non-technical users. No coding required, one-click deployment, ready to use out of the box.
Note: This project was originally designed for Chinese users, but international users are welcome! The interface and documentation can be adapted for English usage.
| Feature | Description |
|---|---|
| ๐ฅ Auto Ingest | Drop articles, PDFs, screenshots to AI, automatically organized into structured notes |
| ๐ฑ Social Media Collection | Xiaohongshu, Douyin, Twitter, Weibo and more โ auto-classify, analyze, and digest into knowledge (powered by OpenCLI) |
| ๐ Smart Query | Chat with AI: "Have I written about XX before?" |
| ๐ฅ Regular Health Check | AI automatically checks knowledge base health, finds broken links, duplicates, orphaned pages |
| ๐ Fully Local | All data stays on your computer, no cloud upload |
| ๐ ๏ธ One-Click Deploy | Run the script, setup completes in 5 minutes |
Send this message to any AI assistant (ChatGPT, Claude, GLM, etc.) and it will handle the entire deployment automatically:
Deploy an AI knowledge base for me: https://github.com/zxfccmm4/Obsidian-OpenCode-Knowledge/blob/main/GUIDE_FOR_AI.md
๐ The AI assistant will read
GUIDE_FOR_AI.mdfor the complete deployment procedure, including environment checks, installation, and configuration.
# Step 1: Clone the repository
git clone https://github.com/zxfccmm4/Obsidian-OpenCode-Knowledge.git
cd Obsidian-OpenCode-Knowledge/deploy
# Step 2: Run the setup script (macOS)
bash setup.sh
# Step 3: Open the generated "My Knowledge Base" folder in Obsidian๐ For detailed steps, see
deployment-guide.md(Chinese deployment guide)
The setup script handles everything automatically:
- Checks Node.js โ verifies Node.js is installed, offers to install via Homebrew if missing
- Installs OpenCode โ installs the OpenCode CLI tool globally via npm
- Installs OpenCLI โ installs the CLI tool for web automation and social media scraping (87+ site adapters)
- Creates Your Vault โ copies the
vault-template/to your chosen location - Configures AI Service โ choose from 6 providers (Zhipu GLM, Anthropic, OpenAI, Google Gemini, OpenRouter, DeepSeek)
- Sets Up Obsidian Plugin โ generates configuration for the opencode-obsidian plugin
This solution works with three components:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ
โ โ Obsidian โโโโโบโ OpenCode โโโโโบโ AGENTS.md โ โ
โ โ (Notes App) โ โ (AI Agent) โ โ (AI Rules) โ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
| Component | Purpose | What It Means for You |
|---|---|---|
| Obsidian | Local note-taking app | Write notes like using a regular notebook |
| OpenCode | AI model interface | Chat with AI directly in Obsidian |
| AGENTS.md | AI behavior guide | AI knows how to organize, query, and check your knowledge base |
After installation, your knowledge base structure looks like this:
My Knowledge Base/
โโโ ๐ AGENTS.md # AI rules (system-maintained)
โโโ ๐ AI_CONFIG.md # โ๏ธ AI configuration (user-customizable)
โโโ ๐ raw/ # Raw materials (PDFs/articles/screenshots)
โ โโโ organized by topic...
โ โโโ ๐ social/ # Social media raw content (by knowledge domain)
โ โโโ consumer-research/ # Reviews, comparisons, recommendations
โ โโโ skills-methods/ # Tutorials, guides, best practices
โ โโโ industry-insights/ # Trends, business analysis
โ โโโ lifestyle/ # Travel, food, fashion, home
โ โโโ opinions/ # Commentary, value perspectives
โ โโโ creative/ # Design, copywriting, marketing cases
โ โโโ resources/ # Tool recommendations, book lists
โโโ ๐ wiki/ # AI-organized notes
โ โโโ index.md # ๐ Global index (auto-updated by AI)
โ โโโ log.md # ๐ Operation log (auto-recorded by AI)
โ โโโ topic notes... # Including digested social media knowledge
โโโ ๐ assets/ # Image assets
โโโ ๐ .opencode/
โโโ ๐ skill/ # AI skills (9 pre-installed)
โโโ obsidian-cli/ # Obsidian operation capabilities
โโโ obsidian-markdown/ # Markdown generation capabilities
โโโ defuddle/ # Web content extraction capabilities
โโโ opencli-usage/ # OpenCLI command reference (87+ adapters)
โโโ smart-search/ # Intelligent search router
โโโ opencli-browser/ # Browser automation
โโโ opencli-autofix/ # Adapter auto-repair
โโโ opencli-explorer/ # Adapter development guide
โโโ opencli-oneshot/ # Quick CLI generation
The template comes with 9 pre-installed skills in vault-template/.opencode/skill/:
| Skill | Purpose |
|---|---|
obsidian-cli |
Read, create, search notes in your Obsidian vault |
obsidian-markdown |
Generate and edit Obsidian-flavored Markdown |
defuddle |
Extract clean content from web pages |
opencli-usage |
OpenCLI command reference (87+ site adapters) |
smart-search |
Intelligent search router across multiple platforms |
opencli-browser |
Browser automation for AI agents |
opencli-autofix |
Automatically fix broken site adapters |
opencli-explorer |
Guide for creating new site adapters |
opencli-oneshot |
Quick 4-step template for adding a single command |
Drop content you want to save to AI:
Add this to my wiki:
[paste article content / web link / describe what you want to record]
AI will automatically:
- Save raw materials to the
raw/directory - Organize into structured notes in
wiki/ - Update the global index and operation log
After scraping content from Xiaohongshu, Douyin, Twitter, Weibo, etc. (using tools like opencli):
Scraped this:
[paste scraped note content]
Add this Xiaohongshu post
AI will automatically:
- Classify by knowledge domain (consumer research / skills & methods / industry insights / lifestyle / opinions / creative inspiration / resources)
- Assess credibility (sponsored content detection, evidence quality)
- Archive raw content to
raw/social/<domain>/
OpenCLI supports automatic content scraping via Chrome browser, reusing your login sessions. See OpenCLI project.
- Digest and merge or create wiki articles (removing social media slang, keeping useful info)
- Auto-merge multiple posts on the same topic (e.g., multiple cafรฉ reviews โ city cafรฉ guide)
- Update global index and operation log
Supported platforms: Xiaohongshu, Douyin, Twitter/X, Weibo, Bilibili, WeChat, etc.
Ask AI like chatting:
What does my wiki have about project management?
Based on my notes, summarize my views on AI tools
Compare the two learning methods I wrote about in my wiki
Run weekly:
lint wiki
AI will check:
- โ Index file consistency with actual files
- โ Internal link validity
- โ Orphaned pages (pages no one links to)
- โ Cross-article fact consistency
The basic version works great. Add these features on demand by simply telling OpenCode to install them:
| Feature | Install Command | Purpose |
|---|---|---|
| ๐ PDF Export | "Install minimax-pdf skill" | Export notes to professional PDF |
| ๐ Word Export | "Install minimax-docx skill" | Generate Word documents |
| ๐ Excel Reading | "Install minimax-xlsx skill" | Read Excel data |
| ๐จ PPT Generation | "Install pptx-generator skill" | Turn notes into presentations |
| ๐ผ๏ธ Image Analysis | "Install vision-analysis skill" | Analyze images and screenshots |
Edit AI_CONFIG.md in your knowledge base root directory. You can customize:
- Knowledge domains: Add/remove/modify categories (e.g., add "Academic Notes")
- Trigger words: Change keywords that activate AI operations
- Output language: Switch to English content processing
- Social platforms: Add new platforms
- Lint checks: Enable/disable individual health checks
- Custom rules: Write additional rules in the
user-custom-rulessection
Changes take effect on the next conversation โ no restart needed.
Absolutely! This is designed specifically for non-technical users. Just follow the deployment-guide.md step by step. No programming knowledge needed.
Very secure:
- โ All data stays on your own computer, no cloud upload
- โ
Raw materials in
raw/are never modified by AI - โ Notes are plain Markdown files, easy to copy and backup anytime
Yes! The setup script supports 6 providers โ choose your preferred one during installation:
| Provider | Highlights |
|---|---|
| Zhipu GLM โญ | Chinese service, great for Chinese users |
| Anthropic | Claude series models |
| OpenAI | GPT series models |
| Google Gemini | Gemini series models |
| OpenRouter | Multi-model gateway, one key for many models |
| DeepSeek | Chinese service, cost-effective |
Just paste your API Key and the config is generated automatically. Want to switch later? Edit ~/.config/opencode/opencode.json.
- Make sure your Mac is running macOS 12 or later
- Make sure your computer has internet access
- Take a screenshot of the error message in terminal and open an Issue
| Feature | ChatGPT | This Solution |
|---|---|---|
| Data Storage | Cloud | Local |
| Long-term Memory | Session-level | Permanent |
| Structured Organization | Manual | AI-auto |
| File Associations | Not supported | Supported |
Issues and Pull Requests are welcome!
- Found a bug? Please submit an Issue
- Want to contribute code? See CONTRIBUTING.md
- Have a feature suggestion? Start a Discussion
This project is licensed under the MIT License.
You are free to use, modify, and distribute, just keep the copyright notice.
Thanks to these projects and teams for their support:
- OpenCode โ Enables AI assistants to run locally in the terminal
- Obsidian โ Excellent local note-taking software
- OpenCLI โ Make any website your CLI, 87+ site adapters
- Zhipu GLM / Anthropic / OpenAI / Google Gemini / OpenRouter / DeepSeek โ Multiple AI service providers supported
- helloianneo/obsidian-ai-second-brain โ Inspiration for the knowledge base architecture
Made with โค๏ธ for knowledge seekers
โญ Star this project ยท ๐ Submit Issue ยท ๐ฌ Join Discussion