# Install and sign in

> Install the kuiper CLI on macOS or Linux, sign in from a terminal, a server or CI, and add a passkey to the dashboard.

Web page: https://kuiper.sh/docs/install/

## Install the CLI

The `kuiper` command deploys units, manages variables and reads logs. It runs on macOS and Linux, on x86-64 and arm64. Install it with one command:

```sh
curl -fsSL https://kuiper.sh/install | sh
```

The installer downloads the prebuilt `kuiper` binary for your machine from kuiper.sh, checks it against its published SHA-256, installs it, and points it at Kuiper, so `kuiper login` needs no extra flags. The CLI is only distributed as these prebuilt binaries; its source is not public, so there is no build-from-source option.

Check that it works:

```sh
kuiper --version
kuiper --help
```

Want to read the script before you run it? Download it first.

```sh
curl -fsSL https://kuiper.sh/install -o install.sh
less install.sh
sh install.sh
```

If the installer has no build for your platform, it says so and installs nothing. Everything the CLI does is also in the dashboard.

## Sign in from a terminal

```sh
kuiper login
```

Signing in takes four steps:

1. The CLI opens the dashboard in your browser.
2. A short code, like `WDJB-MJHT`, appears in the browser and in the terminal. Check that the two match.
3. Approve the code in the browser.
4. The CLI receives its own API token and stores it. The token is named after your machine, so you can find it later under **Access**, then **API tokens**.

You never type a password or paste a token. Run `kuiper whoami` to see which organisation and instance the CLI is signed in to.

```sh
kuiper whoami
```

### On a machine without a browser

A server, a container or an SSH session has no browser to open. Add `--no-browser` and the CLI prints a link instead.

```sh
kuiper login --no-browser
```

Open the link on any device where you are signed in to the dashboard, check the code and approve it. Once you approve, the CLI finishes signing in.

### In CI and scripts

Automation should not wait for a person. Give it a token instead. Create one under **Access**, then **API tokens**, or with `kuiper tokens create ci`, then pass it to `login`:

```sh
kuiper login --token kpr_…
```

You can also send the token on standard input, which keeps it out of your shell history and process list:

```sh
printf %s "$KUIPER_TOKEN" | kuiper login
```

Or skip `login` altogether. The CLI reads `KUIPER_TOKEN` and `KUIPER_API_URL` from the environment, and they win over anything stored on disk.

```sh
export KUIPER_API_URL=https://app.kuiper.sh
export KUIPER_TOKEN=kpr_…
kuiper units -p my-agent
```

> **Keep tokens secret**
>
> An API token acts for your whole organisation. Put it in your CI system's secret store and never commit it. If one leaks, revoke it first and replace it after. See [Teams, roles and tokens](https://kuiper.sh/docs/teams/#api-tokens).

### Self-hosted instances

Install from your own control plane and the CLI points at it straight away; `kuiper login` then needs no flags.

```sh
curl -fsSL https://kuiper.example.com/install.sh | sh
```

To switch an existing install to another instance, set its address, or pass it once to `login`:

```sh
kuiper config set api-url https://kuiper.example.com
kuiper login --api-url https://kuiper.example.com
```

### Where the CLI keeps its sign-in

The CLI stores the instance URL, the token and your default project in `~/.config/kuiper/config.json`, or in `$XDG_CONFIG_HOME/kuiper/config.json` if you set that variable. The file is readable only by you. Three environment variables override it:

| Variable | Overrides |
| --- | --- |
| `KUIPER_API_URL` | The instance the CLI talks to. |
| `KUIPER_TOKEN` | The API token. |
| `KUIPER_PROJECT` | The default project, the same as `-p`. |

## Sign in to the dashboard

Open [app.kuiper.sh](https://app.kuiper.sh). The sign-in page offers GitHub and an API token.

![The Kuiper sign-in page with a Continue with GitHub button and an option to use an API token.](https://kuiper.sh/docs/img/signin.webp "The sign-in page.")

- **Continue with GitHub** signs you in with the GitHub account your team invited. Someone who signs in without an invitation gets a personal organisation named after their GitHub login. See [Teams, roles and tokens](https://kuiper.sh/docs/teams.md).
- **Use an API token** takes an organisation token, `kpr_…`. It is kept in your browser and sent only to Kuiper. A token session acts for the whole organisation, so the **Team** page shows no name for you.

### Add a passkey

A passkey lets you sign in with your device instead of going through GitHub every time. It uses Touch ID, Windows Hello, a phone or a security key, whichever your device offers.

1. Sign in with GitHub.
2. Open the **Account** page: choose your initials at the right of the header, then **Account and passkeys**. Its address is `#/account`.
3. Add a passkey and follow your browser's prompt.

Next time, choose **Sign in with a passkey** on the sign-in page. GitHub keeps working as a fallback.

## Next

Your CLI is ready. [Deploy your first agent](https://kuiper.sh/docs/deploying.md), or take the [dashboard tour](https://kuiper.sh/docs/dashboard.md).
