# Installation (/sling-cli/installation)



## MacOS and Linux

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

The installer detects your platform, downloads the matching build, verifies its SHA-256 digest, and activates it. If `~/.local/bin` is not on your `PATH`, the installer prints the `export` line to add.

It supports Apple Silicon macOS and x64 glibc Linux.

Check the install:

```bash
sling --version
```

To upgrade, rerun the same command.

## Get Started

<Steps>
  <Step>
    ### Authenticate

    ```bash
    sling login
    ```

    This runs the GitHub device-code flow: it opens an approval page, waits for you to confirm the device code, saves the session token to `~/.config/sling/credentials`, and links your default organization.

    The credential is stored **per user, not per shell**, with owner-only permissions. So an AI agent running on the same machine as you inherits it: once you have signed in, the agent can run any `sling` command with no further setup. See [Configuration](https://docs.starsling.dev/sling-cli/configuration#how-agents-authenticate) for how that differs in CI.
  </Step>

  <Step>
    ### Check your identity

    ```bash
    sling whoami
    ```

    Reports your identity, org, plan, token scopes, and token expiry, so you can see exactly what the credential you just saved can reach.
  </Step>

  <Step>
    ### Verify

    ```bash
    sling doctor
    ```

    `doctor` checks your token, the control plane's reachability, clock skew, git remote, patch tooling, version, org resolution, and whether the [sling agent skill](https://github.com/starslingdev/skills/tree/main/skills/sling) is installed for a coding agent on the machine. Exit `0` means healthy; exit `10` means a real check failed. A row marked `!` is an advisory — a newer CLI, or a coding agent without the skill — and still counts as healthy; `○` marks a check that could not run.

    ```console
    $ sling doctor

    ✓ token           valid session (expires 4 Aug 2026, 17:45)
    ✓ control_plane   reachable (https://runners.starsling.dev)
    ✓ clock_skew      0s vs server
    ✓ git_remote      origin → https://github.com/acme/api.git
    ✓ patch_tooling   git found (/usr/bin/git)
    ✓ version         up to date (0.1.8)
    ✓ org             starslingdev (paid)
    ✓ agent_skill     sling skill installed for Claude Code

    Environment healthy!
    ```
  </Step>
</Steps>

## Next steps

<Cards>
  <Card title="Command reference" href="/sling-cli/commands/auth" description="Every command, its flags, and its exit codes." />

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