Skip to main content

Download and Installation

In this section, you can find how to install the STK CLI.


About STK CLI

STK CLI is StackSpot's command line interface tool. It is the main channel that allows you to create and use StackSpot content, in addition to accessing the Platform's other features.

STK CLI has commands that facilitate access and creation of StackSpot resources without the need for graphical environments and complex interfaces.

Before installing:

Requirements

Check below the requirements to use the STK CLI:

  • To access all features available on StackSpot, you must have an Account and login to use the STK CLI.

Configure your Git user

After installing Git, you must configure your repository account's username and email. In the terminal, execute the following sequence of commands:

Step 1. Set up your username and email

Name:

git config --global user.name "{username}"

Email:

git config --global user.email "{email}"

Step 2. Check the configuration

Execute the commands below:

git config --get user.name

Right away:

git config --get user.email

If your Git repository account username and email are displayed in the terminal, continue with the STK CLI Download and Installation guide below. If you do not receive a response or need to correct any information, repeat Step 1.

Download and Install STK CLI

Use Git Bash to use the commands and thus have a better experience (such as the auto-complete functionality).


To install the latest version of STK CLI:

  • Select your operating system;
  • Download it;
  • And follow the installation steps below.

Download Windows installer


The StackSpot CLI has been approved to work on the following versions of Windows:

  • Windows 11
  • Windows 10

Installer link:


Step 1. Follow the wizard instructions on your machine


Navigate to the folder where you placed the stk.msi file. Double click on the file to begin the installation. Follow the wizard instructions on your machine and complete the installation.


warning

After installation, if you do not have a proxy configured, you must inform STK CLI whether or not you want to configure a proxy. The STK CLI will ask the terminal for the desired proxy configuration. If you already have a proxy configured, the STK CLI will not display this configuration.

Restart terminal after installation


If the terminal is open, close it and open it again after installation, this ensures that the stk command is recognized.

In the terminal, run the command:

stk --version

If everything is configured, the terminal will return the current STK CLI version number.

If the stk command is not yet recognized, follow the instructions below:

MacOS

In the MacOS terminal 'Zshell (zsh)', follow the steps below:

1. Add the lines below at the end of your .zshrc file, respectively execute the commands below:

export PATH=$HOME/.stk/bin:$PATH
test -f ~/.stk/bin/.zshrc && . ~/.stk/bin/.zshrc

2. Restart the terminal;

3. Rerun the command:

stk -v

Linux

In the Linux terminal, follow the steps below:

1. Run the command below in your terminal:

test -f ~/.stk/bin/.bash_profile && . ~/.stk/bin/.bash_profile

2. Restart the terminal;

3. Rerun the command:

stk -v

Authenticate STK CLI


To authenticate the STK CLI, run the command below:

stk login

Enter the email address registered on the StackSpot Portal. In the command, you can also enter the email as a parameter:

stk login email-account@email.com

A screen will open in your default browser for you to enter the username and password associated with the account. After validating the information and confirming your login, return to the STK CLI where your session will begin.

Change STK CLI language

The language displayed in the STK CLI will be the same as that configured in your operating system. The supported languages are Portuguese and English, but if your operating system is in a different language, the default will be English.

  1. To change the language, run the following command:
stk config locale
  1. Select the desired language.

Done!

Example:

Next steps