Vtex Plugin

December 7, 2022 ยท View on GitHub

A simple zsh plugin to help with vtex-cli commands.

I strongly recommend that you use you-should-use with this plugin that will remember all the aliases.

Requirements

You should have vtex-cli to use this plugin, see more here how to install.

Installation

Add one of the following to your .zshrc file depending on your package manager:

oh-my-zsh:

Copy this repository to $ZSH_CUSTOM/custom/plugins, where $ZSH_CUSTOM is the directory with custom plugins of oh-my-zsh read more:

    git clone https://github.com/xdigu/zsh-vtex.git $ZSH_CUSTOM/plugins/vtex

Then add this line to your .zshrc. Make sure it is before the line source $ZSH/oh-my-zsh.sh.

    plugins=(... vtex)

Manual (Git Clone):

Clone this repository somewhere on your machine. This guide will assume ~/.zsh/zsh-vtex.

    git clone https://github.com/xdigu/zsh-vtex.git ~/.zsh/zsh-vtex

Add the following to your .zshrc:

    source ~/.zsh/zsh-vtex/vtex.zsh

And then start a new terminal session.

Aliases

AliasCommandDescription
vbvtex browseOpens the URL relative to your current workspace and account in a new browser window.
vbqrvtex browse --qrSame as browse but create a QR code of the url.
vdvtex deployPublishes an app as a stable version. Only works for apps previously published as a release candidate version.
vilvtex installInstalls an app on the current workspace. If not specified which one, it defaults to the app in the current directory.
vlvtex linkSyncs the app in the current directory with the development workspace in use.
vlcvtex link --cleanSame as link and cleans builder cache.
vlvvtex link --verboseSame as link and show all commands.
vlcv or vlvcvtex link --clean --verboseSame as link , cleans builder cache and show all commands.
vlsvtex listLists the apps installed on the current workspace and account.
vlinvtex loginLogs in to a VTEX account.
vloutvtex logoutLogs out of the current VTEX account.
vpvtex publishPublishes the app in the current directory as a release candidate version.
vsvtex switchSwitches to another VTEX account.
vuvtex unlinkUnlinks an app from the current workspace.
vuavtex unlink --allUnlinks all the apps from the current workspace.
vwd {workspace name}vtex workspace deleteDeletes one or many workspaces from the current account.
vwu {workspace name}vtex workspace useCreates and switches to a new workspace or simply switches to an existing one.

Contributing

Pull requests and Feedback are welcome! ๐ŸŽ‰