# Quickstart

> Start from your agent with one prompt, or open an account, log in the CLI, create a project and deploy it yourself.

## Start from your agent

Open Claude Code, Codex or Cursor and paste this one line (the **Paste to your agent** button at [app.vibiz.app/get-started](https://app.vibiz.app/get-started) copies it):

```text
Set up Vibiz for me: follow https://app.vibiz.app/get-started.md
```

The agent follows the [setup playbook](https://app.vibiz.app/get-started.md): it installs the CLI (`npm install --global @vibiz/cli`), runs `vibiz login` and shows you a link, adds the [agent skills](https://app.vibiz.app/skills) (`vibiz skills add --global`) and connects the MCP server (`vibiz mcp add --clients "<your agent>"`). You open the link, sign in with your Vibiz account and click **Authorize** (a Vibiz Stack account is opened for you if you don't have one). That's your only step. It ends with a short report of what is set up.

Then, in an empty folder, ask for what you want:

```text
Use Vibiz to build and deploy a website for my bakery, Acme Bakery, with sign-in and a $15/month plan.
```

The agent creates the project, builds the app and deploys it, and stops to ask you only for what agents may never do (live money, real filings, production secrets).

Prefer to connect it yourself? The MCP server needs nothing installed:

```bash
claude mcp add --transport http vibiz --scope user https://app.vibiz.app/mcp
```

The first time a tool is used, your agent opens the same sign-in in your browser. Codex, Cursor, VS Code, Windsurf, Gemini CLI and OpenCode take the same URL ([Agents](https://app.vibiz.app/docs/agents)).

The rest of this page is the same thing by hand.

## 1. Open an account

Sign in at [app.vibiz.app](https://app.vibiz.app) with your Vibiz account and create a Vibiz Stack account, or let `vibiz login` (next step) open one for you. During the private beta, opening an account is limited to invited emails.

Every key the CLI or an agent gets is an **agent key** (`vz_sk_…`): it can build, deploy and run, but never reads production secrets or moves live money. You, signed in to the console, are the owner. See [Keys and environments](https://app.vibiz.app/docs/keys).

## 2. Log in the CLI

The CLI is the `@vibiz/cli` package on npm (the command is `vibiz`): `npx @vibiz/cli …` (Node 20+), or `npm install -g @vibiz/cli` once. Every command maps to the HTTP API, so `curl` works everywhere instead.

```bash
vibiz login                # prints a link: open it and click Authorize
```

The CLI saves its own new key, named after your computer. Already have a key? `vibiz login --key vz_sk_…`. `VIBIZ_API_KEY` and `VIBIZ_API_URL` in the environment override the saved login (`~/.vibiz/config.json`).

## 3. Create a project

```bash
mkdir acme && cd acme
vibiz init "Acme Bakery"                  # hosting, database, sign-in and analytics
vibiz init "Acme Bakery" --template nextjs-saas   # or start from the Next.js starter app
```

`vibiz init` writes `./vibiz.json` with the project id; agents read it instead of asking you. Over HTTP:

```bash
curl https://app.vibiz.app/v1/projects \
  -H "Authorization: Bearer $VIBIZ_API_KEY" -H 'content-type: application/json' \
  -d '{"name":"Acme Bakery"}'
# → 202 { "project": { "id": "prj_…", "slug": "acme-bakery", "resources": [ … "status": "pending" ] }, "operations": [ … ] }
```

Resources are provisioned in the background: each goes `pending → provisioning → ready` (or `failed` with an `error`). `GET /v1/projects/:id` shows where they are. Without `resources`, a project gets `hosting`, `database`, `auth` and `analytics`; `email`, `ai` and `replay` are opt-in (`vibiz add email`). Session replay (`vibiz add replay`) records visitors' sessions only after they consent, and shows what went wrong for them: add it with analytics unless you don't want recordings. Only want one service, for an app that runs somewhere else? Ask for just that one (`--resources email`, or `none` for payments): see [Use one service](https://app.vibiz.app/docs/use-one).

## 4. Work locally

```bash
vibiz dev                  # writes .env.development.local: dev database, sign-in, AI key
npm run dev
```

The development environment has its own database branch (production's tables, none of its rows), its own sign-in that trusts `http://localhost:3000`, and its own AI key. It is safe to hand to an agent.

## 5. Deploy

```bash
vibiz deploy               # live at https://acme-bakery.vibiz.app
vibiz deploy --preview     # or a separate URL to check first, then: vibiz promote <id>
vibiz rollback             # instantly back to the previous production deployment
```

## 6. Give it to your agent

```bash
vibiz mcp add --clients "Claude Code"      # remote MCP: Codex, Cursor, "VS Code with Copilot"… too
vibiz skills add --global                  # the agent skills, for the agent this runs in
claude mcp add vibiz -- npx -y @vibiz/cli mcp   # or the local MCP server, with the CLI's login
```

Or hand it all to your agent: `Set up Vibiz for me: follow https://app.vibiz.app/get-started.md`. [Agents](https://app.vibiz.app/docs/agents) has Codex and Cursor too.

## Next

- [Payments](https://app.vibiz.app/docs/payments): sell a plan with a checkout link.
- [Sign-in](https://app.vibiz.app/docs/sign-in): turn on Google or magic links.
- [Web data](https://app.vibiz.app/docs/actions): scrape a site, search the web, pull a competitor's ads from the Meta Ad Library: `vibiz ads "Nike" --country US`.
- [API reference](https://app.vibiz.app/docs/api): every route.
