---
title: "Quickstart: CLI"
sidebar_label: CLI
description: "Install clika-cli, sign in with an API key, register a device, run and read a benchmark, and deploy, from a terminal."
---

Time to first result: about 10 minutes to a signed-in CLI with a device online, then 15 minutes for the run. [Get started with the CLI](../../cli/get-started.md) explains the install and the login; this page is the short form of the whole loop.

1. **Install.** In the web application, **Settings**, then **Developer access**, prints the install one-liner (its download token lasts 15 minutes). The binary is `clika-cli`, installed to `~/.local/bin` without `sudo`; put that directory on your `PATH`.
2. **Sign in with an API key.** On the same page, **Create key** (the **worker** template is enough), copy it once, then save it to a profile:

```bash
clika-cli --base-url https://<platform> login --api-key
```

   Email and password sign-in is browser-only. The key acts in the project that was open in the browser when you created it.

3. **Register a device.** Mint a token (the body needs a `name`), then run the install script for the device's operating system on the device. `install list --raw` prints the whole script, so on the device itself pipe it to `sh`:

```bash
clika-cli enrollment-tokens create --body '{"name":"my-laptop","max_uses":1}'
```

```bash
clika-cli install list --os linux --token <token> --raw | sh
```

```bash
clika-cli devices list
```

4. **Register a model and run the quick benchmark.** `benchmark_type` is required for an LLM; the speed test is `llm_performance`, and `benchmark-types list` prints the others:

```bash
clika-cli models create --body '{"huggingface_url":"HuggingFaceTB/SmolLM2-135M-Instruct"}'
```

```bash
clika-cli benchmark-groups create --body '{"name":"first-run","model_ids":["<model>"],"device_ids":["<device>"],"benchmark_type":"llm_performance","dataset_mode":"quick"}'
```

```bash
clika-cli benchmarks watch first-run
```

   `watch` prints one line per state change: about five minutes in `pushing_artifacts`, then `running`, then `completed`. `jobs execution-log <job>` shows the device's progress in between.

5. **Read it.**

```bash
clika-cli benchmarks results first-run
```

```bash
clika-cli jobs benchmark-results-summary <job> -o yaml
```

6. **Deploy.** Create (the body needs a `name`), then start; create alone leaves the serving `pending`:

```bash
clika-cli servings create --body '{"name":"first-deployment","model_id":"<model>","device_ids":["<device>"]}'
```

```bash
clika-cli servings start <id>
```

```bash
clika-cli servings key <id>
```

   `running` takes about two to three minutes here, because the benchmark already put the engine on the device; on a device that has never run the engine it takes five to nine minutes. Call the proxy address from `servings get` with `curl` and the key, as in the [web quickstart](web.md); the CLI's proxy command sends no body.

7. **Licenses** are read-only from the CLI (`projects licenses <project>`); issue, rotate and revoke in the web application.
