Skip to main content

CLI Reference and Limits

IconPaid feature
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 loginAnywhereAsks for your ToolJet origin URL and personal access token.
tooljet library init <dir>AnywhereRegisters a library in the workspace and creates the project.
tooljet library buildLibrary directoryBuilds to dist/. No sign-in needed and nothing is uploaded.
tooljet library devLibrary directoryWatches src/ and uploads to your dev track on every save.
tooljet library publish -v <version>Library directoryBuilds and publishes a new version.

lib is an alias for library in all four library commands.

Flags​

Flag
Commands
Purpose
--url and --tokendev, publishTarget a workspace directly instead of using the stored login. Use both together.
--debouncedevMilliseconds to wait after a save before rebuilding. Defaults to 300.
--version, -vpublishRequired. The version to publish.
--messagepublishOptional. A message describing the version.
--skip-type-checkpublishPublish even if there are TypeScript errors.

Limits​

Limit
Value
Published bundle10 MB
Dev bundle30 MB
CSS5 MB
Manifest1 MB
Library display name100 characters

Naming Rules​

Field
Rule
Directory name (init argument)Starts with a letter. Letters, numbers, hyphens and underscores only.
Library display nameStarts 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-dom and react/jsx-runtime are left out of the bundle, which keeps component bundles small.
  • CSS imported by a component is collected into dist/index.css and loaded automatically.