A quick guide to get started with Obsidian plugin development.
Setup
1. Install NVM and Node.js
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
nvm install node
2. Install esbuild
npm install -g esbuild
Install Sample Plugin in Obsidian
- Download the Obsidian Sample Plugin from GitHub
- Place it in your vault's
.obsidian/plugins/directory - Run the development server:
npm run dev - Enable the plugin in Obsidian Settings > Community Plugins
Debugging
Since Obsidian is an Electron app, you can use Chromium developer tools:
-
macOS:
Cmd + Opt + I -
Windows/Linux:
Ctrl + Shift + I
Originally published at my blog