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

version

View or change the plugin version in manifest.json

upgrade

Update the CLI to the latest version

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 [--public]

Check, build, and submit the plugin for moderation. Use --public for a new public plugin

list

View the list of your plugins and moderation statuses

info [plugin-id]

View plugin information, moderator comments, and the latest publication request. If no ID is specified, the CLI takes it from the manifest

make-public [plugin-id]

Make the plugin public. For a plugin published in an organization, create a request for Yandex moderation

withdraw [plugin-id] [version]

Withdraw a version submitted for moderation, or use withdraw --publication [plugin-id] to withdraw the active publication request. 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.

    Note

    If the CLI reports that the installed version is no longer supported, update it:

    weavix upgrade
    

    If the command is unavailable, reinstall the latest version: npm i -g @weavix/cli@latest.

    If the plugin hasn't been published yet, you can make it public immediately and submit its version for Yandex moderation:

    weavix submit --public
    

    The CLI registers the plugin, changes its visibility to PUBLIC, and submits the version for moderation. If the plugin is already public, submit new versions with weavix submit without the --public flag. A public plugin can't be made available to your organization only again.

    If the plugin has already been published in your organization's catalog, use a different command:

    weavix make-public
    

    This command creates a publication request for the latest version approved by your organization. The CLI asks you to confirm the irreversible visibility change. Use --yes to skip the prompt; this flag is required when running without a terminal.

    While the request is under moderation, you can't submit new versions. To check the request status and the moderator's comment, run:

    weavix info
    

    Before using either public-publishing command, review the plugin card and secret scan requirements.

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

    weavix list
    

    To view moderator comments for a plugin version and the latest publication request, run:

    weavix info
    

    For a publication request, the command displays its request ID and status, version ID, request and review dates, and the moderator's comment. Moderator comments and publication request data aren't displayed in the output of 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>

To withdraw an active request to publish a plugin in the public catalog, run:

weavix withdraw --publication

The CLI takes the plugin ID from manifest.json. To pass a different plugin ID as an argument, run:

weavix withdraw --publication <plugin-id>

After the request is withdrawn, you can submit versions again.