Any development in the VTEX IO platform begins and ends with the VTEX IO CLI.
It's the communication gateway between your VTEX store and the VTEX IO development platform, allowing you to login, install new apps on the account and manage those already installed, for example.
Follow the instructions to install VTEX IO CLI in your machine and get familiar with it accessing the VTEX IO CLI installation and command reference documentation.
Once VTEX IO’s CLI is installed, you can log in to your VTEX account by running in your terminal the following command:
$ vtex login accountName
️ Remember to replace
accountNamewith the name of the VTEX account in which you are working.
By running the command, a browser window will open and ask for your credentials.
When using VTEX IO, any interaction with an account happens in a workspace.
It works as a version of the account in which you are logged in, in a way that any development operation done using such a workspace will be isolated, separate from other workspaces and the public version of the account itself (called Master).
️ If you're used to working with Git, think of workspaces as branches.
As you log in to a VTEX store using VTEX IO, you are automatically in its master workspace, meaning you are in the version available to the end user.
️ To confirm this, you can run the
vtex whoamicommand in your terminal to find out which account and workspace is being used by the VTEX IO CLI for your login.
To start performing the desired changes in your storefront, you will need to create a Development workspace.
vtex use command in order to start developing in the VTEX IO platform. For example:
$ vtex use exampleworkspace
️ Remember to replace
exampleworkspacewith a name of your choosing that will be given to the workspace in which you will develop.
Following our example above, the command will change your login to the
exampleworkspace workspace if it exists. If it does not, VTEX IO CLI will create it:
vtex usecommand makes all your operations run in the workspace specified in the command, which means you can shift your operations to Master simply by running
vtex use masterin VTEX IO CLI, for example.
Having created your own development workspace in VTEX IO, you can now go to your store by accessing
exampleworkspaceshould be replaced with the name of the workspace that you've just created.
accountNameshould be replaced with the name of the VTEX account in which you are working.
️ You can run
vtex browsein your terminal to automatically open your browser using the workspace and account in which you are working.
Done! Your VTEX account is now connected to the VTEX IO platform and you are technically ready to start developing your Pixel app!
Updated about 14 hours ago