> ## Documentation Index
> Fetch the complete documentation index at: https://collabase.ch/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Collabase documentation. Interface labels are quoted in English, as they appear in the product.
> Features marked Enterprise need the Collabase Enterprise Edition licence.

# Build a plug

> Create, check, pack and upload your own plug with the Collabase plug command line tool and an API token.

Your developers can build plugs for systems that the catalog does not cover. A plug is a small Node.js package. The command line tool `collabase-plug` creates, checks and uploads it.

## Commands

| Command | What it does |
| - | - |
| `collabase-plug init [folder] --name <package name>` | Creates a plug in a folder. |
| `collabase-plug build [folder]` | Bundles the plug, checks the licences of what it bundles and packs it into `dist/`. |
| `collabase-plug licenses [folder]` | Checks only the licences of the bundled dependencies. |
| `collabase-plug publish <archive> --url <instance>` | Uploads the package. The token comes from `--token` or `COLLABASE_API_TOKEN`. |

## Publish

**1. Build**

Run `collabase-plug build`. A dependency with a licence that Collabase may not redistribute stops the build.

**2. Get a token**

A system administrator creates an API token with the write level for **Automation** under **Profile, Security**. The token acts as that person.

**3. Upload**

Run `collabase-plug publish dist/<archive> --url https://your-instance`. The instance checks the package again and installs it. It appears in the step picker once the check is done.

Uploading needs a system administrator. The plug then runs in the sandbox like any plug that Collabase did not write.

## Related

* [Plugs](https://collabase.ch/docs/automation/plugs.md)
* [Automation plugs](https://collabase.ch/docs/admin/automation-plugs.md)
* [Automation API](https://collabase.ch/docs/api/automation/overview.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.