Download and Installation
In this section, you will find detailed instructions to install the STK CLI.
About STK CLI
STK CLI is StackSpot's command line interface tool. It is the main way for you to create and use StackSpot content, as well as access other Platform features.
STK CLI provides commands that make it easier to access and create StackSpot resources, without needing graphical environments or complex interfaces.
Before Installing
Prerequisites
Check the prerequisites to use STK CLI:
- Install Git version 2.32 or higher;
- Create an account on the StackSpot Portal.
To access all available features on StackSpot, you must have an Account and log in to use STK CLI.
Configure your Git User
After installing Git, configure your repository account username and email. In the terminal, run the following 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. Verify the configuration
Run the following commands to check your settings:
git config --get user.name
git config --get user.email
If your username and email are displayed correctly in the terminal, proceed with the STK CLI Download and Installation guide. If the information is missing or needs correction, repeat Step 1.
Download STK CLI
Use Git Bash to run commands and improve your experience, such as enabling auto-complete.
To install the latest version of STK CLI:
- Select your operating system;
- Download the installer;
- Follow the installation steps below.
- Windows
- Linux
- Install on MacOS
Download the Windows Installer
StackSpot CLI is supported on the following Windows versions:
- Windows 11
- Windows 10
Installer link:
Step 1. Install STK CLI using the setup wizard
Go to the folder where you saved the stk.msi file. Double-click the file to start the installation. Follow the wizard instructions to complete the installation.
Installation on Linux (Recommended)
StackSpot CLI is supported on the following Linux distributions:
- Ubuntu 20.04
- Ubuntu 18.04
- Red Hat Enterprise Linux (RHEL)
For other distributions, there are no specific requirements, but StackSpot CLI compatibility may not be complete.
To install via command line, run:
curl -fsSL https://stk.stackspot.com/install.sh?utm_source=stackspot | bash
Manual Installation
Download the files below and follow the instructions to install:
Step 1. Install the downloaded package
Use the terminal to navigate to the folder where you saved the package.
For the stk.deb file, run:
sudo dpkg --install stk.deb
For the stk.rpm file, run:
rpm -i stk.rpm
For RHEL, run:
sudo rpm -i stk.rpm
Installation on MacOS (Recommended)
StackSpot CLI is supported on the following MacOS versions:
- MacOS 13 (Ventura, up to the latest release - 13.6.7)
- MacOS 14 (Sonoma, up to the latest release - 14.5)
- MacOS 15 (Sequoia)
For other versions, there are no specific requirements, but StackSpot CLI compatibility may not be complete.
To install via command line, run:
curl -fsSL https://stk.stackspot.com/install.sh?utm_source=stackspot | bash
Manual Installation
Before continuing, follow these steps:
- Enable Z shell (zsh): Run
chsh -s /bin/zshin the terminal; - Keep Xcode Developer Tools updated.
Download the installer from the link below:
Step 1. Install STK CLI from the terminal
- Go to the directory where you downloaded the installer;
- Run the following command:
Do not install the STK CLI (stk.pkg) by double-clicking the file.
Use the terminal to install the STK CLI.
installer -pkg stk.pkg -target CurrentUserHomeDirectory
Use CurrentUserHomeDirectory exactly after the -target parameter. No replacement is needed.
After the installation, if you do not have a proxy configured, STK CLI will prompt you in the terminal to set up a proxy.
If you already have a proxy configured, this step will be skipped.
Restart the Terminal After Installation
If your terminal is open, close and reopen it after installation. This ensures the stk command is recognized.
In the terminal, run:
stk --version
If everything is set up correctly, the terminal will display the current STK CLI version.
If the stk command is not recognized, follow the steps below:
MacOS
In the MacOS terminal (Z shell - zsh), follow these steps:
- Add the lines below at the end of your
.zshrcfile by running:
export PATH=$HOME/.stk/bin:$PATH
test -f ~/.stk/bin/.zshrc && . ~/.stk/bin/.zshrc
- Restart the terminal;
- Run:
stk -v
Linux
In the Linux terminal, follow these steps:
- Run:
test -f ~/.stk/bin/.bash_profile && . ~/.stk/bin/.bash_profile
- Restart the terminal;
- Run:
stk -v
Authenticate STK CLI
To authenticate STK CLI, run:
stk login
Enter the email registered with the StackSpot Portal. You can also provide the email as a parameter:
stk login email-account@email.com
A screen will open in your default browser where you can enter your username and password. After confirming your login, return to the STK CLI to start your session.
Change STK CLI Language
The STK CLI language will match your operating system. Supported languages are Portuguese and English. If your system uses another language, the default will be English.
- To change the language, run:
stk config locale
- Select your preferred language.