CLI

CLI is a console utility packaged as an NPM package that supports the entire plugin lifecycle: creating, debugging, testing, and publishing.

Available commands

Command

Description

create

Create a plugin from a template

up

Update a plugin to the latest template version

build

Build a plugin

build-docs

Build plugin documentation

debug

Run local plugin debugging

lint

Check the manifest, TypeScript, ESLint, and styles

login

Log in to account and save the token

logout

Log out of account and delete the saved token

doctor

Check the local project, authorization, and CLI configuration

submit

Check, build, and submit the plugin for moderation

list

View the list of your plugins and moderation statuses

info [plugin-id]

View plugin information. If no ID is specified, the CLI takes it from the manifest

withdraw [plugin-id] [version]

Withdraw a version that was submitted for moderation. If no arguments are specified, the CLI takes them from the manifest

To view the built-in help, run weavix --help. For help on a specific command, add the --help flag after it, for example weavix submit --help.

Installation

npm install -g @weavix/cli 

Local development

  1. First, enable the plugin debugging mode in the Tracker interface.

    Settings - Experiments - Plugin debugging
    

    When you enable debugging, the browser may request permission for the site to access the local network. Grant access: without it, debugging will not work, because the config and plugins are loaded from localhost.

  2. Then run the debug mode in the plugin folder:

    weavix debug
    
  3. Open the integration point used in the plugin in the Tracker interface.

  4. Make changes to the plugin interface code — they are applied to the interface immediately.

Publishing a plugin

Publishing is performed in the following order:

  1. Get a token for the CLI:

    weavix login
    
  2. Before publishing, make sure that the project contains the required files for the catalog:

    • public/logo.svg
    • marketplace/header-image.jpg
    • marketplace/index.md
  3. Run the full publishing process:

    weavix submit
    

    This command will register the plugin if necessary, upload the distribution, and submit the version for moderation.

  4. After submitting for moderation, check the publication status:

    weavix list
    

Withdrawing a version from moderation

You can only withdraw a version with the IN_REVIEW status. Run the command:

weavix withdraw

The CLI will take the id and version values from the manifest.json file of the current project. To withdraw a different version, specify the plugin ID and version number:

weavix withdraw <plugin-id> <version>