← Testkube SkillsCONTENT HISTORY

Update to Testkube Skills

Snapshot Sep 30, 2026 · 23:13 UTC · version 1.0.0

Collection source: not recorded for this historical snapshot.

WHAT CHANGED · RULE-BASED ANALYSIS

First saved snapshot

No earlier snapshot is available to establish a change.

Compare saved observations

Download comparison JSON
Full technical diff · 0 changed fields
Full snapshot data
{
  "description": "Install, upgrade, or verify the Testkube CLI (the `testkube` / `tk` / `kubectl-testkube` command) on Linux, macOS, or Windows. Use when the CLI is missing (`testkube: command not found`), before running any Testkube skill that shells out to `testkube`, or when a specific CLI version is required. Checks for an existing installation first and reuses it when present, and installs only after confirming with the user — never reinstalls a working CLI.",
  "included_files": [
    {
      "relative_path": "agents/openai.yaml",
      "size_in_bytes": 236
    }
  ],
  "name": "installing-testkube-cli",
  "skill_md_contents": "---\nname: installing-testkube-cli\ndescription: \"Install, upgrade, or verify the Testkube CLI (the `testkube` / `tk` / `kubectl-testkube` command) on Linux, macOS, or Windows. Use when the CLI is missing (`testkube: command not found`), before running any Testkube skill that shells out to `testkube`, or when a specific CLI version is required. Checks for an existing installation first and reuses it when present, and installs only after confirming with the user — never reinstalls a working CLI.\"\n---\n\n# installing-testkube-cli\n\nEnsure the Testkube CLI is available before other Testkube skills use it. The CLI ships as a single binary named\n`kubectl-testkube` with two convenience symlinks, `testkube` and `tk` — installing any one gives you all three.\n\n**Always check for an existing installation first and reuse it.** Only install when the CLI is absent, or when a\nspecific version is required and the installed one differs. Reinstalling a working CLI is wasteful and can clobber a\nversion the environment depends on.\n\n## The Core Loop\n\n1. **Check for an existing CLI** — this comes before any install step:\n\n   **Linux/macOS (bash/zsh):**\n   ```bash\n    TK_CMD=\"$(command -v testkube 2>/dev/null || command -v tk 2>/dev/null || command -v kubectl-testkube 2>/dev/null)\"\n    if [ -n \"$TK_CMD\" ]; then echo \"$TK_CMD\"; else echo \"Testkube CLI not found\"; fi\n   ```\n\n   **Windows (PowerShell):**\n   ```powershell\n   $TK_CMD = (Get-Command testkube, tk, kubectl-testkube -ErrorAction SilentlyContinue | Select-Object -First 1).Source\n   $TK_CMD\n   ```\n\n   If any path is printed, the CLI is already installed. Confirm it runs:\n\n   **Linux/macOS (bash/zsh):**\n   ```bash\n   if [ -n \"$TK_CMD\" ]; then \"$TK_CMD\" version; else echo \"Testkube CLI not found\"; fi\n   ```\n\n   **Windows (PowerShell):**\n   ```powershell\n   if ($TK_CMD) { & $TK_CMD version } else { Write-Host \"Testkube CLI not found\" }\n   ```\n   If no specific version was requested, **stop here and reuse the existing binary**. If a specific version was\n   requested, compare the client version from `testkube version` to the target — reuse when they match; install or\n   upgrade only when they differ.\n2. **Only if absent or wrong version, install — after confirming with the user** — first make sure the chosen method's\n   prerequisites are on PATH (see Prerequisites), then describe the exact install command, wait for the user's\n   go-ahead, and run it (see Install). Recommended on Linux/macOS:\n   ```bash\n   curl -sSLf https://get.testkube.io -o /tmp/testkube-install.sh && bash /tmp/testkube-install.sh\n   ```\n   Run it with **`bash`**, not `sh` — the script uses `set -eo pipefail`, which fails under `dash`\n   (the default `/bin/sh` on Debian/Ubuntu) with `Illegal option -o pipefail`.\n3. **Verify** — confirm the client version prints:\n\n   **Linux/macOS (bash/zsh):**\n   ```bash\n   TK_CMD=\"$(command -v testkube || command -v tk || command -v kubectl-testkube)\"\n   if [ -n \"$TK_CMD\" ]; then \"$TK_CMD\" version; else echo \"Testkube CLI not found\"; fi\n   ```\n\n   **Windows (PowerShell):**\n   ```powershell\n   $TK_CMD = (Get-Command testkube, tk, kubectl-testkube -ErrorAction SilentlyContinue | Select-Object -First 1).Source\n   if ($TK_CMD) { & $TK_CMD version } else { Write-Host \"Testkube CLI not found\" }\n   ```\n4. **Report** — state whether an existing CLI was reused or a new one installed, and the resulting version.\n\n## Rules\n\n1. **MUST check for an existing CLI before installing.** Run `command -v testkube` (or `tk` / `kubectl-testkube`)\n   first. If it resolves, reuse it — do not download or reinstall.\n2. **MUST confirm with the user before installing or upgrading.** Describe the exact install command (and version)\n   and wait for the user's go-ahead before running it — never install unprompted.\n3. **MUST NOT reinstall a working CLI.** Install only when the CLI is absent, or when a required version differs from\n   the one reported by `testkube version`.\n4. **MUST verify after installing.** `testkube version` must print a client version before reporting success.\n5. **MUST NOT install the cluster agent here.** This skill installs only the client binary. Deploying the Testkube\n   agent/control plane into a cluster is separate (`testkube init standalone-agent`, Helm). See\n   https://docs.testkube.io/articles/install/overview.\n\n## Prerequisites\n\nThe installed client binary has no runtime dependencies, but each install *method* needs a few tools on PATH. Check\nthem before installing; if any are missing, install them with the OS package manager first (confirm with the user, per\nRule 2).\n\n| Method | Requires on PATH |\n|--------|------------------|\n| Install script (recommended) | `curl` and `jq` — the script exits early if either is missing |\n| Manual download | `curl` or `wget`, plus `tar` |\n| Ubuntu / Debian (APT) | `sudo`, `apt-get`, `gnupg`, `wget` |\n| macOS (Homebrew) | `brew` |\n| Windows (Chocolatey) | `choco` |\n\nQuick check for the recommended script method:\n\n```bash\ncommand -v curl && command -v jq || echo \"install curl and/or jq first (e.g. sudo apt-get install -y curl jq)\"\n```\n\n## Install\n\nOnly reached when step 1 finds no existing CLI, or when a required version differs from the installed one.\n\n| Platform | Command |\n|----------|---------|\n| Linux / macOS (script) | `curl -sSLf https://get.testkube.io -o /tmp/testkube-install.sh && bash /tmp/testkube-install.sh` |\n| macOS (Homebrew) | `brew install testkube` |\n| Ubuntu / Debian (APT) | see [Ubuntu / Debian](#ubuntu--debian-apt) below |\n| Windows (Chocolatey) | `choco install testkube -y` (after adding the source) |\n| Specific version | Use the export flow in [Install script (recommended)](#install-script-recommended): export `TESTKUBE_VERSION=<version>`, then run the installer |\n| Beta channel | `curl -sSLf https://get.testkube.io \\| bash -s -- beta` |\n\n### Install script (recommended)\n\nThe script auto-detects OS (Linux/Darwin) and arch (x86_64/arm64/i386), downloads the matching release tarball\nfrom GitHub, and installs into `/usr/local/bin` (using `sudo` only if that directory isn't writable). For Windows,\nuse the Chocolatey method below or install manually.\n\n ```bash\n curl -sSLf https://get.testkube.io -o /tmp/testkube-install.sh && bash /tmp/testkube-install.sh\n ```\n\nPin a version by exporting `TESTKUBE_VERSION` first (pick a release from\nhttps://github.com/kubeshop/testkube/releases):\n\n ```bash\n export TESTKUBE_VERSION=<version>\n curl -sSLf https://get.testkube.io -o /tmp/testkube-install.sh && bash /tmp/testkube-install.sh\n ```\n\n### No-sudo / non-interactive install\n\nThe script installs into `/usr/local/bin`, which usually needs `sudo`. In a non-interactive session\n(CI, an agent shell, no TTY) `sudo` can't prompt for a password and the script fails with\n`sudo: a terminal is required to read the password`. When you can't use `sudo` interactively, install\nthe binary into a writable directory that's already on PATH (e.g. `~/.local/bin`) — no root needed:\n\n> **Release tags have NO `v` prefix.** The tag and the version in the filename are the bare number,\n> e.g. `2.11.0` — the download path is `releases/download/2.11.0/testkube_2.11.0_...`, NOT\n> `releases/download/v2.11.0/...`. A `v`-prefixed URL 404s. Set `VER` to the bare number (no `v`).\n\n```bash\nVER=\"${TESTKUBE_VERSION:-2.11.0}\"   # bare version, NO 'v' prefix; releases at github.com/kubeshop/testkube/releases\nTARBALL=\"testkube_${VER}_Linux_x86_64.tar.gz\"\ncurl -sSLf \"https://github.com/kubeshop/testkube/releases/download/${VER}/${TARBALL}\" -o \"/tmp/${TARBALL}\"\ntar -xzf \"/tmp/${TARBALL}\" -C /tmp kubectl-testkube\nmkdir -p \"$HOME/.local/bin\"\ninstall -m 0755 /tmp/kubectl-testkube \"$HOME/.local/bin/kubectl-testkube\"\nln -sf \"$HOME/.local/bin/kubectl-testkube\" \"$HOME/.local/bin/testkube\"\nln -sf \"$HOME/.local/bin/kubectl-testkube\" \"$HOME/.local/bin/tk\"\n```\n\nConfirm `~/.local/bin` is on PATH (`echo \"$PATH\" | tr ':' '\\n' | grep -F \"$HOME/.local/bin\"`); if not,\npick another writable PATH dir. Swap `Linux_x86_64` for your OS/arch (`Darwin_arm64`, etc.).\n\n### Homebrew\n\n```bash\nbrew install testkube      # upgrade later with: brew upgrade testkube\n```\n\n### Ubuntu / Debian (APT)\n\n```bash\nsudo apt-get update && sudo apt-get install -y gnupg wget\nsudo install -m 0755 -d /etc/apt/keyrings\nwget -qO- https://repo.testkube.io/key.pub | sudo gpg --dearmor -o /etc/apt/keyrings/testkube.gpg\necho \"deb [signed-by=/etc/apt/keyrings/testkube.gpg] https://repo.testkube.io/linux linux main\" | sudo tee /etc/apt/sources.list.d/testkube.list\nsudo apt-get update\nsudo apt-get install -y testkube\n```\n\n### Windows (Chocolatey)\n\n```powershell\nchoco source add --name=kubeshop_repo --source=https://chocolatey.kubeshop.io/chocolate\nchoco install testkube -y\n```\n\n### Manual\n\nWhen you can't run the script (air-gapped, custom install dir, CI without curl-pipe):\n\n1. Download the tarball for your OS/arch from https://github.com/kubeshop/testkube/releases — file name is\n   `testkube_<version>_<OS>_<arch>.tar.gz` (e.g. `testkube_2.11.0_Linux_x86_64.tar.gz`). The tag and\n   `<version>` are the bare number with **no `v` prefix** (`2.11.0`, not `v2.11.0`) — a `v`-prefixed URL 404s.\n2. Extract `kubectl-testkube` and move it onto PATH:\n\n```bash\ntar -xzf testkube_<version>_<OS>_<arch>.tar.gz kubectl-testkube\nsudo mv kubectl-testkube /usr/local/bin/kubectl-testkube\nsudo ln -sf /usr/local/bin/kubectl-testkube /usr/local/bin/testkube\nsudo ln -sf /usr/local/bin/kubectl-testkube /usr/local/bin/tk\n```\n\n## Upgrade / reinstall\n\nConfirm with the user first (Rule 2) — describe the exact command and target version, then re-run the same install\ncommand. The script and Homebrew both overwrite the existing binary with the chosen release. To downgrade, pin\n`TESTKUBE_VERSION` (script) or use a manual download.\n\n## Common Mistakes\n\n- **Reinstalling when the CLI is already present** — always run the step-1 existence check first and reuse what's there.\n- **`testkube: command not found` after install** — `/usr/local/bin` isn't on PATH, or the shell cached the old lookup.\n  Run `hash -r` (bash/zsh) or open a new shell, then `which testkube`.\n- **Script aborts immediately** — missing `curl` or `jq`. Install them via your package manager first.\n- **`Illegal option -o pipefail`** — you ran the script with `sh`/`dash`. It requires `bash` (`set -eo pipefail`).\n  Re-run with `bash /tmp/testkube-install.sh`.\n- **`sudo: a terminal is required to read the password`** — the script needs `sudo` for `/usr/local/bin` but there's\n  no interactive TTY (CI/agent shell). Use the [No-sudo / non-interactive install](#no-sudo--non-interactive-install)\n  into a writable PATH dir like `~/.local/bin`.\n- **`curl: (22) ... 404` on the release download** — you added a `v` to the version. Testkube release tags have **no\n  `v` prefix**: the URL is `releases/download/2.11.0/testkube_2.11.0_...`, not `.../v2.11.0/...`. Use the bare number.\n- **Chocolatey can't find the package** — add the source first:\n  `choco source add --name=kubeshop_repo --source=https://chocolatey.kubeshop.io/chocolate`.\n- **Confusing CLI with cluster install** — this skill installs only the client binary; the cluster agent is separate.\n"
}

SHA-256 of public snapshot: 135fc7f7964d5ccf8174312ed0f42cd29316056a7ce8f051e6bd7dd70385a47c