# Quickstart

> Sign in from the command line, create an org, and connect GitHub and your compute.

> **Before you start** You need a GitHub account that can install apps on your organization, and an account with a compute provider.

## 1. Install the CLI

On macOS, with Homebrew:

```sh
brew install stagdhq/tap/stagd
```

On macOS without Homebrew, or on Linux (amd64 or arm64):

```sh
curl -fsSL https://stagd.dev/install.sh | bash
```

It checks the download against the release's checksums and puts `stagd` in `~/.local/bin`.

On Windows, in PowerShell:

```powershell
irm https://stagd.dev/install.ps1 | iex
```

Or with Go, anywhere: `go install github.com/stagdhq/stagd/cmd/stagd@latest`.

Or download it yourself: **[stagd on GitHub Releases ↗](https://github.com/stagdhq/stagd/releases/latest)** has an archive for macOS, Linux and Windows (amd64 and arm64) with its checksums. Unpack it and put `stagd` on your `PATH`.

Check it's there with `stagd version`; `stagd update` updates it later. The CLI is open source, in [stagdhq/stagd](https://github.com/stagdhq/stagd).

## 2. Sign in

```sh
stagd login
```

The CLI shows a code and opens your browser. Sign in, check the code matches, and approve. The CLI keeps its session token in your system's keychain.

## 3. Create an org

An org is your team's account in Stagd. It's separate from your GitHub organization, and one Stagd org can connect several GitHub accounts.

```sh
stagd orgs create acme --name "Acme Inc"
```

## 4. Connect GitHub

```sh
stagd github connect
```

Install the Stagd GitHub App on your GitHub organization, pick the repositories Stagd may see, and authorize. See [Connect GitHub](https://stagd.dev/docs/guides/connect-github.md) for what the app asks for and why.

Then turn previews on for the repositories you want them for. Stagd ignores every other repository and never reads its code:

```sh
stagd repos enable acme-inc/web
```

## 5. Connect compute

```sh
stagd compute providers
stagd compute connect namespace
```

The CLI asks for what the provider needs and Stagd checks it before saving anything. See [Connect compute](https://stagd.dev/docs/guides/connect-compute.md).

## 6. Check where you are

```sh
stagd setup
```

It lists the steps to your first preview, the same as Home in the dashboard: what's done, the next step with its link, and who the admins are for the steps only they can do.

With a coding agent, `stagd mcp install` adds Stagd's tools to Claude Code and Cursor, and its setup prompt takes it from there: see [Coding agents](https://stagd.dev/docs/guides/coding-agents.md#set-up-a-repository).
