Installation
Install the CLI globally:sutro command.
Requirements:
| Requirement | Value |
|---|---|
| Node.js | 22 or later |
| npm package | @sutro-dev/sutro-cli |
| Binary | sutro |
Global options
Global options work with every command.| Option | Description |
|---|---|
-V, --version | Print the CLI version. |
--json | Output machine-readable JSON. For sutro dev, output is newline-delimited JSON events. |
--debug | Print debug details, including API request context and error context. |
--color | Force color output. |
--no-color | Disable color output. |
-h, --help | Show help for a command. |
Commands
sutro login
Log in to Sutro through the browser and store a local CLI session.
| Option | Description |
|---|---|
--no-open | Print the login URL instead of opening a browser. |
sutro logout
Clear the locally stored CLI session.
sutro whoami
Show the currently logged-in user.
sutro init
Link the current folder to a Sutro Project and Application. If no IDs are provided, the CLI creates a new Project and Application.
| Option | Description |
|---|---|
-n, --name <name> | App name used when creating a new Project. |
--project-id <id> | Link to an existing Project and create a new Application inside it. |
--application-id <id> | Link to an existing Application. The CLI reads its Project ID automatically. |
--entry-file <path> | SLang entry file to scaffold and track. Defaults to app.slang. |
-y, --yes | Accept defaults without prompting. |
sutro init writes sutro.config.json and creates the entry file if it does not already exist.
sutro dev
Run the linked SLang app in a remote dev session.
| Option | Description |
|---|---|
--no-watch | Upload once and keep the remote session alive without watching for file changes. |
sutro dev uploads all local .slang files under the project root, starts a remote preview, and prints an API URL like:
.slang files and sutro.config.json trigger a remote reload. Press Ctrl + C to stop the dev session.
sutro validate
Validate the linked SLang project without publishing it.
sutro publish
Upload the linked SLang project and publish the Application.
.slang files, publishes the Application, waits for the published version to become active, and prints the published URL.
Publishing requires a payment method on file.
sutro status
Show the linked Project, Application, entry file, publish state, and published version.
sutro openapi
Open the published OpenAPI spec in Console.
| Option | Description |
|---|---|
--out [path] | Save the OpenAPI spec locally instead of opening Console. Defaults to openapi.json when no path is provided. |
Exit codes
| Code | Meaning |
|---|---|
0 | Command succeeded. |
1 | Runtime, authentication, network, API, validation, or publish failure. |
2 | Usage error, such as an unknown flag or missing required input in a non-interactive shell. |
Automation
Use--json when calling the CLI from scripts or AI coding agents:
sutro dev --json writes newline-delimited events because the command keeps running:
event field, such as session_ready, session_update, or session_update_failed.