Plugin Development
Community Plugins
Build reviewed, vault-scoped Cortex plugins with the public API while keeping notes portable.
On this page
Community plugins extend Cortex through the public @cortex.md/api package. The host creates a
plugin instance, injects this.manifest and this.api, calls onload(), and disposes tracked
registrations when the plugin unloads.
Extension surfaces
Plugins can add commands, editor behavior, Markdown rendering, property types, portable views, settings, sidebar entries, status bar items, context menus, vault-aware workflows, and plugin-owned data. Each surface is guarded by explicit capabilities so extension behavior can be reviewed before listing.
Install location
During development, place or symlink a plugin directory here:
<vault>/.cortex/plugins/<plugin-id>/
manifest.json
dist/index.js
styles.css # optional, Markdown-surface styles only
Cortex watches the vault plugin directory and reloads enabled community plugins when plugin files change.
Start here
Rules of thumb
- Import only from
@cortex.md/apiand your own bundled code. - Declare every required capability in
manifest.json. - Use vault-relative paths with forward slashes.
- Use declarative views instead of React or DOM APIs.
- Keep view state serializable and update it through actions and reducers.
- Dispose manual timers, external subscriptions, and caches in
onunload().