LogoNotyra Docs
Plugins

Quickstart

Build a TypeScript plugin and load it in Developer Mode

Install Node.js 24 and pnpm 12.15.0, then copy or fork the template.

git clone https://github.com/yuma-shin/notyra-plugins-template.git my-plugin
cd my-plugin
pnpm install
pnpm rename my-plugin "My Plugin"
pnpm install
pnpm typecheck
pnpm build
pnpm test

The second install refreshes the lockfile after renaming. The starter includes a character-count panel, note events, settings, CSS, a toolbar button and Mod-Alt-1 to jump to the first line. Builtin shortcuts and earlier plugins take precedence; conflicts appear in Settings.

Developer Mode

  1. Open Settings → Plugins in Notyra and acknowledge the notice.
  2. Enable Developer Mode and choose the project folder you just built.
  3. Review the name, source, permissions and destinations, then consent. Zero-permission plugins also require consent.
  4. Open the main window's side panel and choose Character count. Switch or edit a note to see it update.
  5. After a code change, run pnpm build and press Reload. Developer Mode does not automatically watch files.

Notyra reads the development folder without modifying or deleting it. Turning Developer Mode off stops development plugins. Adding permissions or destinations on reload requires fresh consent; cancellation keeps the plugin stopped and pending consent.

How the build works

scripts/build.mjs bundles src/index.ts as browser ESM at dist/index.js. It keeps @notyra/plugin-api external and maps it to /<Plugin_ID>/@notyra/api.js, using the current package name. React and CodeMirror imports are mapped to /@shared/ virtual modules to share the app's instances.

The API package is independent. Until its first npm publication, the template pins an immutable repository tarball that installs directly. After publication, use exact npm version 3.1.7 matching the host API. Use type-only imports for interfaces and error types:

import { notyra } from '@notyra/plugin-api'
import type { Disposable, NotyraPluginApi } from '@notyra/plugin-api'

The runtime API comes from the host virtual module. Executing the package's normal JavaScript entry directly throws a build-configuration error.

Continue with the manifest and runnable examples.