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 a plugin from a template |
|
|
Update a plugin to the latest template version |
|
|
Build a plugin |
|
|
Build plugin documentation |
|
|
Run local plugin debugging |
|
|
Check the manifest, TypeScript, ESLint, and styles |
|
|
View or change the plugin version in |
|
|
Update the CLI to the latest version |
|
|
Log in to account and save the token |
|
|
Log out of account and delete the saved token |
|
|
Check the local project, authorization, and CLI configuration |
|
|
Check, build, and submit the plugin for moderation. Use |
|
|
View the list of your plugins and moderation statuses |
|
|
View plugin information, moderator comments, and the latest publication request. If no ID is specified, the CLI takes it from the manifest |
|
|
Make the plugin public. For a plugin published in an organization, create a request for Yandex moderation |
|
|
Withdraw a version submitted for moderation, or use |
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
-
First, enable the plugin debugging mode in the Tracker interface.
Settings - Experiments - Plugin debuggingWhen 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. -
Then run the debug mode in the plugin folder:
weavix debug -
Open the integration point used in the plugin in the Tracker interface.
-
Make changes to the plugin interface code — they are applied to the interface immediately.
Publishing a plugin
Publishing is performed in the following order:
-
Get a token for the CLI:
weavix login -
Before publishing, make sure that the project contains the required files for the catalog:
public/logo.svgmarketplace/header-image.jpgmarketplace/index.md
-
Run the full publishing process:
weavix submitThis 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 upgradeIf 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 --publicThe CLI registers the plugin, changes its visibility to
PUBLIC, and submits the version for moderation. If the plugin is already public, submit new versions withweavix submitwithout the--publicflag. 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-publicThis command creates a publication request for the latest version approved by your organization. The CLI asks you to confirm the irreversible visibility change. Use
--yesto 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 infoBefore using either public-publishing command, review the plugin card and secret scan requirements.
-
After submitting for moderation, check the publication status:
weavix listTo view moderator comments for a plugin version and the latest publication request, run:
weavix infoFor 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.