Any development in VTEX IO begins and ends with the Toolbelt, our CLI (Command Line Interface).
Toolbelt allows you to login to a desired VTEX account, link your local files to the platform, manage an account's workspaces, in addition to performing any action necessary to your development process.
yarn global add vtex in your computer’s terminal.
$ yarn global add vtex
vtexcommand. This should display all available commands in a help text.
After installing and running
vtex in the terminal, an error saying that the command or program wasn't found may show up.
This happens due to an error concerning the Yarn installation. The
yarn global add command does not properly add Yarn binaries to a directory known by your terminal as
By not adding the Yarn binaries to terminal
PATH, Yarn and its programs can't be found, thereby resulting in an error when running Toolbelt.
- In your local directories, find the Profile file. It is usually hidden and is named after the command line's interpreter. For example: If you're using
bash, your Profile file will be named
bashrc. If you use
zsh, it will be
- Once in the Profile file, add the following command:
export PATH="$PATH: yarn global bin";
- Log in and log out of your terminal for the changes to take effect;
set -U fish_user_paths (yarn global bin) $fish_user_paths.
- Runs the
yarn global bincommand in your terminal. It will return the path in which the yarn global binaries were saved;
- Copy it to your clipboard. This path now must be added to the Windows Environment Variable Path;
- Click on the windows button and search for environment. Then, click on
Edit the system environment variables;
- In the
System Propertiesdialog, click on the
User Variables, select
Pathand then click on the
- Click on the
Newbutton to add a new path to the search;
- Paste the yarn global binary path copied in step 2 and click
OKwhen prompted. This will save your changes;
- Log in and log out of your terminal for the changes to take effect.
If the error persists, don't hesitate to send a ticket to our support team.
Every command executed in Toolbelt must begin with
vtex, irrespective of its name, as can be seen in the examples in the command table below.
|Adds an app to the dependencies of the app you are currently working on.|
|Opens an endpoint in a browser window based on the current logged in account, workspace and environment data.|
|Publishes an app as a stable version. It only works in apps already published as a release candidate version.|
|Deprecates an app's version.|
|Lists the apps dependencies of the workspace in which you are working.|
|Updates all app dependencies of the workspace in which you are working or a single app dependency (when specified).|
|Compares app dependencies list of two workspaces and lists the apps that appear in both.|
|Gets the edition of the account you are logged in.|
|Sets an edition for the account you are logged in.|
|Displays a list with boilerplate files or directories for new VTEX apps.|
|Installs an app to the account you are logged into.|
|Locally links the app directory you are working into the development workspace you are working on.|
|Lists all VTEX apps running in the account you are logged into.|
|Displays the account name you are logged into and copies it to the clipboard.|
|Displays the workspace name you are working in and copies it to the clipboard.|
|Displays the user's authentication token current being used and copies it to the clipboard.|
|Promotes the production workspace you are working in to Master.|
|Publishes the app as a release candidate version.|
|Adds a URL redirect into the account and workspace you are logged into.|
|Gets existing redirects from the account and workspace you are logged into.|
|Deletes redirects in the the account and workspace you are logged into.|
|Only for git users. When executed in the app's directory, it releases the app's new version in the |
|Logs you into an account using a support role.|
|Runs the app's unit tests according to the directory you are in (in case the app has any tests already configured for it).|
|Reverts an app's deprecation.|
|Uninstalls an app from the account you are logged into.|
|Unlinks the app directory you are in from the development workspace you are working in.|
|Update all installed apps to the latest version in the account you are logged into (valid only for patches and minors, Majors are not updated when using this command).|
|Displays a complete URL in the terminal, based on the current logged in account, workspace and environment data.|
Updated 7 days ago