Overview
The Sutro CLI is the fastest way to build a SLang backend from your local editor. You write.slang files locally, and Sutro runs validation, preview, and publish workflows on the hosted Sutro backend.
In this guide, you’ll:
- Install the CLI.
- Log in with your Sutro account.
- Link a local folder to a Sutro Project and Application.
- Run a remote dev session with live reload.
- Validate and publish the backend.
Before you begin
You need:- Node.js 22 or later.
- npm, pnpm, or yarn.
- A Sutro account.
Steps
Log in
Start the browser-based login flow:The CLI opens Sutro Studio in your browser. After login completes, the CLI stores a local session for future commands.If your environment cannot open a browser automatically, print the login URL instead:
Create a local project
Create a new folder and initialize it with Sutro:
sutro init creates a remote Project and Application, writes sutro.config.json, and creates app.slang if it does not exist.To link an existing Application instead, pass its ID:Start a remote dev session
Start the preview server:The CLI creates a remote dev session, uploads your local Keep this command running while you edit. When a
.slang files, and prints a preview API URL:.slang file or sutro.config.json changes, the CLI uploads the latest source and refreshes the remote preview.Press Ctrl + C to stop the dev session.Call the preview API
Open a second terminal and call the URL printed by Replace
sutro dev:<SESSION_ID> with the value printed by sutro dev.Validate the project
Run validation before publishing:The CLI uploads the local SLang source to Sutro for validation and prints compiler diagnostics if the project does not compile.
Publish the backend
Publish the linked Application:The CLI uploads the local SLang source, publishes the Application, and prints the published API URL and version.
You now have a local SLang project linked to Sutro, a remote dev preview, and a published backend API.