Skip to content

Search docs

Search Cortex documentation pages and headings.

Plugin Development

Publishing and Review

Prepare plugin release assets for review and community listing without promising an unreviewed install path.

On this page

Reviewed community listing is release-asset based with a source-archive fallback during early development.

Required Release Assets

Publish these assets in the latest release:

manifest.json
dist/index.js      # or the basename/path referenced by manifest.main
styles.css         # optional, Markdown-surface styles only

Cortex downloads manifest.json, reads main, then downloads the matching main asset. It accepts either the exact relative path from main or the basename of that path.

Manifest checks

The reviewed listing flow verifies:

  • manifest.json is valid JSON.
  • manifest.id matches the listing entry id.
  • manifest.main is present and safe.
  • The main bundle exists in release assets or in the source archive fallback.

Source Archive Fallback

If release assets are incomplete, Cortex can fall back to the GitHub source archive. It searches for manifest.json, resolves the declared main file, and copies optional styles.css into staging.

This fallback is useful during early development, but reviewed plugins should still include release assets explicitly.

Install and rollback behavior

Cortex installs into:

<vault>/.cortex/plugins/<plugin-id>

Install and update use a staging directory. The previous plugin directory is preserved until the staged plugin is promoted, the plugin host reloads, and the new plugin registration is visible. If anything fails, Cortex removes staging and restores the previous plugin best effort.

Release checklist

  1. Build a single plugin bundle.
  2. Include manifest.json at the release root.
  3. Include the file referenced by manifest.main.
  4. Include styles.css only when the plugin declares markdown:extensions.
  5. Keep all paths relative and free of ...
  6. Test install, reload, disable, and uninstall in a temporary vault.