An Obsidian plugin that integrates Claude AI for intelligent vault management using the Claude Code SDK.
- Chat with Claude Code about your Obsidian vault directly within Obsidian
- Real-time streaming responses as Claude processes your requests
- Full vault access - Claude can read, create, edit, and organize your notes
- Obsidian-aware - Understands wikilinks, tags, frontmatter, and vault structure
- Visual feedback - See which tools Claude uses (Read, Write, Grep, etc.)
- Claude Code Max subscription - Required for API access
- Claude Code CLI installed and authenticated
- Node.js 18+ and pnpm package manager
- Obsidian desktop app
# Install globally
npm install -g @anthropic-ai/claude-code
# Verify installation
claude --version
# Authenticate (requires Claude Code Max subscription)
claude login
# Clone the repository
git clone https://github.com/yourusername/obsi-cc.git
cd obsi-cc
# Install dependencies
pnpm install
cd sdk-server && pnpm install && cd ..
# Build the plugin
pnpm run build
First, locate your Obsidian vault folder. Common locations:
- macOS:
~/Documents/Obsidian Vault
or~/obsidian
- Windows:
C:\Users\YourName\Documents\Obsidian Vault
- Linux:
~/Documents/obsidian
or~/obsidian
To find it:
- Open Obsidian
- Go to Settings β About
- Look for "Current vault" - this shows your vault path
# Set your vault path (replace with your actual path)
VAULT_PATH="$HOME/Documents/Obsidian Vault"
# Create plugin directory
mkdir -p "$VAULT_PATH/.obsidian/plugins/obsidian-claude-code"
# Copy plugin files
cp main.js manifest.json styles.css "$VAULT_PATH/.obsidian/plugins/obsidian-claude-code/"
Windows users (PowerShell):
# Set your vault path
$VAULT_PATH = "C:\Users\YourName\Documents\Obsidian Vault"
# Create plugin directory
New-Item -ItemType Directory -Force -Path "$VAULT_PATH\.obsidian\plugins\obsidian-claude-code"
# Copy plugin files
Copy-Item main.js,manifest.json,styles.css "$VAULT_PATH\.obsidian\plugins\obsidian-claude-code\"
- Open Obsidian
- Go to Settings (gear icon βοΈ)
- Navigate to Community plugins
- Turn OFF Safe Mode (if enabled)
- Click Reload plugins button
- Find "Claude Code Assistant" in the list
- Toggle it ON β
# From the project root directory
./start.sh
# You should see:
# π Claude Code SDK Server for Obsidian
# π‘ WebSocket server listening on port 7860
# β³ Waiting for Obsidian to connect...
Windows users: Create a start.bat
file:
@echo off
echo Starting Claude Code SDK Server for Obsidian...
cd sdk-server
pnpm run dev
Option A: Click the robot icon (π€) in the left sidebar
Option B: Use Command Palette
- Press
Cmd/Ctrl + P
- Type "Claude"
- Select "Open Claude Assistant"
When properly connected, you should see:
- Green dot (π’) in the chat header = Connected
- "Claude: Connected" in the status bar
- Welcome message in the chat
Try these test prompts:
- "What notes are in my vault?"
- "List all my markdown files"
- "Create a test note called 'Hello Claude'"
Access via Obsidian Settings β Claude Code Assistant:
- SDK Endpoint: WebSocket URL (default:
ws://localhost:7860
) - Auto-connect: Automatically connect when Obsidian starts
- Show status bar: Display connection status in bottom bar
If your SDK server needs a different vault path, edit sdk-server/src/index.ts
:
// Line 41 - Default vault path
const vaultPath = connection?.vaultPath || process.cwd();
-
Check SDK server is running
- Look for the terminal with
./start.sh
- Should show "WebSocket server listening on port 7860"
- Look for the terminal with
-
Restart the SDK server
# Stop with Ctrl+C, then: ./start.sh
-
Check Claude CLI auth
claude --version # Should work claude login # Re-authenticate if needed
-
Check port 7860 is free
lsof -i :7860 # macOS/Linux netstat -an | findstr 7860 # Windows
-
Check firewall/antivirus isn't blocking WebSocket connections
-
Verify files are in correct location
ls -la "$VAULT_PATH/.obsidian/plugins/obsidian-claude-code/" # Should show: main.js, manifest.json, styles.css
-
Reload Obsidian with
Cmd/Ctrl + R
-
Check console for errors
- Open Developer Tools:
Cmd/Ctrl + Shift + I
- Look for red errors in Console tab
- Open Developer Tools:
The SDK server should be using the Obsidian-specific prompt. Verify by checking:
# In sdk-server/src/index.ts, around line 62
# Should have: appendSystemPrompt: `You are an expert assistant...`
obsi-cc/
βββ main.ts # Obsidian plugin source
βββ manifest.json # Plugin metadata
βββ styles.css # Chat UI styles
βββ start.sh # Quick start script
β
βββ sdk-server/ # Claude Code SDK server
β βββ src/
β β βββ index.ts # WebSocket server & Claude integration
β βββ package.json # Server dependencies
β
βββ README.md # This file
To update the plugin:
# Pull latest changes
git pull
# Rebuild everything
pnpm install
pnpm run build
cd sdk-server && pnpm install && pnpm build && cd ..
# Copy updated files to vault
cp main.js manifest.json styles.css "$VAULT_PATH/.obsidian/plugins/obsidian-claude-code/"
# Restart SDK server and reload Obsidian
Contributions welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
MIT License - See LICENSE file for details
- Vault Access: Claude has full read/write access to your vault when connected
- API Usage: Uses your Claude Code Max subscription quota
- Local Only: All processing happens locally; vault data isn't uploaded
- Backup: Always maintain backups of important notes
Built with β€οΈ by Rasmus Widing