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:
- Install Git - from version 2.32..
- Create an account on StackSpot Portal.
- 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.
- Windows
- Linux
- Install on MacOS
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.
Installation on Linux (Recommended)
The StackSpot CLI has been approved to work on the following Linux distributions:
- Ubuntu 20.04
- Ubuntu 18.04
- Red Hat Enterprise Linux (RHEL)
There are no installation requirements for other distributions, but StackSpot CLI compatibility may not be complete.
Install via command line. Run the command below in your terminal to install the Linux version:
curl -fsSL https://stk.stackspot.com/install.sh | bash
Manual Installation
Download via the links below and follow the installation steps below:
Step 1. Navigate to the folder where the installation package is located
Using the terminal, navigate to the folder. For the stk.deb
file, run the command:
sudo dpkg --install stk.deb
For the stk.rpm
file, run the command:
rpm -i stk.rpm
For RHEL
, run the command:
sudo rpm -i
Installation on Mac (Recommended)
The StackSpot CLI has been approved to work on the following versions of MacOS:
- MacOS 13 (Ventura up to the latest release - 13.6.7)
- MacOS 14 (Sonoma up to the latest release - 14.5)
- MacOS 15 (Sequoia)
There are no installation requirements for other versions, but StackSpot CLI compatibility may not be complete.
Install via command line. Run the command below in your terminal to install the MacOS version:
curl -fsSL https://stk.stackspot.com/install.sh | bash
Manual Installation
Before proceeding, do the following steps:
- Z shell (zsh): Run the
chsh -s /bin/zsh
command in the terminal to enable zsh - Keep Xcode Developer Tool updated.
Download using the link below and follow the installation steps below:
Step 1. Do not run the stk.pkg
file through the UI (double-click on the file). Open the terminal and follow the instructions below:
1. Access the directory where the installer was downloaded; 2. Run the command:
Do not run the STK CLI installer (stk.pkg
) by clicking on it.
Run the command below in your terminal to install the STK CLI.
installer -pkg stk.pkg -target CurrentUserHomeDirectory
The value after -target
is CurrentUserHomeDirectory
, no replacement is needed.
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.
- To change the language, run the following command:
stk config locale
- Select the desired language.
Done!
Example: