Skip to main content
Version: v4.5.0

Installation in Pipelines

To install and authenticate the STK CLI in a pipeline, you must first have a StackSpot Enterprise account.


Below are the requirements for using the STK CLI in a CI/CD pipeline:


Installation is still possible without an Enterprise account, but you will not have access to features exclusive to Enterprise accounts.

Installation via curl in the pipeline

To use StackSpot in a pipeline, it is necessary to use the installation via curl. To do this, you must have a StackSpot account. Then follow the steps below:

1. Login to StackSpot Website;
2. Access the Download page to access the curl command:

curl -fsSL | bash && exec $SHELL

Installing via curl also works for local use but only on Unix systems such as Linux and MacOS.

Use a Docker image with the STK CLI installed

You can use a Docker image with the STK CLI installed. StackSpot offers two versions of Linux, on the following distributions:

To use the image, pull the image with the command found in the Docker Pull Command field in the repository of each image.

After using the Docker image, run the command below to authenticate STK CLI:


Run the command below without the < > braces. For the values of client-id, client-key and realm, see the step for get keys and authenticate via terminal.

stk login --client-id <ID> --client-key <KEY> --realm <REALM>

Authenticate via CI/CD for Enterprise account

The Enterprise accounts support STK CLI authentication via the command line, using a client id and a client key.

This type of authentication makes it possible to keep a session active with a configurable expiration time, to use the STK CLI via the command line, for example in CI/CD pipelines.


The session expiration time is currently 20 minutes. This value will soon be configurable through the StackSpot Website.

Get the keys and authenticate via terminal

To authenticate through the terminal, it is necessary to obtain the keys from the StackSpot Website to be informed in the terminal with the command stk login. To do this, follow the steps below:

Step 1. Log in to StackSpot's website;

Step 2. On the top menu, access the Configure option and then click on Access Tokens:


Access Tokens

Step 3. On the Client Secret screen, click on the Generate client key button to view all necessary keys:

Client Secret

Exposed keys


The keys are generated per user of the organization. If a user generates a new key, the previous one will automatically become invalid. Generating a new key does not invalidate other users' keys in this organization.

Step 4. In the terminal, execute the command below replacing the values ​​between braces with the values ​​from the previous steps:


Run the command below without the braces < >

stk login --client-id <ID> --client-key <KEY> --realm <REALM>

Was this page helpful?