---
title: "Install the ktm CLI"
description: >-
  Install the ktm CLI binary on Linux, macOS, or Windows, then authenticate via
  browser login or API key to get started.
sidebarTitle: "Installation"
lastUpdated: "2026-09-23"
---

> **For AI agents:** the complete documentation index is at [llms.txt](/llms.txt). Append `.md` to any page URL for its markdown version.

`ktm` ships as a single self-contained binary for Linux, macOS, and Windows. Once it is on your PATH, you sign in with your browser (or an API key) and you are ready to go.

## Install ktm

Run the one-liner for your platform:

<Tabs>
  <Tab title="macOS / Linux">

```bash
curl -fsSL https://artefacts.kapptivate.com/ktm/install.sh | bash
```

  </Tab>
  <Tab title="Windows">

```powershell
irm https://artefacts.kapptivate.com/ktm/install.ps1 | iex
```

  </Tab>
</Tabs>

The installer fetches the latest stable `ktm`, verifies its checksum, and adds it to your PATH. Set `KAPPTIVATE_VERSION=1.5.0` to pin a specific version.

Prereleases ship on the **beta** channel. Set `KAPPTIVATE_CHANNEL=beta` to install the latest one:

<Tabs>
  <Tab title="macOS / Linux">

```bash
curl -fsSL https://artefacts.kapptivate.com/ktm/install.sh | KAPPTIVATE_CHANNEL=beta bash
```

  </Tab>
  <Tab title="Windows">

```powershell
$env:KAPPTIVATE_CHANNEL = "beta"; irm https://artefacts.kapptivate.com/ktm/install.ps1 | iex
```

  </Tab>
</Tabs>

Confirm the install:

```bash
ktm --version
```

## Authenticate

For interactive use, sign in with your browser (OAuth):

```bash
ktm login
ktm status
```

`ktm login` opens your browser for a secure sign-in and stores the session in your OS keychain. `ktm whoami` shows who is signed in, and `ktm logout` ends the session.

For CI and scripts, use an API key instead. `ktm` reads it from the `KAPPTIVATE_API_KEY` environment variable:

```bash
export KAPPTIVATE_API_KEY="your-key"
ktm status
```

When both are present, the API key takes precedence. `ktm status` checks connectivity, authentication, and the CLI version in one call, and names the credential actually in use. A clean result means you are ready.

<Tip>
  In CI, store the key as a secret and expose it as `KAPPTIVATE_API_KEY`. Never hard-code it in a workflow file.
</Tip>

## What's next?

<Columns cols={2}>
  <Card title="Get started" icon="rocket" href="/cli/getting-started">
    Discover your slugs, list tests, and run them.
  </Card>
  <Card title="Configuration" icon="gear" href="/cli/configuration">
    Environment variables, output formats, and exit codes.
  </Card>
  <Card title="CI/CD" icon="diagram-project" href="/cli/ci-cd">
    Wire ktm into your pipeline.
  </Card>
</Columns>
