Welcome! This guide will get you from zero to building your first plugin feature.
Prerequisites
- Node.js 16+ installed
- Obsidian installed
- Git (for version control)
- Code editor (VS Code recommended for TypeScript support)
Step 1: Set Up the Project
# Clone the repository (or use it as a template on GitHub)
git clone https://github.com/fcskit/obsidian-plugin-template.git
cd obsidian-plugin-template
# Install dependencies
npm install
# Build the plugin
npm run dev
Note: npm run dev builds once. Use npm run dev:watch for automatic rebuilds (blocks terminal).
Step 2: Open Test Vault in Obsidian
The template includes a pre-configured test vault with the plugin already installed.
- Open Obsidian
- Click: “Open another vault” (or File → Open vault)
- Click: “Open folder as vault”
- Navigate to:
obsidian-plugin-template/test-vault(in your cloned directory) - Click: “Open”
Step 3: Enable Community Plugins
- Go to: Settings (gear icon)
- Navigate to: Community plugins
- If needed: Click “Turn on community plugins”
- Verify: Both plugins are enabled:
- âś… obsidian-plugin-template
- âś… hot-reload
Step 4: Open Developer Console
Mac: Cmd + Option + I
Windows/Linux: Ctrl + Shift + I
Tab: Console
Step 5: Test the Plugin
Quick Test
- Press
Cmd + P(orCtrl + P) - Type: “Open Example Modal”
- Press Enter
- Expected: Modal opens with message
- Check Console: Should see debug message
Test Hot-Reload
Option 1: Watch Mode (Auto-rebuild)
- Keep Obsidian open
- In terminal:
npm run dev:watch(starts watch mode) - Edit
src/main.ts(change modal message) - Save file
- Expected: Plugin auto-reloads in Obsidian
- Test modal again - should show new message
Option 2: Single Builds (AI-Friendly)
- Edit
src/main.ts(change modal message) - Run
npm run dev - In Obsidian: Press
Cmd+R(or Ctrl+R) to reload - Test modal again - should show new message
That’s It! 🎉
You’re now ready to develop with:
- âś… Instant feedback (hot-reload)
- âś… Full debug logging
- âś… Component-based logs
- âś… Tag-based filtering
Need More Details?
See: OBSIDIAN-TESTING-CHECKLIST.md
Common Issues
Plugins not showing? → Make sure community plugins are enabled in Settings
Hot-reload not working?
→ Make sure npm run dev is running in watch mode
No debug messages? → Open developer console (Cmd+Option+I / Ctrl+Shift+I)
Modal not opening? → Check console for errors, try Cmd/Ctrl+R to reload Obsidian
Next Steps
- Build your plugin: Replace example code with your own functionality
- Explore features: Check out the Feature Documentation
- Learn patterns: Review the Logger and Debug System
- Customize: Modify settings, add commands, create new modals
- Deploy: Follow the Roadmap for release planning