# Koo CLI

The Koo CLI deploys your app from your terminal. Its flagship command, `koo up`, packs your working directory, uploads it, builds it, and rolls it out — streaming progress until your service is live at its URL.

## Install

The CLI is a single self-contained binary for macOS, Linux, and Windows. Install it with your package manager of choice.

```bash
# Homebrew
brew tap koo-io/koo
brew install koo
```

```bash
# npm
npm i -g @koo-io/cli
```

```bash
# Cargo
cargo install koo
```

Run `koo --version` to confirm the install.

## Log in

`koo login` opens your browser to authorize the CLI, then stores the session in your operating system's keyring — nothing is written to disk in plaintext. `koo whoami` prints who you're acting as, and `koo logout` clears the stored session.

```bash
koo login
koo whoami
```

> **Note:**
>
> For CI and other headless environments, skip the browser step: set `KOO_TOKEN` to a `kc_…` [API token](/docs/developers/api-tokens) and every command authenticates with it.

## Deploy with `koo up`

From your app's directory, run `koo up`. It packs the working tree — honoring `.gitignore`, `.kooignore`, and `.dockerignore` — uploads it, builds a container image, and ships it as a new [deployment](/docs/apps/deployments-and-rollback).

```bash
koo up
```

By default `koo up` waits: it streams the build, then follows the rollout until your service is running and reachable at its URL. Pass `--detach` to return as soon as the deploy is queued.

The first time you run it in a directory, `koo up` asks which account, project, and environment to deploy into and records your choice in a `koo.json` file. To set that up ahead of time, run `koo link` yourself.

```bash
koo link
```

This is the same from-source path as [Deploy from Git](/docs/apps/deploy-from-git), driven from your machine instead of a repository. To ship a prebuilt image instead, see [Deploy a container](/docs/apps/deploy-a-container).

## Watch your service

`koo status` shows the current health and live URL of the service in the linked environment. `koo logs` tails its [logs](/docs/observability/logs); add `-f` to follow.

```bash
koo status
koo logs -f
```

## Manage variables

Read and change a service's [environment variables](/docs/configuration/env-and-secrets) without leaving the terminal.

```bash
koo variables list
koo variables set DEBUG=true
koo variables unset DEBUG
```

Run a command locally with the service's variables injected — handy for a one-off task like a database migration:

```bash
koo run -- npm run migrate
```

## Command reference

## Related

- 
-
