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:
- Your
package.jsonmust include thecolab-pluginkeyword - Your
package.jsonmust include thecolab-pluginconfiguration field - 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": ["*"]
}
} 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:
- Open Colab
- Click Plugins in the status bar
- Click Install from folder
- 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:
- Open Colab
- Click Plugins in the status bar
- In the Browse tab, search for your plugin name
- Your plugin should appear in the results
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.descriptionthat 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
reasonfield 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:
- Update the
versioninpackage.json - Run
npm publish
Users who have installed your plugin will see an update indicator in the Plugins panel.