Skip to main content

Step 1: Install the replicated CLI

In this tutorial, you use the replicated CLI to create and promote releases for a sample application with Replicated. The replicated CLI is the CLI for the Replicated vendor portal. For a tutorial that uses the Replicated vendor portal UI to create and promote releases, see UI Tutorial.

This procedure describes how to create a vendor portal account, install the replicated CLI on your local machine, and set up a REPLICATED_API_TOKEN environment variable for authentication.

To install the replicated CLI:

  1. Do one of the following to create an account in the Replicated vendor portal:

    • Join an existing team: If you have an existing vendor portal team, you can ask your team administrator to send you an invitation to join.
    • Start a trial: Alternatively, go to vendor.replicated.com and click Sign up to create a 21-day trial account for completing this tutorial.
  2. Run the following command to use Homebrew to install the CLI:

    brew install replicatedhq/replicated/cli

    For the latest Linux or macOS versions of the replicated CLI, see the replicatedhq/replicated releases in GitHub.

  3. Verify the installation:

    replicated version

    Example output:

    {
    "version": "0.37.2",
    "git": "8664ac3",
    "buildTime": "2021-08-24T17:05:26Z",
    "go": {
    "version": "go1.14.15",
    "compiler": "gc",
    "os": "darwin",
    "arch": "amd64"
    }
    }

    If you run a replicated CLI command, such as replicated release ls, you see the following error message about a missing API token:

    Error: set up APIs: Please provide your API token
  4. Create an API token for the replicated CLI:

    1. Log in to the vendor portal, and go to the Account settings page.

    2. Under User API Tokens, click New User API Token. For Nickname, provide a name for the token. For Permissions, select Read and Write.

      For more information about User API tokens, see User API Tokens in Generating API Tokens.

    3. Click Create Token.

    4. Copy the string that appears in the dialog.

  5. Export the string that you copied in the previous step to an environment variable named REPLICATED_API_TOKEN:

    export REPLICATED_API_TOKEN=YOUR_TOKEN

    Replace YOUR_TOKEN with the token string that you copied from the vendor portal in the previous step.

  6. Verify the User API token:

    replicated release ls

    You see the following error message:

    Error: App not found:

Next Step

Continue to Step 2: Create an Application to use the replicated CLI to create an application.