Skip to content
Docs
strackt.io Open app

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:

  • curl -fsSL https://strackt.sh/cli | STRACKT_VERSION=v0.10.0 sh — pin a specific release instead of the latest.
  • curl -fsSL https://strackt.sh/cli | STRACKT_INSTALL_DIR=/usr/local/bin 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.10.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-update to 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.

If you use a coding agent, run strackt skills:install to install the bundled CLI guide. The API requires CLI version 0.10.0 or later; update before using the November 2026 release.

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://app.strackt.io/api-tokens to create a token in your current workspace, then asks you to paste it. Sign in if prompted; if you haven't created a workspace yet, you'll be taken there first. 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 ssh returns a permission error.
  • Manage environment secrets — enable the secrets:read, secrets:reveal, and secrets: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.

Automation and waiting

Use --json -n in scripts. Results go to stdout; human errors, warnings and progress go to stderr. API results preserve data, meta and billing. Errors preserve the API error object, including its code, details and request ID, and add the profile name and API address. Branch on error.code.

Non-interactive production writes that resolve an environment need --production. Irreversible or destructive actions also need --force, independently. Without a required flag the CLI refuses before writing, with action_required and exit 3. Previews with --dry-run need neither flag.

strackt deploy --env=env_0123456789abcdef0123456789abcdef --production --wait --timeout=900 --json -n strackt op:watch op_0123456789abcdef0123456789abcdef --json -n strackt op:output op_0123456789abcdef0123456789abcdef --all --json -n

--wait follows an operation and its chained operations with one timeout across the chain. Its JSON is {data, meta: {wait: {result, operations}}}: data is the final operation and operations lists the followed IDs. Public states are queued, running, succeeded, failed and canceled; the wait result says how the work ended, including when it was skipped or replaced by newer work.

A timeout returns result: timed_out and exits 124. If the last fetch failed, meta.wait also includes optional last_error, containing type (rate_limited, server_error or service_unavailable) and code (the API code, a local code such as connection_failed, or null). A successful last fetch clears it, so a slow but healthy operation has no last_error. You can follow the operation later with strackt op:watch <operation> or read its output with strackt op:output <operation> --all.

Exit code Meaning
0 Success, or already in the desired state (stated in the output)
1 Failed
2 Invalid usage: change the command
3 A person or a flag is needed, including a required CLI update
4 Not authenticated or not allowed
5 Blocked for now: retry later
6 The operation was canceled before it ran
7 The operation was skipped
8 The operation was superseded by newer work
9 The operation was deferred; its work has not run yet
10 The operation's result is unknown (it stopped reporting)
124 --wait timed out

Paged commands use --limit=1..100 and --cursor=<opaque cursor>. Repeat the request with meta.next_cursor while meta.has_more is true. domain:list and requirement:list walk every page and return the whole array. strackt schema --json lists commands, abilities, error types and exit codes. See the November 2026 update for the renamed commands.

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.

Reported tools in Activity

CLI requests can report a known tool such as Claude Code, Cursor or Codex. Activity shows the reported tool beside the person who started the work. Open an operation for the reported tool and CLI version.

These labels are client-reported and can be omitted or forged. They do not verify identity or change the permissions of your token. Unknown tools and requests without a tool label have no tool suffix.

Was this helpful?