Install the VSTS CLI

VSTS CLI is a command line interface for Azure DevOps Services and Team Foundation Server (TFS). With the VSTS CLI, you can manage and work with resources including pull requests, work items, builds, and more.

For information about the latest release, see the release notes.

Install on Windows

To install the VSTS CLI on Windows, download and run the installer.

Uninstall on Windows

  1. From system settings, open Apps & features

  2. Find the Microsoft VSTS CLI in the list of installed apps

  3. Tap Uninstall

Install on Linux

VSTS CLI has been verified on the following Linux distributions, but will likely work on other variations as well:

  • Ubuntu 18
  • Ubuntu 17
  • Ubuntu 16
  • Debian 9
  • Debian 8
  • Alpine 3.6

To install:

  1. Ensure prerequisites are installed

    • Python 2 or 3
    • Other packages: libssl-dev, libffi-dev, and python-dev
  2. Download the install script

    curl -L https://aka.ms/install-vsts-cli >cli-install
    
  3. Verify SHA256 hash of the install script before executing it

    • Calculate hash for cli-install. Output SHA256 hash in the below commands should match- (SHA256: 9ade887a96afeb50ee1ed5e8efa24aac679865b5ae393be8445276734ae82885)

      Linux:

      sha256sum cli-install
      

      Mac:

      shasum -a 256 cli-install
      

      If the hash for the downloaded file does not match the provided hash. Please do not proceed with this method. Report the issue.

  4. Make it executable:

    chmod 775 cli-install
    
  5. Execute the install script:

    ./cli-install
    

Note

You will likely need to restart your shell for some changes to take effect. You can start a new shell instance by running exec -l $SHELL.

Uninstall on Linux

You need to manually remove the files the VSTS CLI install script placed on your machine and undo the change to your .bashrc or .bash_profile for VSTS CLI tab completion.

  1. Run vsts logout to remove any VSTS credentials that might be persisted.

  2. Delete the executable link (run which vsts to get the path to this file)

    rm root/bin/vsts
    
  3. Delete installed files

    rm -r <install location>/lib/vsts-cli   
    
  4. Delete the line for tab completion (contains "vsts.completion") from either ~/.bash_profile or ~/.bashrc

Install on macOS

Homebrew is the easiest way to manage your CLI install. It provides convenient ways to install, update, and uninstall. If you don't have homebrew available on your system, install homebrew before continuing.

Install

To install the VSTS CLI, run the following command:

brew update && brew install vsts-cli

Update

To update the VSTS CLI, run the following command:

brew update && brew upgrade vsts-cli

Uninstall

To uninstall the VSTS CLI, run the following command:

brew uninstall vsts-cli

Docker

VSTS CLI is also available as a Docker image. To start a new container:

docker pull microsoft/vsts-cli

docker run -it microsoft/vsts-cli

Update the CLI

Use the same method that you used to install it.

Report issues and feedback

If you have trouble installing, updating, or uninstaling the VSTS CLI, let us know by opening an issue.

Next steps