---
title: "sling: an agent-first CLI for StarSling Runners | StarSling"
description: "sling is the agent-first CLI for StarSling Runners. Diagnose a failed job, rank your slowest workflows, see CI costs, and read only the log lines that matter."
url: https://starsling.dev/cli
canonicalUrl: https://starsling.dev/cli
---

# The agent-first CLI for GitHub Actions

The CLI for StarSling Runners. Diagnose a failed job, rank your slowest workflows, and see what CI costs, without leaving the terminal.

## Install

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

Docs: https://docs.starsling.dev/sling-cli

## What sling CLI does

### Diagnose

- `sling why` - Diagnose why a job failed, with evidence and next steps (https://docs.starsling.dev/sling-cli/commands/analyze#sling-why)
- `sling time` - Decompose CI wall-clock into runner-lifecycle phases (https://docs.starsling.dev/sling-cli/commands/analyze#sling-time)

### Cost and capacity

- `sling top` - Rank the biggest time and cost hotspots, with a trend (https://docs.starsling.dev/sling-cli/commands/analyze#sling-top)
- `sling usage` - Attribute runner minutes and usage cost over a window (https://docs.starsling.dev/sling-cli/commands/analyze#sling-usage)
- `sling bill` - See what you owe so far and the month-end projection (https://docs.starsling.dev/sling-cli/commands/billing#sling-bill)
- `sling bill history` - List prior finalized billed invoices (https://docs.starsling.dev/sling-cli/commands/billing#sling-bill-history)
- `sling labels list` - Compare runner sizes and per-minute cost for runs-on (https://docs.starsling.dev/sling-cli/commands/analyze#sling-labels-list)

### Inspect CI

- `sling runs list` - Find workflow runs by branch, status, conclusion, or trigger (https://docs.starsling.dev/sling-cli/commands/inspect#sling-runs)
- `sling runs show` - See which job in a run failed, or wait for it to finish (https://docs.starsling.dev/sling-cli/commands/inspect#sling-runs)
- `sling jobs list` - List jobs in a run, or across a repo (https://docs.starsling.dev/sling-cli/commands/inspect#sling-jobs)
- `sling jobs show` - See which step in a job failed, and how long each took (https://docs.starsling.dev/sling-cli/commands/inspect#sling-jobs)
- `sling logs` - Read just the log lines you need, not the whole transcript (https://docs.starsling.dev/sling-cli/commands/inspect#sling-logs)
- `sling resolve` - Resolve an id or GitHub Actions URL to its target (https://docs.starsling.dev/sling-cli/commands/inspect#sling-resolve)

### Auth and setup

- `sling login` - Sign in via the GitHub device authorization flow (https://docs.starsling.dev/sling-cli/commands/auth#sling-login)
- `sling logout` - Sign out and clear the stored credential and preferences (https://docs.starsling.dev/sling-cli/commands/auth#sling-logout)
- `sling whoami` - View your identity, organizations and credential (https://docs.starsling.dev/sling-cli/commands/auth#sling-whoami)
- `sling doctor` - Check your environment and know what is broken (https://docs.starsling.dev/sling-cli/commands/auth#sling-doctor)
- `sling org switch` - Set the organization other commands use by default (https://docs.starsling.dev/sling-cli/commands/auth#sling-org-switch)

sling is a client for StarSling's HTTP API: the same runs, jobs, logs, labels, usage and billing endpoints these commands call, generated from the OpenAPI spec. Reach for it when you want the data somewhere the terminal is not, like a dashboard or a bot of your own. https://docs.starsling.dev/api

## Made to sit beside gh

[gh](https://cli.github.com) is GitHub's own command-line tool for working with GitHub from a terminal, and it is already on most machines that touch GitHub Actions. sling is the layer above it: `gh` lists and acts on your workflows, and sling reads them and tells you what happened, what it took and what it cost. sling is the perfect companion to the GitHub CLI, which is why we bring the two together in the `/sling` skill.

**sling** (StarSling's CLI) reads and analyzes:

- Why a job failed, with the evidence behind the call
- Where a run's wall-clock actually went
- Which workflow to fix first, ranked with a trend
- What CI costs, attributed per repo
- Just the log lines that matter

**gh** (GitHub's official CLI) lists and acts:

- Trigger a workflow
- Re-run a job
- Cancel a run
- Enable or disable a workflow
- Download an artifact

## Teach your agent when to use the CLI with /sling

The skill is one document your agent reads once. It carries the routing rule below, the command surface of both CLIs, and the checks that run before the first command.

### Live CI

sling reads your live CI: the runs, jobs, logs and spend in your organization. ci-score, ci-speedup and ci-secure read the workflow files in your checkout.

### Preflight

Before the first command runs, the skill confirms the CLI is installed, that you are signed in, and that the StarSling GitHub App is installed on the organization you are asking about.

### Pinned command surface

The skill ships a capture of sling's real commands, flags and exit codes, taken from the binary, so your agent calls the commands the CLI exposes and branches on the codes it returns.

### You ask your agent about CI

| Question | Answered by | Commands |
|---|---|---|
| Does it change state? Re-run a job, cancel a run, trigger a workflow, turn one on, pull down an artifact. | gh | `gh run rerun`, `gh run cancel`, `gh workflow run`, `gh run download` |
| Is it one run, one job, or the spend? Why it failed, where the wall-clock went, which workflow to fix first, what the month costs. | sling | `sling why`, `sling time`, `sling logs --grep`, `sling top`, `sling usage` |
| Is it the workflow files themselves? Grade the configuration, rank the speed wins, close the attack paths. | the CI skills | `/ci-score`, `/ci-speedup`, `/ci-secure` |

You get one terminal that answers everything, whether you are typing or your agent is.

Install it once and your agent follows this rule for every CI question you ask.

```sh
npx skills add starslingdev/skills --skill sling -y
```

## give this to your agent

One prompt installs the CLI and the /sling skill. Claude Code, Codex, Cursor, OpenCode and more.

```text
Set up the StarSling `sling` CLI and its agent skill on this machine (Apple Silicon macOS or glibc x64 Linux).

1. Install the CLI: run `curl -fsSL https://runners.starsling.dev/cli/install.sh | sh`, then confirm it with `sling --version`.
2. Install the agent skill: run `npx skills add starslingdev/skills --skill sling -y`, then read the installed SKILL.md end to end and follow it for every CI question I ask from now on.
3. Signing in is mine to do: `sling login` prints a short device code I approve in a browser. Print that command for me and wait until I tell you I am signed in.
4. Once I confirm, run `sling doctor` and tell me what it reports about the CLI, the login, and the StarSling GitHub App on my organization.
```

## Get sling running.

The CLI for StarSling Runners. Diagnose a failed job, rank your slowest workflows, and see what CI costs, without leaving the terminal.

Apple Silicon macOS and glibc x64 Linux.
