Set up a new Obsidian plugin development environment
masterTo start developing an Obsidian plugin using this template:
- Use the "Use this template" button on GitHub to create your own repository.
- Clone your repository to a local folder. For easiest development, place it directly in your vault's plugin folder:
.obsidian/plugins/your-plugin-name. - Ensure you have NodeJS installed (version 18 or higher).
- Run
npm ito install dependencies. - Run
npm run devto compilesrc/main.tsintomain.jsin watch mode. - Reload Obsidian to load the plugin and enable it in the settings window.
To update the Obsidian API definitions, run npm update in your repository folder.
npm i
npm run dev