CLI Reference and Limits
BETA
Custom Component Libraries are currently in beta and not recommended for production use.
This page lists the ToolJet CLI commands, flags, limits and naming rules for Custom Component Libraries.
Commands
Command | Run From | What It Does |
|---|---|---|
tooljet login | Anywhere | Asks for your ToolJet origin URL and personal access token. |
tooljet library init <dir> | Anywhere | Registers a library in the workspace and creates the project. |
tooljet library build | Library directory | Builds to dist/. No sign-in needed and nothing is uploaded. |
tooljet library dev | Library directory | Watches src/ and uploads to your dev track on every save. |
tooljet library publish -v <version> | Library directory | Builds and publishes a new version. |
lib is an alias for library in all four library commands.
Flags
Flag | Commands | Purpose |
|---|---|---|
--url and --token | dev, publish | Target a workspace directly instead of using the stored login. Use both together. |
--debounce | dev | Milliseconds to wait after a save before rebuilding. Defaults to 300. |
--version, -v | publish | Required. The version to publish. |
--message | publish | Optional. A message describing the version. |
--skip-type-check | publish | Publish even if there are TypeScript errors. |
Limits
Limit | Value |
|---|---|
| Published bundle | 10 MB |
| Dev bundle | 30 MB |
| CSS | 5 MB |
| Manifest | 1 MB |
| Library display name | 100 characters |
Naming Rules
Field | Rule |
|---|---|
Directory name (init argument) | Starts with a letter. Letters, numbers, hyphens and underscores only. |
| Library display name | Starts with a letter. Letters, numbers, spaces, hyphens and underscores only. Up to 100 characters. |
Version (--version) | X, X.Y or X.Y.Z, with no leading zeros. Must be unique within the library. |
Runtime Notes
- ToolJet provides React 18 at runtime.
react,react-domandreact/jsx-runtimeare left out of the bundle, which keeps component bundles small. - CSS imported by a component is collected into
dist/index.cssand loaded automatically.