Publishing Your Plugin

Once you've built a Colab plugin, you can publish it to npm so other users can discover and install it directly from Colab's Plugins panel.

Requirements

For your plugin to be discoverable in Colab:

  1. Your package.json must include the colab-plugin keyword
  2. Your package.json must include the colab-plugin configuration field
  3. The package must be published to npm

Step 1: Configure package.json

Ensure your package.json includes the required keyword and configuration:

{
  "name": "my-colab-plugin",
  "version": "1.0.0",
  "description": "A useful plugin for Colab",
  "main": "index.ts",
  "keywords": ["colab-plugin"],
  "author": "Your Name",
  "license": "MIT",
  "colab-plugin": {
    "displayName": "My Plugin",
    "description": "What your plugin does",
    "main": "index.ts",
    "entitlements": {
      "ui": {
        "notifications": true,
        "reason": "Shows status notifications"
      }
    },
    "activationEvents": ["*"]
  }
}
Important: The colab-plugin keyword is required for your plugin to appear in Colab's plugin search. Without it, users won't be able to find your plugin in the Browse tab.

Step 2: Test Locally

Before publishing, test your plugin by installing it from a local folder:

  1. Open Colab
  2. Click Plugins in the status bar
  3. Click Install from folder
  4. Select your plugin directory

Local plugins are symlinked, so you can make changes and restart Colab to test updates.

Step 3: Publish to npm

When your plugin is ready:

npm login
npm publish

For scoped packages:

npm publish --access public

Step 4: Verify Discovery

After publishing, verify your plugin is discoverable:

  1. Open Colab
  2. Click Plugins in the status bar
  3. In the Browse tab, search for your plugin name
  4. Your plugin should appear in the results
Note: It may take a few minutes for npm to index your package after publishing.

How Discovery Works

When users search in Colab's Plugins panel, Colab queries the npm registry for packages matching their search term that also have the colab-plugin keyword.

The search results show:

  • Package name and version
  • Description from colab-plugin.description
  • Author and last publish date
  • Declared entitlements (so users can make informed trust decisions)

Best Practices

Naming

  • Use a clear, descriptive package name
  • Consider prefixing with colab- for discoverability (e.g., colab-git-lens)

Description

  • Write a concise colab-plugin.description that explains what your plugin does
  • This appears in search results and helps users decide whether to install

Entitlements

  • Declare all capabilities your plugin uses in entitlements
  • Include a reason field explaining why each capability is needed
  • Request only the minimum permissions necessary

Versioning

  • Follow semantic versioning (semver)
  • Update the version before each publish
  • Document changes in a CHANGELOG

Updating Your Plugin

To publish an update:

  1. Update the version in package.json
  2. Run npm publish

Users who have installed your plugin will see an update indicator in the Plugins panel.