Getting Started with the Skytap Command Line Interface

The Skytap command-line interface, or CLI, lets you perform actions on Skytap resources from a command shell without having to write code to call the Skytap API. The Skytap CLI can also be used to quickly integrate Skytap into existing build, deploy, and test scripts supporting continuous integration with on-demand infrastructure. Most actions available from the Skytap web interface are available from the CLI.


Installing the Skytap CLI

The Skytap CLI is distributed and installed as a Ruby gem. You can either:

Installing the Skytap CLI Ruby gem on your local machine

Before you begin
  • Make sure you have Ruby (version 1.9 or greater) and RubyGems installed on your local machine The computer that you are using to access Skytap Cloud. .

    For instructions about installing Ruby for your specific operating system, see the Ruby downloads page. In most cases, RubyGems is installed as part of Ruby. If you need to install RubyGems separately, see the RubyGems download page.

  • After Ruby is installed, install the Skytap Ruby gem with the following command:

      gem install skytap --no-rdoc --no-ri

    Test your installation by typing the following:

      skytap --version

Using the Skytap CLI for the first time

To get started with the Skytap CLI
  1. Type the following command:

  2. Answer the configuration file setup prompts:

    • Choose whether to store your user name and API token in a configuration file. If you do not store your credentials in the configuration file, you must supply your user name and API token with each command.

      See Finding your user name and API security token.

    • Choose whether you want to be interactively prompted for parameters. If you do not want interactive prompts, you must include the required parameters with each request.

  3. Try a command. For example, to list the available templates in your account, type:

     skytap template index

    To include your user name and API token with the command, type:

     skytap template index --username=USERNAME --api-token=API-TOKEN

Supported commands, parameters, and global options

For a list of supported commands, parameters, and global options, see the Skytap Command Line Interface Reference.

Alternately, to see all the available commands and global options from the command line, type:


To see the help text for the a specific command, add --help. For example, to see documentation for skytap configuration index, enter:

skytap configuration index --help

Best practices for automated scripts

If you are using the CLI from automated scripts, the following global options are recommended:

--no-ask --log-level=quiet
  • --no-ask disables interactive prompts.
  • --log-level=quiet returns only JSON output with additional messages.

Editing the Skytap CLI configuration file

You can edit the Skytap CLI Ruby gem configuration file .skytaprc at any time. The file is usually located in your home directory (for example, /Users/Docs/.skytaprc).