# Quick start

> Install the CLI, run the whole backend locally, publish it, and connect an AI client.

[HTML version](https://snoozestack.com/docs/quickstart/) · [Docs index](https://snoozestack.com/llms.txt)

From zero to a running application backend in three commands — and to a hosted one in five. Everything the backend is lives in your project folder, so the loop is: scaffold the files, run them locally, publish the same files.

### 1. Install the CLI

```bash title="terminal"
# version-pinned tarball, served from snoozestack.com (not the npm registry)
npm install -g --ignore-scripts https://snoozestack.com/cli/snoozestack-1.56.0.tgz
```

### 2. Scaffold and run locally

`init` writes a `snoozestack/` folder — `project.toml` (the complete, portable definition of the application), a starter function, and a `schema.mjs`. `dev` runs the whole [runtime](https://snoozestack.com/docs/runtime.md) natively — functions, database, storage, queues, schedules, signals, sites — with no Docker and no account needed yet:

```bash title="terminal"
cd ~/code/my-app
snoozestack init
snoozestack dev
# → dashboard: http://localhost:8787/
```

The one link it prints is the local dashboard — the same console the hosted portal shows, over your local state. Edit a function and the next request runs the new code; edit `project.toml` or `schema.mjs` and it reloads in place. A committed `seed.mjs`, if you add one, gives every fresh checkout working data. Sign-in works locally too, on the same identity plane the hosted project runs, seeded with `user@test.com` / `1234` — see [Authentication](https://snoozestack.com/docs/authentication.md).

### 3. Create the hosted project and publish

When you want it on the internet: sign in, create a project, link the folder to it, and publish. `preview` runs the files in your own temporary copy of the project, at its own URL; `publish` validates them, records them as an immutable [release](https://snoozestack.com/docs/releases.md), and deploys it to production.

```bash title="terminal"
snoozestack user login
snoozestack projects create my-app
snoozestack link --project my-app          # records it in snoozestack/project.toml

snoozestack preview                        # optional: try it first
# preview-@you: ready
#   https://preview-<id>-my-app.snzzz.com
snoozestack publish
# Published "my-app" — release r1 is production.   → https://my-app.snzzz.com
```

### 4. Connect your AI client

Open the project's **Overview** in the console and create an **MCP access token**. The token is shown once, with a setup prompt you can paste into Codex, Claude, or another AI client. For Claude Code, that prompt gives you:

```bash title="terminal"
claude mcp add --transport http snoozestack-my-app \
  https://snoozestack.com/api/mcp/my-app \
  --header "Authorization: Bearer sb_mcp_..."
```

Your assistant can now edit and validate the project files, publish, set secrets, and read signals — the same lifecycle you just ran by hand. These docs come down the same connection, so it follows the platform's patterns instead of guessing at them. [MCP](https://snoozestack.com/docs/mcp.md) has the full tool catalogue and what a token can't reach.

### 5. Talk to it from your app

Paste this into the AI client you connected in step 4. It has the project's management tools and documentation, so it can adapt the integration to the app that's actually in your folder.

```bash title="Prompt for your AI client"
Create a todos web app with authentication.
```
