vtex
TypeScript icon, indicating that this package has built-in type declarations

4.2.0 • Public • Published

VTEX Toolbelt

Build Status npm version Greenkeeper badge

The CLI that offers all you need to start using the VTEX IO platform efficiently.

Summary

How do we empower you?

VTEX Toolbelt is a command-line program that gives you access to all of the features in the VTEX platform and increases your productivity, allowing you to:

  • Manage your apps quickly: List, install and uninstall available apps in your account;
  • Work safely on your personal environments: List, create and remove workspaces;
  • Easily ship changes to your final user: Promote a workspace to master, making it public in your account URL;
  • See what you are creating in real time: Develop new apps in link mode, using automatic synchronization;
  • Go live from the command line: Publish apps to the VTEX App Store.

Getting started: Installing the VTEX Toolbelt

To use the VTEX Toolbelt, you'll need to install other engines that will also be useful when developing for VTEX.

Node.js to run the tool

  • Install Node.js here: Toolbelt is written in Typescript and designed to run on Node.js. (Node is the runtime that executes the JS and allows our tool to run and work at your computer)
  • Install yarn here: yarn is a way to manage your code, organize content in packages that you can download, share and... install, just like our CLI :)

Now do you have Node.js and Yarn? Let's install the Toolbelt.

Installing the Toolbelt with yarn

yarn powers app development to React, Node and VTEX IO! Install the Toolbelt using yarn and start working with us generating automatically all the files you'll need to create apps in the future. To install it, run:

yarn global add vtex
Alternative installation method using npm You can install using `npm`. But remember, if in the future you want to develop a VTEX IO app, you'll need to install `yarn`

To install with npm, run:

npm install -g vtex

Using the CLI

After installation, run vtex to see our commands and what each one of them does.

Or, check all our commands here
$ vtex
  Welcome to VTEX I/O
  Login with vtex login <account>

  Usage: vtex <command> [options]

  Commands:

    add <app>               Add app(s) to the manifest dependencies
    deprecate [app]         Deprecate app(s)
    init                    Create basic files and folders for your VTEX app
    install [app]           Install an app (defaults to the app in the current directory)
    link                    Start a development session for this app
    setup                   Setup your development environment (configure tsconfig and tslint, run yarn)
    list                    List your installed VTEX apps
    logs                    Show apps production logs
    login                   Log into a VTEX account
    logout                  Logout of the current VTEX account
    promote                 Promote this workspace to master
    publish [path]          Publish the current app or a path containing an app
    switch <account>        Switch to another VTEX account
    test                    Run your VTEX app unit tests
    uninstall [app]         Uninstall an app (defaults to the app in the current directory)
    unlink [app]            Unlink an app on the current directory or a specified one
    update                  Update all installed apps to the latest version
    use <name>              Use a workspace to perform operations
    whoami                  See your credentials current status

    browse [endpoint]       Browse an endpoint of the store under development

    config get <name>                 Gets the current value for the requested configuration
    config set <name> <value>         Sets the current value for the given configuration

    deps list                              List your workspace dependencies
    deps update [app]                      Update all workspace dependencies or a specific app@version
    deps diff [workspace1] [workspace2]    Show dependencies difference between two workspaces

    infra install <name>     Install a service
    infra list [name]        List installed services
    infra update             Update all installed services

    local manifest    Generate manifest from package.json
    local package     Generate package.json from manifest
    local account     Show current account and copy it to clipboard
    local workspace   Show current workspace and copy it to clipboard
    local token       Show user's auth token and copy it to clipboard

    port react       Convert your app from React 0.x to React 2.x

    release [releaseType/Version] [tagName]          Bump app version, commit and push to remote (git only)

    settings <app> [fields]                     Get app settings
    settings set <app> <fields> <value>         Set a value
    settings unset <app> <fields>               Unset a value

    redirects import <csvPath>      Import redirects for the current account and workspace
    redirects export <csvPath>      Export all redirects in the current account and workspace
    redirects delete <csvPath>      Delete redirects in the current account and workspace

    url                               Prints base URL for current account, workspace and account

    workspace                         Alias for vtex workspace info
    workspace create <name>           Create a new workspace with this name
    workspace delete <name>           Delete a single or various workspaces
    workspace info                    Display information about the current workspace
    workspace list                    List workspaces on this account
    workspace promote                 Promote this workspace to master
    workspace reset [name]            Delete and create a workspace
    workspace use <name>              Use a workspace to perform operations

  Options:

    -h, --help  show help information

Second step: log into your VTEX account

Start by using vtex login to receive your credentials and be able to access other features. Simply type this command and follow the instructions.

Having trouble with login? Follow these steps

You can use vtex login to login with your VTEX ID credentials or vtex logout if you're already logged in and want to change credentials.

When logging in, you will be asked for 3 things:

  • The account name of the store you wish to work on, that would be your company's or client's account name;
  • Your VTEX ID email, the one you received access to work with VTEX.
  • Your VTEX ID password, the one you chose when creating your user.

If you wish to work on another account, run vtex switch <account> specifying the account you want to move to.

😉 Note that link and publish implicitly checks if you're logged, and if you're not, it asks your credentials before proceeding.

To develop locally: use vtex link

When you log in to an account, you can create your own workspaces to work on your ideas or see what is in production. To do so:

  1. On an app directory, run vtex link and click on or copy the provided URL into your browser;
  2. Now on, VTEX Toolbelt will monitor your files for change and sync them with what you see automatically.
Know more about local development with Toolbelt

Toolbelt will upload all your app files to the developer environment, print an URL for your use, and watch for any changes you make to the files, which will be automatically synchronized.

Wanna know something cool? You can customize your prompt

You can configure your terminal prompt to display relevant information about your current context, like which account you're logged into and which workspace you are currently using.

Just like knowing which git branch you're currently in, having this info in your prompt will help you avoid mistakes and be faster when using VTEX IO.

How to do so?

bash users

If you are a bash user you can start customizing your command prompt by running the following command:

echo "source $(npm root -g)/vtex/plugins/bash/vtex.bash" >> ~/.bashrc
echo "source $(npm root -g)/vtex/plugins/bash/prompt.bash" >> ~/.bashrc

😉 For fine grained control, use only the first script and add __vtex_ps1 manually to your prompt.

fish users

If you want a pretty, ready-made Git + VTEX prompt you can copy plugins/fish/fish_prompt.fish to the ~/.config/fish/functions folder. To see the changes, simply restart your shell by typing fish.

cp (npm root -g)/vtex/plugins/fish/fish_prompt.fish ~/.config/fish/functions/
fish

💡 If you installed Toolbelt using yarn, you should replace (npm root -g) with (yarn global dir).


Frequently Asked Questions

How do I ignore specific files or directories in my app so that they are not uploaded?

Create a .vtexignore file containing, on each line, paths you wish to ignore. If no .vtexignore is found, your .gitignore file is used instead.

Is there another way to customize the prompt?

You can do so by adding the vtex_get_account and vtex_get_workspace commands to your PS1 environment variable the way it pleases you.


Contributing

Follow the steps on contributing.md.

License

MIT

Tell us what you think about Toolbelt

📡 We are always looking for ways to improve your experience. Please, send us feedback about the VTEX Toolbelt here.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
4.0.1-beta0beta
3.5.1-pre0veras
3.0.0-alpha.30next
4.2.0660latest

Version History

VersionDownloads (Last 7 Days)Published
4.2.0660
4.1.0415
4.0.53
4.0.426
4.0.1-beta0
3.0.0-beta-ci.5230
3.0.0-beta-ci.40
3.0.0-beta-ci.3249
3.0.0-beta-ci.213
3.0.0-beta-ci.00
3.0.0306
3.8.1-beta1
3.8.0-beta.10
2.129.1-beta0
3.8.0-beta0
3.7.3-beta0
2.128.089
2.127.40
2.127.30
3.7.2-beta0
3.7.1-beta0
3.7.0-beta0
2.127.21
3.6.1-beta0
2.127.11
2.127.00
2.126.0160
3.6.0-beta0
2.125.30
3.5.2-beta0
3.5.1-beta0
3.5.1-pre0
3.5.0-beta0
3.4.0-beta0
3.3.6-veras1
3.3.5-veras0
3.3.4-veras0
3.3.4-beta0
2.125.11
3.3.3-beta0
3.3.2-beta0
3.3.1-beta0
2.125.023
2.124.01
3.3.0-beta0
3.2.1-beta0
3.2.0-beta0
2.123.00
2.122.00
2.121.60
2.121.40
3.1.4-beta0
3.1.3-beta0
2.121.30
3.1.2-beta0
3.1.1-beta0
3.1.0-beta0
3.0.0-beta0
2.121.21
2.122.0-beta0
2.121.18
2.121.00
2.121.0-beta.10
2.121.0-beta0
2.120.00
2.119.40
2.119.30
2.119.20
2.119.10
2.118.20
2.118.10
2.118.1-beta0
2.118.00
2.118.0-beta.10
2.110.0-beta.11
2.117.20
2.117.10
2.118.0-beta0
2.117.00
2.116.00
2.115.50
2.115.40
2.115.4-beta0
2.115.30
2.115.3-beta0
2.115.10
2.115.2-beta0
2.115.02
2.114.20
2.114.10
2.114.00
2.114.0-beta0
2.113.00
2.113.0-beta0
2.112.00
2.111.2-beta41
2.112.0-beta.110
2.111.1-beta0
2.112.0-beta0
2.111.03
2.110.2-beta.00
2.110.2-beta0
2.110.10
2.110.1-beta0
2.110.01
2.110.0-beta.00
2.109.07
2.108.1-beta.11
2.108.2-beta0
2.108.1-beta.00
2.108.1-beta0
2.108.10
2.109.0-beta0
2.108.00
2.107.1-beta.20
2.107.1-beta.10
2.107.1-beta.00
2.107.1-beta0
2.108.0-beta.20
2.108.0-beta.10
2.108.0-beta.00
2.108.0-beta0
2.107.00
2.106.5-beta.00
2.106.5-beta0
2.106.30
2.106.3-beta.40
2.106.3-beta.30
2.106.3-beta.20
2.106.3-beta.10
2.106.3-beta.00
2.106.3-beta0
2.106.4-beta0
2.106.20
2.106.00
2.105.1-beta.80
2.105.1-beta.70
2.105.1-beta.60
2.105.1-beta.50
2.105.1-beta.40
2.105.1-beta.30
2.105.1-beta.20
2.105.1-beta.10
2.105.1-beta.00
2.105.1-beta0
2.105.00
2.104.00
2.103.1-beta0
2.103.00
2.103.0-beta.50
2.103.0-beta.40
2.103.0-beta.30
2.103.0-beta.10
2.103.0-beta.00
2.102.2-beta.00
2.103.0-beta0
2.102.2-beta0
2.102.10
2.102.00
2.101.10
2.101.1-beta.10
2.101.1-beta.00
2.101.1-beta0
2.101.00
2.100.10
2.100.00
2.99.4-beta.60
2.99.4-beta.50
2.99.4-beta.40
2.99.4-beta.30
2.99.4-beta.20
2.99.4-beta.10
2.99.4-beta.00
2.99.30
2.99.3-beta.60
2.99.3-beta.50
2.99.3-beta.40
2.99.3-beta.30
2.99.4-beta0
2.99.3-beta0
2.100.0-beta.00
2.99.20
2.99.2-beta0
2.100.0-beta0
2.99.10
2.99.00
2.98.1-beta0
2.98.00
2.98.0-beta.50
2.98.0-beta.40
2.98.0-beta.30
2.98.0-beta.20
2.98.0-beta.10
2.98.0-beta.00
2.98.0-beta0
2.97.1-beta.10
3.0.0-alpha.30
2.97.08
3.0.0-alpha.10
3.0.0-alpha0
2.96.10
2.96.00
2.95.00
2.94.00
2.93.00
2.93.0-beta0
2.92.40
2.92.30
2.92.20
2.92.00
2.92.0-beta0
2.91.10
2.91.00
2.90.00
2.89.00
2.88.20
2.88.10
2.88.00
2.87.41
2.87.30
2.87.3-beta.10
2.87.3-beta.00
2.87.3-beta0
2.87.20
2.87.10
2.87.1-beta.10
2.87.1-beta.00
2.87.1-beta0
2.87.00
2.86.10
2.85.00
2.84.10
2.84.00
2.83.20
2.83.10
2.83.00
2.82.10
2.82.00
2.81.40
2.81.30
2.81.20
2.81.10
2.81.00
2.80.10
2.80.00
2.79.40
2.79.30
2.79.20
2.79.10
2.79.00
2.78.60
2.78.50
2.78.40
2.78.30
2.78.20
2.78.10
2.78.00
2.77.150
2.77.140
2.77.130
2.77.120
2.77.110
2.77.100
2.77.90
2.77.80
2.77.70
2.77.60
2.77.50
2.77.40
2.77.30
2.77.20
2.77.10
2.77.00
2.76.30
2.76.20
2.76.10
2.76.00
2.75.00
2.74.20
2.74.10
2.74.00
2.73.10
2.73.00
2.72.00
2.71.00
2.70.00
2.69.10
2.69.00
2.68.20
2.68.10
2.68.00
2.67.20
2.67.10
2.67.00
2.66.40
2.66.30
2.66.20
2.66.10
2.66.00
2.65.60
2.65.50
2.65.40
2.65.30
2.65.20
2.65.10
2.66.0-beta.10
2.66.0-beta.00
2.65.00
2.64.30
2.64.20
2.64.10
2.64.00
2.63.90
2.63.80
2.63.70
2.63.60
2.63.50
2.63.40
2.63.30
2.63.20
2.63.10
2.63.00
2.62.00
2.60.20
2.61.10
2.60.1-beta.00
2.61.00
2.60.00
2.59.00
2.58.00
2.57.10
2.57.00
2.56.70
2.56.60
2.56.50
2.56.40
2.56.30
2.56.20
2.55.70
2.55.60
2.55.50
2.55.40
2.55.30
2.55.20
2.55.10
2.55.00
2.54.70
2.54.60
2.54.50
2.54.40
2.54.30
2.54.3-beta.20
2.54.3-beta.10
2.54.20
2.54.10
2.54.00
2.53.110
2.53.100
2.53.90
2.53.80
2.53.70
2.53.60
2.53.50
2.53.40
2.53.30
2.53.20
2.53.10
2.53.00
2.52.20
2.52.10
2.52.00
2.51.40
2.51.30
2.51.20
2.51.10
2.51.00
2.49.10
2.49.00
2.48.10
2.48.00
2.47.00
2.46.00
2.45.00
2.44.00
2.43.00
2.42.40
2.42.30
2.42.20
2.42.10
2.42.00
2.41.80
2.41.70
2.41.60
2.41.50
2.41.40
2.41.30
2.41.20
2.41.10
2.41.00
2.40.90
2.40.80
2.40.70
2.40.60
2.40.50
2.40.40
2.40.30
2.40.20
2.40.10
2.40.00
2.39.00
2.38.00
2.37.40
2.37.4-beta.10
2.37.30
2.37.20
2.37.10
2.37.00
2.36.10
2.36.00
2.35.00
2.34.20
2.34.10
2.34.00
2.33.00
2.32.20
2.32.10
2.32.00
2.31.20
2.31.10
2.31.00
2.30.30
2.30.20
2.30.10
2.30.00
2.29.20
2.29.10
2.29.00
2.28.110
2.28.100
2.28.90
2.28.80
2.28.70
2.28.60
2.28.50
2.28.40
2.28.30
2.28.20
2.28.10
2.27.40
2.27.30
2.27.20
2.27.10
2.27.00
2.26.10
2.26.00
2.25.10
2.25.00
2.24.20
2.24.10
2.24.00
2.23.30
2.23.20
2.23.10
2.23.00
2.22.30
2.22.20
2.22.10
2.22.00
2.21.30
2.21.20
2.21.10
2.21.00
2.20.130
2.20.120
2.20.110
2.20.100
2.20.90
2.20.80
2.20.70
2.20.60
2.20.50
2.20.40
2.20.30
2.20.10
2.20.00
2.19.20
2.19.00
2.18.100
2.18.90
2.18.80
2.18.70
2.18.50
2.18.30
2.18.20
2.18.10
2.18.00
2.17.160
2.17.150
2.17.140
2.17.130
2.17.120
2.17.110
2.17.100
2.17.90
2.17.80
2.17.70
2.17.60
2.17.50
2.17.40
2.17.30
2.17.20
2.17.10
2.17.00
2.16.80
2.16.40
2.16.10
2.16.00
2.14.30
2.14.20
2.14.10
2.14.00
2.13.00
2.12.00
2.11.40
2.11.30
2.11.20
2.11.01
2.10.20
2.10.10
2.10.00
2.9.00
2.8.20
2.8.10
2.7.80
2.7.70
2.7.60
2.7.51
2.7.40
2.7.20
2.7.10
2.7.00
2.6.10
2.6.00
2.5.20
2.5.10
2.5.00
2.4.30
2.4.20
2.4.10
2.4.00
2.3.20
2.3.10
2.3.00
2.2.20
2.2.10
2.2.1-beta0
2.2.00
2.1.60
2.1.50
2.1.40
2.1.30
2.1.20
2.1.10
2.1.00
2.0.90
2.0.80
2.0.70
2.0.60
2.0.50
2.0.40
2.0.30
2.0.20
2.0.10
2.0.00
1.12.30
1.12.20
1.12.10
1.12.00
1.11.20
1.11.10
2.0.0-alpha0
1.11.00
1.10.60
1.10.50
1.11.2-beta.10
1.10.40
1.11.2-beta0
1.10.30
1.11.1-beta0
1.10.20
1.11.0-beta0
1.10.10
1.10.00
1.9.00
1.8.140
1.8.130
1.8.120
1.8.110
1.8.11-beta0
1.8.100
1.8.90
1.8.9-beta0
1.8.80
1.8.70
1.8.60
1.8.50
1.8.40
1.8.30
1.8.20
1.8.10
1.8.00
1.7.10
1.7.00
1.6.30
1.6.20
1.6.10
1.6.00
1.5.00
1.4.10
1.4.00
1.3.00
1.2.70
1.2.60
1.2.50
1.2.40
1.2.30
1.2.20
1.2.10
1.2.00
1.1.00
1.0.40
1.0.30
1.0.20
1.0.10
1.0.00
1.0.0-rc.170
1.0.0-rc.160
1.0.0-rc.150
1.0.0-rc.140
1.0.0-rc.120
1.0.0-rc.110
1.0.0-rc.100
1.0.0-rc.90
1.0.0-rc.70
1.0.0-rc.60
1.0.0-rc.50
1.0.0-rc.40
1.0.0-rc.30
1.0.0-rc.20
1.0.0-rc.10
1.0.0-rc.00
1.0.0-rc0
0.20.0-beta.10
0.19.20
0.19.10
0.19.1-beta.10
0.19.1-beta0
0.19.0-beta0
0.18.00
0.17.10
0.17.00
0.16.01
0.16.1-beta0
0.16.0-beta0
0.15.2-beta.51
0.15.2-beta.40
0.15.30
0.15.2-beta.30
0.15.20
0.15.2-beta.20
0.15.2-beta.10
0.15.2-beta.00
0.15.2-beta0
0.15.00
0.14.10
0.14.00
0.13.20
0.13.10
0.13.00
0.12.00
0.11.00
0.10.40
0.10.30
0.10.20
0.10.10
0.10.00
0.9.40
0.9.31
0.9.20
0.9.10
0.9.00
0.8.60
0.8.50
0.8.41
0.8.30
0.8.20
0.8.10
0.8.00
0.7.20
0.7.11
0.7.00
0.6.00
0.5.00
0.4.00
0.3.00
0.2.30
0.2.20
0.2.10
0.2.00
0.1.60
0.1.50
0.1.30
0.1.20
0.1.10
0.1.00

Package Sidebar

Install

npm i vtex

Weekly Downloads

2,460

Version

4.2.0

License

MIT

Unpacked Size

476 kB

Total Files

343

Last publish

Collaborators

  • vtexlab-user
  • lbebber
  • alcar
  • arturpimentel
  • felippenardi
  • alinevillaca
  • caio.oliveira
  • victorges
  • guilhermebruzzi
  • cmdalbem
  • iago
  • ntmedina
  • salesfelipe
  • diegoximenes
  • andreldsa
  • jgfidelis
  • vcalasans
  • thiagomurakami
  • marcoskwkm
  • lurian
  • rogerlucena
  • arthurepc
  • igorframos
  • gustavorosolem
  • analuizamtg
  • rafarubim
  • tergol
  • rafabac
  • bivillar
  • breno
  • guigs
  • daher
  • lucasecdb
  • victorhmp
  • marcosvcp
  • jeymisson
  • natalia_godot
  • tiagonapoli
  • r-araripe
  • augusto.lazaro
  • kaisermann
  • ericreis
  • athoscouto
  • tlgimenes
  • anitavincent
  • brunojdo
  • firstdoit
  • augustob
  • afonsopraca
  • amoreira
  • nandoacoelho
  • kevinchevallier
  • aldreidosantosvtex
  • nikolas-oliveira-cwi
  • rodzac
  • kevinvtex
  • daniyelnnr
  • iago1501
  • carolinerpessoa
  • luiznickel-vtex
  • marcos_vtex
  • jardelymaris
  • denissilvavtex
  • eduardocesb
  • enzomerca
  • vinhags
  • zaedyvtex
  • filafb
  • bastotec
  • arthurtriis1vtex
  • geraldo.fernandes
  • georgebrindeiro
  • filipewl
  • emersonvtex
  • rodrigo.albuquerque
  • viniciuslouzadavtex
  • npedrosovtex
  • myllena.alves
  • mendescamara
  • mauro.takeda
  • lpolon
  • gianvittorio
  • eduardoformiga
  • vcnovaes
  • dpzvtex
  • wender
  • natamelo
  • mayzabel
  • matheusps
  • emersonlaurentino
  • viniagostini
  • lucasaarcoverde
  • lariciamota
  • icazevedo
  • fabits
  • mateuspontes
  • gmantiqueira
  • vitorlgomes
  • rodolfoams
  • policarpo
  • marcelovicentegc
  • maianabt
  • jeffersontuc
  • hiagolcm
  • william.silva
  • juliobguedes
  • lucasvysk.vtex
  • vtex-licenses
  • alexalves2501
  • evertonataide
  • grovina