Skip to content

Backgrounds

How-to Guides

Technical References

VIP-CLI /

Install VIP-CLI locally

VIP-CLI is a Node.js package that can be installed through a package manager like npm.

Prerequisites

Installation of VIP-CLI requires access to the VIP Dashboard

Caution

Do not install VIP-CLI or Node.js using the sudo command.

If sudo is used to install a package, that package must be uninstalled.
Permission errors will need to be fixed. Do not use sudo to fix access permissions.

After the packages are uninstalled and permission repairs are complete, begin the installation process again without the use of sudo.

Install Node.js and npm

Follow the Node.js instructions for Installing Node.js via package manager. Installing Node.js will also install npm.

VIP recommends installing Node.js with a package manager like Homebrew or a Node.js version manager like nvm.

Fixing Node.js and npm permissions

It is possible to experience permission issues when installing Node.js packages globally.

This error indicates the need to fix permissions:

WARN install EACCES: permission denied

Follow this guide to resolve the error by either reinstalling npm with a node version manager (recommended), or manually change npm’s default directory.

Update Node.js and npm

VIP-CLI requires a minimum installed version of Node.js v10 and npm v6. It is recommended to use the latest active long-term support release of Node.js, which is currently Node.js v14.

Retrieve the versions of Node.js and npm currently installed on the local machine by running this command in the terminal:

node -v && npm -v

The package manager used to install Node.js and npm should also be used to manage updates. Refer to the package manager’s documentation for instructions on updating Node.js and npm.

Install VIP-CLI

After Node.js and npm are successfully installed on the local machine, the installation process for the VIP-CLI package can begin.

  1. Install the VIP-CLI package by running this command in the terminal:
npm install -g @automattic/vip
  1. After the package installation has completed, run the vip command in the terminal:
vip
  1. A prompt for Ready? will appear in the terminal.
  2. Select the “Continue” button.
  3. Select the “Generate Token” button.
  4. Select the “Copy” button displayed to the right of the generated Personal Access Token.
    Caution: A Personal Access Token is unique to each user and should be kept safe like a password.
  5. Return to the terminal window and paste the Personal Access Token at the prompt for Access Token:.

A successful installation will automatically return output from the vip --help command in the terminal.

Update VIP-CLI

Updates to the VIP-CLI package are released regularly by VIP. Available updates can be installed by running the following command in the terminal of the local machine:

npm install -g @automattic/vip

Retrieve the currently installed version of VIP-CLI on a local machine with this command:

vip -v

Uninstall VIP-CLI

To uninstall VIP-CLI from a local machine, run this command in the terminal:

npm uninstall -g @automattic/vip

This command will only uninstall the VIP-CLI package; it will not uninstall Node.js or npm.

Last updated: January 06, 2022