# Quickstart for Claude Code

Connect Claude Code to Astris, then ask it to deploy your app.

## Create a key

[Sign in to the Console](https://api.astris.run/console/sign-in) and create a key on the API keys page. Astris shows a key only once, so copy it now. See [Keys](/docs/keys).

## Connect the Astris MCP

Run this command. Put your key in place of `PASTE_KEY_HERE`.

```
claude mcp add --transport http astris https://api.astris.run/mcp --header "Authorization: Bearer PASTE_KEY_HERE"
```

Do not commit a file that contains the key.

## Install the Astris Skill

The Skill tells Claude Code how to use the Astris MCP: what to check before a deploy, and in which order to call the tools.

```
claude plugin marketplace add astris-labs/astris-skill
claude plugin install astris@astris
```

In a session, run `/reload-plugins`.

## Deploy your first app

Ask Claude Code to deploy your repository to Astris. With the Skill, it calls `whoami` to read your next step, `preflight` to check the repository, and then `deploy` with a project name, an app name, the Git URL and the branch.

If your account has no plan yet, the API refuses the deploy with [upgrade_required](/docs/errors/upgrade_required). Choose a plan on the Billing page in the Console, then ask again.

## Or deploy with the Astris CLI

The Astris CLI needs Node 22 or later.

```
npm install --global @astris-labs/cli
```

```
astris login
```

`astris login` asks `Paste your Astris API key:` and prints `Logged in.` when the API accepts the key.

```
astris deploy --project <project> --name <app> --git-url <repository> --branch <branch> --wait
```

With `--wait`, the command prints `done`, `error`, `cancelled` or `still running, check status`. Then see [Apps](/docs/apps) and [Domains](/docs/domains).
