# Overview (/sling-cli)



`sling` is the primary interface to the StarSling platform for agents and humans. The questions you ask most often are each a single command: [why](https://docs.starsling.dev/sling-cli/commands/analyze#sling-why) a job failed, where the [time](https://docs.starsling.dev/sling-cli/commands/analyze#sling-time) went, and what sits at the [top](https://docs.starsling.dev/sling-cli/commands/analyze#sling-top) of your spend.

```console copy="sling time"
$ sling time 93165914090
Job Name: Lint, typecheck, test & spell · Wall-Clock: 58s · Queue-Wait: 2s

  PHASES                           TIME %-SHARE  TIMELINE
  provision                        4.0s   7.14%  ██░░░░░░░░░░░░░░░░░░░░░░
  checkout+patch                   2.0s   3.57%  ░░█░░░░░░░░░░░░░░░░░░░░░
  steps                           46.0s  82.14%  ░░░███████████████████░░
    Set up Bun                     1.0s          ░░░█░░░░░░░░░░░░░░░░░░░░
    Set up mise tools              2.0s          ░░░█░░░░░░░░░░░░░░░░░░░░
    Install dependencies           1.0s          ░░░░█░░░░░░░░░░░░░░░░░░░
    Lint (Biome)                   2.0s          ░░░░█░░░░░░░░░░░░░░░░░░░
    Lint shell (shellcheck)       14.0s          ░░░░░██████░░░░░░░░░░░░░
    Lint Dockerfiles (hadolint)    0.0s          ░░░░░░░░░░░█░░░░░░░░░░░░
  ▸ Typecheck                     18.0s          ░░░░░░░░░░░████████░░░░░
    Test                           7.0s          ░░░░░░░░░░░░░░░░░░░███░░
    Catalog drift                  1.0s          ░░░░░░░░░░░░░░░░░░░░░░█░
    Spell (typos)                  0.0s          ░░░░░░░░░░░░░░░░░░░░░░█░
  teardown                         4.0s   7.14%  ░░░░░░░░░░░░░░░░░░░░░░██
```

## Install

On Apple Silicon macOS and x64 glibc Linux:

```bash
curl -fsSL https://runners.starsling.dev/cli/install.sh | sh
```

Then sign in and confirm the install:

```bash
sling login
sling --version
```

`sling login` runs the GitHub device-code flow and saves your session **per user, not per shell** — so an agent running on the same machine inherits it with no further setup.

For `PATH` setup, upgrades, digest verification, and `sling doctor`, see [Installation](https://docs.starsling.dev/sling-cli/installation).

## What you can do with it

* [`sling why`](https://docs.starsling.dev/sling-cli/commands/analyze#sling-why) classifies why a job failed, with evidence and a fix to run.
* [`sling logs`](https://docs.starsling.dev/sling-cli/commands/inspect#sling-logs) filters server-side, returning only the logs that matter.
* [`sling time`](https://docs.starsling.dev/sling-cli/commands/analyze#sling-time) decomposes where the time went, phase by phase.
* [`sling top`](https://docs.starsling.dev/sling-cli/commands/analyze#sling-top) ranks what sits at the top of your spend.
* [`sling usage`](https://docs.starsling.dev/sling-cli/commands/analyze#sling-usage) attributes runner minutes and cost, grouped how you ask.
* [`sling bill`](https://docs.starsling.dev/sling-cli/commands/billing#sling-bill) is a read-only budget check for the open period.

<Cards>
  <Card title="Authentication and setup" href="/sling-cli/commands/auth" description="login, logout, whoami, doctor, and picking a default org." />

  <Card title="Inspecting CI" href="/sling-cli/commands/inspect" description="resolve, runs, jobs, and server-side filtered logs." />

  <Card title="Analyzing CI" href="/sling-cli/commands/analyze" description="usage, top, time, why, and the runner-label catalog." />

  <Card title="Billing" href="/sling-cli/commands/billing" description="Read-only budget snapshots and prior invoices." />
</Cards>

## Why it exists

AI agents working inside CI jobs on StarSling runners, and the humans supervising them, have no first-class way to answer the questions CI work actually consists of: why did this job fail, where does the wall-clock go, what is burning our runner minutes, show me the logs that matter.

Those answers otherwise live behind the GitHub UI (hostile to agents), raw APIs (no diagnosis, no aggregation), and dashboards (exports, not interfaces). Agents end up screen-scraping logs into their context windows, guessing at failure causes, and unable to branch on outcomes without parsing prose. Humans get no leverage from the telemetry StarSling already collects.

## Learn more

<Cards>
  <Card title="Installation" href="/sling-cli/installation" description="Platform support, PATH setup, upgrades, digest verification, and verifying with sling doctor." />

  <Card title="Configuration" href="/sling-cli/configuration" description="Environment variables and the full exit-code table." />
</Cards>
