No description
Find a file
mpstaton cac37d2ff5 improve(setup-script): improve setup script to hopefully work, unsure
yet

 On branch refactor/refactor-to-starter-code
 Changes to be committed:
	modified:   README.md
	modified:   package.json
	modified:   setup-plugin.mjs
2025-07-19 19:04:08 +03:00
src refactor(modals): refactor modals to match generic functionality with 2025-07-19 18:43:18 +03:00
.editorconfig start(project): initial setup from example Obsidian plugin with our developer preferences 2025-06-07 15:37:58 +03:00
.eslintignore start(project): initial setup from example Obsidian plugin with our developer preferences 2025-06-07 15:37:58 +03:00
.eslintrc upgrade(packages): all packages are now up to date 2025-06-07 19:20:42 +03:00
.gitattributes start(project): initial setup from example Obsidian plugin with our developer preferences 2025-06-07 15:37:58 +03:00
.gitignore clean(starter): clean starter code 2025-07-06 17:23:37 +03:00
.npmrc switch(pnpm): add pnpm get rid of npm 2025-06-07 18:25:25 +03:00
.windsurfrules.md improve(styles, setup): improve styles and setup, including a script to 2025-07-19 18:59:26 +03:00
esbuild.config.mjs feat(modal): milestone of modal feature displaying citations working 2025-07-06 18:41:26 +03:00
main.ts refactor(main, services): refactor main and services to be a more 2025-07-19 17:24:04 +03:00
manifest.json improve(styles, setup): improve styles and setup, including a script to 2025-07-19 18:59:26 +03:00
package.json improve(setup-script): improve setup script to hopefully work, unsure 2025-07-19 19:04:08 +03:00
plugin-config.yaml improve(styles, setup): improve styles and setup, including a script to 2025-07-19 18:59:26 +03:00
pnpm-lock.yaml improve(styles, setup): improve styles and setup, including a script to 2025-07-19 18:59:26 +03:00
README.md improve(setup-script): improve setup script to hopefully work, unsure 2025-07-19 19:04:08 +03:00
setup-plugin.mjs improve(setup-script): improve setup script to hopefully work, unsure 2025-07-19 19:04:08 +03:00
styles.css improve(styles, setup): improve styles and setup, including a script to 2025-07-19 18:59:26 +03:00
tsconfig.json upgrade(packages): all packages are now up to date 2025-06-07 19:20:42 +03:00
version-bump.mjs start(project): initial setup from example Obsidian plugin with our developer preferences 2025-06-07 15:37:58 +03:00
versions.json improve(styles, setup): improve styles and setup, including a script to 2025-07-19 18:59:26 +03:00

Obsidian Plugin Starter

This is barebones starter code to build an Obsidian plugin using the pnpm package manager. It is a clone of the official Obsidian plugin starter code, but with updated libraries, packages, dependencies.

Getting Started

If you want to use the setup-plugin.mjs script, fill out plugin-config.yaml and then make it an executable file.

chmod +x setup-plugin.mjs

When run, it will create the basic metadata and fill in the template variables. If you don't need it, just delete it and happy hacking.

Run the script with

node setup-plugin.mjs
pnpm install
pnpm add -D esbuild @types/node builtin-modules
pnpm build
pnpm dev

Packages, Dependencies, Libraries:

"devDependencies": {
   "@types/node": "^24.0.12",
   "@typescript-eslint/eslint-plugin": "8.36.0",
   "@typescript-eslint/parser": "8.36.0",
   "builtin-modules": "5.0.0",
   "esbuild": "0.25.6",
   "eslint": "^9.30.1",
   "obsidian": "latest",
   "tslib": "2.8.1",
   "typescript": "5.8.3"
},
"dependencies": {
   "@modelcontextprotocol/sdk": "^1.15.0",
   "fastify": "^5.4.0",
   "zod": "^4.0.0"
}

If you're like us, you have a directory housing all your code projects. To use your plugin as you develop it, just create a symbolic link. Here is my example, but you will need to use your own path structure:

ln -s /Users/mpstaton/code/lossless-monorepo/obsidian-plugin-starter /Users/mpstaton/content-md/lossless/.obsidian/plugins/