Skip to contentSkip to navigationSkip to topbar
On this page

Plugins CLI Reference


This page describes the available commands in the Flex Plugins CLI and their associated parameters.

(information)

Info

For general Flex Plugins CLI usage help, you can run twilio flex:plugins --help from your command line. To review the command usage details as well as required and optional flags, run twilio flex:plugins:COMMAND --help.


Archive

archive page anchor
twilio flex:plugins:archive

Archives a plugin, a plugin version, or a configuration.

OptionsDescription
--jsonOutputs the result of the command as a JSON string
--name=plugin_nameThe name of the plugin to archive
--version=version_numberThe version of a plugin to archive
--sid=configuration_sidThe SID of a configuration to archive

twilio flex:plugins:build

Builds Flex plugin and creates a JavaScript and sourcemap bundle. This command needs to be invoked inside a plugin directory.


twilio flex:plugins:create NAME

Creates a new Twilio Flex Plugin project.

ArgumentsDescription
NameThe name of your plugin.
OptionsDescription
-a, --accountSid=accountSidThe Account SID for your Flex Project
--flexui1Creates a plugin compatible with Flex UI 1.0
--flexui2Creates a plugin compatible with Flex UI 2.0
-i, --installAuto-install dependencies
-r, --runtimeUrlThe Runtime URL for your Flex Project
-s, --typescriptCreate a TypeScript project
-t, --template=templateA URL to a template direction
-v, --version=versionStart your plugin at a particular version
-y, --yarnUse yarn as your dependency manager

twilio flex:plugins:create-configuration

Creates a Flex Plugin Configuration. This command is not required to be run in a plugin directory

OptionsDescription
--plugin=pluginRequired. The plugin to install, formatted as pluginName@version. Use additional --plugin to provide other plugins to install
--description=descriptionThe description of this Flex Plugin Configuration
--enable-plugin=plugin_nameThe plugin to enable, formatted as pluginName@version. Use additional --enable-plugin arguments to provide other plugins to install
--disable-plugin=plugin_nameThe plugin to disable, formatted as pluginName. Use additional --disable-plugin arguments to provide other plugins to disable
--jsonOutputs the result of the command as a JSON string
--name=nameThe friendly name of the Flex Plugin Configuration
--newCreates a new Flex Plugin Configuration, otherwise will append to existing active Configuration

twilio flex:plugins:deploy

Deploys a new plugin version. This command needs to be invoked inside a plugin directory.

In version 7.0.0 and later of the Flex Plugins CLI, when you run this command, the Validate command also runs implicitly. For more information about how validation works, see Validating a plugin.

(warning)

Plugin validation during deployment can break automated deployments (Flex Plugins CLI 7.0.0 and later)

If you use automated deployments, such as a CI/CD pipeline, the plugin validation that happens during deployment can disrupt your automations. When the Deploy command runs, if the plugin validation process finds any errors, the deployment process stops to ask for input. To prevent this issue, use the --bypass-validation option on the Deploy command to skip plugin validation for automated deployments.

OptionsDescription
--version=versionThe custom version to publish
--changelog=changelogThe changes (added/removed) made in this plugin version
--description=descriptionThe description of the plugin being deployed
--jsonOutputs the result of the command as a JSON string
--majorPublishes the version as a major version in semantic versioning
--minorPublishes the version as a minor version in semantic versioning
--patchPublishes the version as a patch in semantic versioning
--publicPublishes the Plugin as a public Twilio Asset; the default is private
--bypass-validationIgnores any issues that are found by the validation step and continues to plugin deployment

Tip: Use this option for automated deployments, such as a CI/CD pipeline.

twilio flex:plugins:describe:{release/plugin/configuration}

Can accept Plugin, Plugin-Version, Configuration, or Release as a resource to describe. Provides details like status, description, and associated plugins.

OptionDescription
--activeIndicates that you want to describe the most recent release.
--jsonOutputs the result of the command as a JSON string
--sid=sidThe SID of the resource you want to describe

twilio flex:plugins:diff <ID1> [<ID2>]

Finds the diff between two Flex Plugin Configurations.

ArgumentsDescription
ID1Required. The SID of the Configuration resource to compare to the active Release or to ID2
ID2Optional. The SID of the Configuration resource to compare to ID1
OptionsDescription
--jsonOutputs the result of the command as a JSON string

twilio flex:plugins:list

Can accept Plugin, Plugin-Version, Configuration, or Release as a resource to describe. Lists the resources on the account.

OptionsDescription
--jsonOutputs the result of the command as a JSON string

twilio flex:plugins:release

Creates a Flex Plugin Release. This command is not required to be run in a plugin directory

OptionsDescription
--newCreates a new Flex Plugin Configuration, otherwise will append to existing active Configuration
--enable-plugin=plugin_nameThe plugin to enable, formatted as pluginName@version. Use additional --enable-plugin arguments to provide other plugins to install
--disable-plugin=plugin_nameThe plugin to disable, formatted as pluginName. Use additional --disable-plugin arguments to provide other plugins to disable
--plugin=plugin_nameAlias for --enable-plugin
--configuration-sid=your_configuration_sidThe Flex Plugin Configuration SID to release; other options are not required when using this option
--description=descriptionThe description of this Release
--jsonOutputs the result of the command as a JSON string
--name=nameThe friendly name of the Release

twilio flex:plugins:start

Starts a dev-server to build the Flex plugin locally. This command needs to be invoked inside a plugin directory.

ParameterDescription
--include-remoteIncludes all remote plugins in your build
--jsonOutputs the result of the command as a JSON string
--name=nameThe name of the plugin(s) you would like to run
--portThe port to start the development server

twilio flex:plugins:validate

Available in Flex Plugins CLI 7.0.0 and later.

Shows plugin code recommendations to improve the resilience of your plugins by improving compatibility with future releases of Flex UI.

The recommendations displayed by this command help you follow best practices to keep your plugin code compatible with Flex UI as the platform evolves. However, it cannot guarantee compatibility.

In version 7.0.0 and later, this command also runs implicitly as part of the Deploy command. If you use automated deployments, such as a CI/CD pipeline, the plugin validation that happens during deployment can disrupt your automations. To prevent this issue, use the --bypass-validation option on the Deploy command to skip plugin validation for automated deployments. For details, see Deploy.

For more information about how validation works, see Validating a plugin.

ParameterDescription
--flex-ui-2.0Checks the validity of the plugin with the latest Flex UI 2.x.x version

Need some help?

Terms of service

Copyright © 2024 Twilio Inc.