> ## Documentation Index
> Fetch the complete documentation index at: https://docs.withsutro.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Get started with Sutro by creating your first backend using Studio or the CLI.

## Overview

This quickstart shows two ways to create your first backend with Sutro:

* **Studio**: Build a backend visually in the browser.
* **Sutro CLI**: Write SLang locally, preview it in a remote dev session, and publish it from your terminal.

Choose the path that fits how you want to work.

## Option 1: Using Studio

Studio is the simplest way to start without writing code.

<Steps>
  <Step title="Open Studio">
    Visit [Sutro Studio](https://studio.withsutro.com/).
  </Step>

  <Step title="Create your backend">
    Use Studio to define:

    * Entities and relationships.
    * Actions and business logic.
    * Security rules.
    * HTTP endpoints.
  </Step>

  <Step title="Publish">
    Publish directly from Studio when your backend is ready.
  </Step>
</Steps>

## Option 2: Using the Sutro CLI

Use the CLI when you want to define your backend in SLang and edit it from your local development environment.

<Tip>
  If you're using an AI coding agent like [Claude Code](https://docs.anthropic.com/en/docs/claude-code), install the official SLang skill to give your agent full knowledge of SLang syntax:

  ```bash theme={null}
  npx skills add https://github.com/SutroOrg/sutro-skills --skill slang
  ```
</Tip>

### Before you begin

You need Node.js 22 or later, npm, and a Sutro account.

Publishing requires a payment method on file. Add one in [Sutro Studio](https://studio.withsutro.com/) or [Sutro Console](https://console.withsutro.com/) before publishing.

### Steps

<Steps>
  <Step title="Install the CLI">
    Install the npm package:

    ```sh theme={null}
    npm install --global @sutro-dev/sutro-cli
    ```
  </Step>

  <Step title="Log in">
    Start the browser-based login flow:

    ```sh theme={null}
    sutro login
    ```
  </Step>

  <Step title="Create a project">
    Create and initialize a local project:

    ```sh theme={null}
    mkdir task-api
    cd task-api
    sutro init --name "Task API"
    ```

    `sutro init` creates a remote Project and Application, writes `sutro.config.json`, and creates `app.slang` if it does not exist.
  </Step>

  <Step title="Write your SLang definition">
    Replace `app.slang` with a simple task API:

    ```slang theme={null}
    entity Task
      fields
        title: TEXT
        completed: BOOLEAN

    action CreateTask(title: TEXT): Task
      body
        return create Task {
          title := title
          completed := false
        }

    action ListTasks(): Page<Task>
      body
        return pageOf Task

    trigger CreateTask on HttpRequest
      endpoint POST /tasks
      arguments
        title := @request.body.title

    trigger ListTasks on HttpRequest
      endpoint GET /tasks
    ```
  </Step>

  <Step title="Preview locally edited source">
    Start a remote dev session:

    ```sh theme={null}
    sutro dev
    ```

    The CLI uploads your local `.slang` files and prints a preview URL:

    ```text theme={null}
    https://dev-<SESSION_ID>.app.withsutro.com/api/latest/
    ```

    Keep `sutro dev` running while you edit. The CLI reloads the remote preview when local `.slang` files change.
  </Step>

  <Step title="Validate and publish">
    Validate the project:

    ```sh theme={null}
    sutro validate
    ```

    Publish the backend:

    ```sh theme={null}
    sutro publish
    ```

    The CLI prints the published API URL and version.
  </Step>
</Steps>

<Check>
  You've created and published your first Sutro backend.
</Check>

## Next steps

* [Sutro CLI quickstart](/docs/getting-started/cli-quickstart) - Learn the complete CLI workflow.
* [CLI command reference](/docs/cli/command-reference) - Review every command and option.
* [Project configuration](/docs/cli/project-config) - Learn how `sutro.config.json` works.
* [Introduction to SLang](/docs/SLang/introduction) - Understand SLang language constructs and features.
* [Read the API reference](/api-reference/projects/get-a-list-of-projects) - Explore the lower-level Sutro API.
