An AI-powered assistant for Obsidian, built on the OpenCode Agent framework
Features β’ Installation β’ Usage β’ Development β’ Contributing
OnyxMind is an intelligent assistant plugin for Obsidian that brings powerful AI capabilities directly into your note-taking workflow. Built on the OpenCode Agent framework, it enables natural language interactions with your knowledge base, content generation, iterative writing assistance, and intelligent note management.
- π€ AI-Powered Conversations - Chat with AI models directly in Obsidian
- π Note-Aware Context - Automatically understands your current note and vault structure
- π― Smart Capabilities - Pre-configured prompts for common tasks (metadata completion, note review, quizzes, Zen mode)
- π οΈ Tool Visualization - See AI tool calls and file operations in real-time
- π¬ Multi-Session Management - Organize conversations with automatic summarization
- β¨οΈ Keyboard-First - Full keyboard navigation and slash commands support
- π¨ Theme-Adaptive - Seamlessly integrates with Obsidian's theming system
- Streaming responses with real-time content generation
- Thinking process visualization to understand AI reasoning
- Tool call tracking with detailed input/output display
- Markdown rendering with syntax highlighting
- Error handling with user-friendly messages
- Multiple concurrent sessions with configurable limits
- Automatic session summarization after first conversation
- Session title display on hover for easy identification
- Session persistence across Obsidian restarts
- Quick session switching with keyboard shortcuts
Pre-configured AI capabilities for common workflows:
- Complete Note Metadata - Auto-generate tags, properties, and backlinks
- Review Notes - Check content completeness and logical structure
- Quiz Mode - Generate interactive quizzes from note content
- Zen Mode - Deep thinking prompts for exploration and insight
- Command autocomplete with fuzzy search
- Keyboard navigation (Arrow keys, Enter, Tab, Escape)
- MCP and Skill integration for extended functionality
- Custom command support (coming soon)
- Current note injection - Automatically includes active note in first message
- Removable context chip - Control when note context is sent
- File link handling - Click to navigate to referenced files
- Vault-scoped operations - All AI actions respect vault boundaries
- Theme-adaptive styling using Obsidian CSS variables
- Responsive layout for desktop and mobile
- Accessibility support with ARIA labels and keyboard navigation
- Focus management with visible focus indicators
- Smooth animations and transitions
Enter- Send messageShift + Enter- New line in inputCmd/Ctrl + P- Open command palette/- Trigger slash command menuβ/β- Navigate slash commandsEsc- Close slash menu
- Obsidian v1.12.3 or higher
- OpenCode CLI installed and configured (Installation Guide)
-
Download the latest release
Go to the Releases page and download the following files from the latest release:
main.jsmanifest.jsonstyles.css
-
Copy to Obsidian plugins folder
Create the plugin directory and place the downloaded files inside:
<vault>/.obsidian/plugins/onyxmind/main.js <vault>/.obsidian/plugins/onyxmind/manifest.json <vault>/.obsidian/plugins/onyxmind/styles.css -
Enable in Obsidian
- Open Obsidian Settings
- Navigate to Community plugins
- Disable Safe mode (if enabled)
- Click Reload plugins
- Enable OnyxMind
Once published to the Obsidian Community Plugin directory:
- Open Obsidian Settings
- Go to Community plugins β Browse
- Search for "OnyxMind"
- Click Install β Enable
-
Open Plugin Settings
- Go to Settings β OnyxMind
-
Configure AI Provider
- Provider ID:
anthropic(default) - Model ID:
claude-3-5-sonnet-20241022(recommended) - API Key: Your Anthropic API key (Get one here)
- Provider ID:
-
Adjust Behavior Settings (optional)
- Max Active Sessions: Maximum concurrent chat sessions (default: 3)
- Max History Messages: Number of messages to load from history (default: 50)
OnyxMind automatically starts an OpenCode server on http://127.0.0.1:4096. The server configuration includes:
- Web Search: Enabled via Exa integration
- Skills: Obsidian-specific skills loaded from community repository
- Agent Prompt: Custom system prompt for Obsidian context awareness
-
Open Chat View
- Click the π¬ icon in the left ribbon, or
- Run command:
OnyxMind: Open chat
-
Start Conversation
- Type your message in the input box
- Press
Enterto send (or click Send button) - Watch the AI response stream in real-time
-
Use Welcome Capabilities
- Click any capability card on the welcome screen
- Pre-configured prompts will be sent automatically
1. Open a note in Obsidian
2. Run command: "OnyxMind: Ask about current note"
3. The note content is automatically included in context
1. Open a note
2. Run command: "OnyxMind: Summarize current note"
3. Receive a concise summary
Type / in the chat input to see available commands:
/commit- Git commit assistance/review-pr- Pull request review- Custom commands from MCP servers and skills
When AI asks questions:
- Answer options appear in the chat
- Select your answer(s)
- Click Submit to continue conversation
- New Session: Click
+button in session strip - Switch Session: Click session number tab
- Close Session: Click
Γon session tab - Clear Messages: Click trash icon in header
- Refresh: Click refresh icon to sync with server
onyxmind/
βββ src/
β βββ main.ts # Plugin entry point
β βββ settings.ts # Settings interface
β βββ services/
β β βββ opencode-service.ts # OpenCode SDK wrapper
β β βββ session-manager.ts # Session state management
β β βββ chat-service.ts # Chat logic and streaming
β βββ views/
β β βββ chat-view.tsx # Main chat view
β β βββ chat/
β β βββ chat-view-app.tsx # React root component
β β βββ components/ # UI components
β β βββ hooks/ # React hooks
β β βββ welcome-capabilities.ts
β βββ utils/
β βββ opencode-server.ts # Server lifecycle
β βββ env.ts # Environment helpers
βββ styles.css # Plugin styles
βββ manifest.json # Plugin metadata
βββ tests/ # Test files
# Install dependencies
npm install
# Development mode (watch)
npm run dev
# Production build
npm run build
# Lint code
npm run lint
# Format code
npm run format- Make changes to TypeScript files in
src/ - Build with
npm run dev(auto-rebuilds on save) - Reload plugin in Obsidian (Cmd/Ctrl + R in dev console)
- Test your changes
- Commit with descriptive messages
# Run unit tests
npm test
# Test specific file
node tests/session-manager.test.js
# Test OpenCode SDK integration
node tests/sdk-test-standalone.js- TypeScript with strict mode enabled
- ESLint with Obsidian-specific rules
- Prettier for consistent formatting
- Pre-commit hooks for automatic linting and formatting
-
Separation of Concerns
- Plugin acts as UI layer only
- All AI processing handled by OpenCode Agent
- Clean service boundaries
-
Obsidian Best Practices
- Memory-safe event registration
- Type-safe API usage
- Accessibility-first design
- Mobile compatibility
-
Performance
- Streaming responses for perceived speed
- Efficient message rendering
- Lazy loading of history
- Debounced user input
- Manages OpenCode server lifecycle
- Wraps SDK client with custom fetch (CORS workaround)
- Handles session CRUD operations
- Streams AI responses via SSE
- Maintains session state in memory
- Persists sessions to Obsidian data
- Enforces session limits
- Syncs with remote OpenCode sessions
- Orchestrates message flow
- Manages streaming state
- Handles tool calls and questions
- Provides abort functionality
- React-based UI components
- Hooks for state management
- Markdown rendering with syntax highlighting
- Tool visualization components
See ROADMAP.md for detailed development plans.
- Enhanced file operations visualization
- Conversation history search
- Note integration improvements
- Performance optimizations
- Multi-modal support (images, attachments)
- Custom command system
- Collaboration features
- Mobile optimizations
- Stable API
- Complete feature set
- Comprehensive documentation
- Community plugin release
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
- π Report bugs via GitHub Issues
- π‘ Suggest features in Discussions
- π Improve documentation
- π§ Submit pull requests
- π Translate to other languages
- Follow Obsidian best practices (OBSIDIAN_BEST_PRACTICES.md)
- Write tests for new features
- Update documentation for user-facing changes
- Use conventional commits for clear history
- Ensure accessibility in all UI changes
- Ensure
main.js,manifest.json, andstyles.cssare in the plugin folder - Check Obsidian console (Cmd/Ctrl + Shift + I) for errors
- Try rebuilding:
npm run build
- Verify OpenCode CLI is installed:
opencode --version - Check if port 4096 is available
- Review console logs for detailed error messages
- This should be automatically handled by the plugin
- If issues persist, ensure you're using the latest version
- See MEMORY.md for technical details
- Verify API key is configured correctly
- Check network connectivity
- Ensure OpenCode server is running (check console logs)
- Try creating a new session
- Reload Obsidian
- Try switching themes
- Check if
styles.cssis loaded in dev console
For more help, see USER_GUIDE.md or open an issue.
- Local-first: All data stored locally in your vault
- No telemetry: No usage tracking or analytics
- API calls: Only to configured AI provider (Anthropic)
- Vault isolation: Plugin only accesses files within your vault
- User messages and conversation history
- Current note content (when explicitly requested)
- File paths and metadata (for context)
- Tool call results
- Vault structure or file list (unless explicitly requested)
- Personal information (unless included in notes)
- Plugin settings or API keys
- Usage statistics
- Store API keys securely (Obsidian encrypts plugin data)
- Review AI responses before accepting file modifications
- Use vault backups regularly
- Keep plugin updated for security patches
MIT License - see LICENSE file for details.
- OpenCode Team - For the excellent AI agent framework
- Obsidian Team - For the amazing note-taking platform
- Documentation: Full docs
- Issues: Bug reports
- Discussions: Community forum
- OpenCode: opencode.ai
- Obsidian: obsidian.md
Made with β€οΈ for the Obsidian community