Basic setup to develop in VTEX IO

Any development in VTEX IO begins with the Toolbelt, our CLI (Command Line Interface) that allows you to login, develop new apps and manage already installed ones.

VTEX IO Toolbelt

To install VTEX IO’s CLI, you need to ensure that Node.js and Yarn are installed on your machine.

Thereafter, type yarn global add vtex in your computer’s terminal.

$ yarn global add vtex
To confirm that the installation occurred as expected, you can execute the `vtex` command. This should display all available commands in a help text.

Login

Once VTEX IO’s CLI is installed, you can login to your VTEX account with the following command. This would in turn open a browser window asking for your credentials.

$ vtex login {account}

Remember:{account} should be replaced with the name of the VTEX account in which you are working

When you are logged in, you can use the vtex whoami command to uncover which account and workspace is being used by the terminal.

toolbelt-whoami

Creating your own workspace

When using VTEX IO, any interaction with an account happens in a workspace. As you log into a store, you are automatically in its master workspace, meaning you are in the version available to the end user. Therefore, always remember to create a development workspace using the vtex use command whenever you want to test a new configuration.

$ vtex use {examplename}

This changes your Toolbelt to a so-called examplename workspace and creates it if it doesn’t already exist.

workspace-examplename EN

vtex use makes all your operations run in the workspace set in the command, which means you can shift your operations to Master simply by executing vtex use master in Toolbelt, for example.

Having created your own development workspace, you can go to your store by accessing:

https://{workspace}--{account}.myvtex.com

Where {workspace} is the workspace that you've just created and {account} is the name of the account in which you are working.

Tip: you can simply run vtex browse in your terminal to automatically open your browser on the https://{workspace}-{account}.myvtex.com URL.

Done! You can begin developing your store in VTEX IO.