Install the strackt CLI
Install the strackt command-line tool and connect it to your account, so you can open shells, database tunnels, and manage environments from your terminal.
Install the strackt CLI
The strackt CLI is how you reach your servers and environments from the terminal — opening a shell, forwarding a database port, managing secrets, and deploying. It runs on macOS and Linux, and needs PHP 8.4 or newer. Pick whichever install method fits how you work.
Install with one command
The quickest way in. This downloads the latest CLI, checks it against its published checksum, and drops it on your PATH:
curl -fsSL https://strackt.sh/cli | sh
It installs to ~/.local/bin/strackt by default — make sure that's on your PATH, then confirm:
strackt --version
The installer needs PHP 8.4+ already on your machine; it won't install PHP for you. If it's missing, install it first (on macOS, brew install php), then run the line again.
Two optional settings:
STRACKT_VERSION=v0.1.0 curl -fsSL https://strackt.sh/cli | sh— pin a specific release instead of the latest.STRACKT_INSTALL_DIR=/usr/local/bin curl -fsSL https://strackt.sh/cli | sh— install somewhere other than~/.local/bin.
Install with Homebrew
On macOS, Homebrew manages PHP and the CLI together and keeps both current:
brew install stracktio/tap/strackt
strackt --version
Upgrade later with brew upgrade stracktio/tap/strackt.
Install with Composer
If you already use PHP and Composer, this is a natural fit:
composer global require stracktio/cli
Make sure Composer's global bin directory is on your PATH (usually ~/.composer/vendor/bin or ~/.config/composer/vendor/bin), then confirm it works:
strackt --version
Download the binary manually
For a pinned or air-gapped install, grab the self-contained binary from the latest release and verify its checksum — replace the version with the most recent tag:
TAG=v0.1.0
curl -fsSL -o strackt \
"https://github.com/stracktio/homebrew-tap/releases/download/${TAG}/strackt-${TAG}.phar"
curl -fsSL -o strackt.sha256 \
"https://github.com/stracktio/homebrew-tap/releases/download/${TAG}/strackt-${TAG}.phar.sha256"
test "$(awk '{print $1}' strackt.sha256)" = "$(shasum -a 256 strackt | awk '{print $1}')"
chmod +x strackt
mv strackt /usr/local/bin/strackt
strackt --version
Staying up to date
The CLI keeps an eye out for you. When a newer version is available, it prints a single line to point you at the update — at most once a day, and never on automated or piped runs. It never updates itself in the background.
How you update depends on how you installed:
- One-command install — run
strackt self-updateto pull the latest binary in place. - Homebrew —
brew upgrade stracktio/tap/strackt. - Composer —
composer global update stracktio/cli.
strackt self-update only manages the standalone binary. On a Homebrew or Composer install it stops and tells you the right command to use instead, so it never fights your package manager.
Connect it to your account
The CLI talks to strackt with an API token scoped to one workspace. Create the token, then hand it to the CLI:
strackt auth:token
It points you to https://strackt.io/api-tokens to create a token, then asks you to paste it. The token is saved to your user config and reused on every command afterwards.
When you create the token, turn on the permissions for what you plan to do:
- Open shells and database tunnels — enable SSH signing. Without it,
strackt sshreturns a permission error. - Manage environment secrets — enable the environment-variable read, reveal, and write permissions.
A token created before a feature existed won't carry that feature's permission. If you hit a permission error, run strackt auth:token again with a fresh token.
You're set
Confirm everything's wired up by opening a shell on one of your servers:
strackt ssh stk-abc12345
From here, see SSH into a server from the CLI and Manage secrets from the CLI.
Was this helpful?