Skip to main content

Overview

sutro.config.json links a local folder to a Sutro Project and Application. CLI commands that operate on a project, such as sutro dev, sutro validate, sutro publish, sutro status, and sutro openapi, read this file from the current working directory. Create the file with:
sutro init

File format

Example:
{
  "$schema": "https://assets.withsutro.com/sutro-cli-schema.json",
  "projectId": "<PROJECT_ID>",
  "applicationId": "<APPLICATION_ID>",
  "entryFile": "app.slang"
}
Fields:
FieldRequiredDescription
$schemaNoJSON schema URL used by editors for validation and autocomplete.
projectIdYesSutro Project ID linked to this folder.
applicationIdYesSutro Application ID that receives validation, dev-session, and publish updates.
entryFileYesSLang entry file. Defaults to app.slang when generated by sutro init.
entryFile must point to a file inside the project directory.

Creating config

Create a new Project and Application:
sutro init --name "Task API"
Create a new Application inside an existing Project:
sutro init --project-id <PROJECT_ID>
Link an existing Application:
sutro init --application-id <APPLICATION_ID>
Use a custom entry file:
sutro init --entry-file backend/app.slang

Source upload behavior

When the CLI uploads SLang source, it sends:
  • The configured entryFile.
  • Every .slang file under the project directory.
  • Paths relative to the project directory.
The CLI skips generated and vendor directories:
DirectoryReason
.gitGit internals are not source files.
.slang-dataLocal runtime data from older development workflows.
.sutroLocal Sutro cache data.
.turboBuild cache.
coverageTest coverage output.
distBuild output.
node_modulesInstalled dependencies.

Multi-file projects

Local imports work with multi-file projects. For example:
task-api/
  sutro.config.json
  app.slang
  models.slang
app.slang can import models.slang:
import "./models"

action ListTasks(): Page<Task>
  body
    return pageOf Task
models.slang can define shared models:
entity Task
  fields
    title: TEXT
    completed: BOOLEAN
When you run sutro dev, sutro validate, or sutro publish, the CLI uploads both files.