My Obsidian Plugin

unlisted

by Your Name

A starter Obsidian plugin with settings, commands, and ribbon icons.

Updated 18d agoMIT
View on GitHub

Obsidian Plugin Starter

A production-ready Obsidian plugin template with TypeScript, esbuild hot reload, settings tab, commands, modals, and ribbon icons.

Features

  • TypeScript — Full type safety with the Obsidian API
  • esbuild — Fast builds with hot reload in dev mode
  • Settings Tab — Configurable greeting, ribbon toggle, date format
  • 5 Commands — Greeting, timestamp insert, modal, word count, checkbox toggle
  • Ribbon Icon — Quick-access sidebar button
  • Status Bar — Plugin status indicator
  • File Events — Hooks into workspace file-open events
  • Modal — Sample modal for building custom UI

Quick Start

# Install dependencies
npm install

# Development (watch mode with hot reload)
npm run dev

# Production build
npm run build

Development Setup

  1. Clone this repo into your vault's .obsidian/plugins/ directory
  2. Run npm install
  3. Run npm run dev
  4. Enable the plugin in Obsidian → Settings → Community Plugins
  5. Edit src/main.ts and changes will rebuild automatically

Commands

CommandDescription
Show greetingDisplays your configured greeting message
Insert timestampInserts today's date at cursor position
Open sample modalOpens an example modal dialog
Count wordsCounts words in the current file
Toggle checkboxToggles - [ ] / - [x] on the current line

Project Structure

├── src/
│   └── main.ts          # Plugin entry point (commands, settings, modal)
├── styles.css            # Plugin styles (auto-loaded by Obsidian)
├── manifest.json         # Obsidian plugin manifest
├── versions.json         # Version compatibility map
├── esbuild.config.mjs    # Build configuration
├── version-bump.mjs      # Auto-bumps manifest on npm version
├── tsconfig.json         # TypeScript config
└── package.json

Customization

  1. Update manifest.json with your plugin ID, name, and author
  2. Edit src/main.ts to add your own commands, views, and logic
  3. Add styles in styles.css
  4. Update minAppVersion in manifest.json if you use newer Obsidian APIs

Publishing

  1. Update version: npm version patch/minor/major
  2. Build: npm run build
  3. Create a GitHub release with main.js, manifest.json, and styles.css
  4. Submit to Obsidian Community Plugins

Resources

License

MIT

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.