A repository tells Trevize how to set itself up, run, and preview through a
single versioned file: .trevize/settings.json. It lives in your repo, so
the configuration travels with your code and applies to every sandbox Trevize
creates for a session, task, or
automation.
Where it lives
Put the file at .trevize/settings.json in the root of your repository.
When a sandbox is created, Trevize reads this file for the repository and uses it to run lifecycle hooks, start preview processes, and provision resources.
Top-level keys
{
"$schema": "https://trevize.dev/schemas/settings.json",
"workspaceId": "your-workspace-id",
"projectId": "your-org/your-repo",
"hooks": {},
"preview": {},
"resources": {}
}| Key | Purpose |
|---|---|
$schema |
Points at the JSON schema so editors can offer autocomplete and validation. Optional. |
workspaceId |
Identifies the Trevize workspace this project belongs to (used by the MCP integration). |
projectId |
Your org/repo identifier (can be auto-detected from the git remote). |
hooks |
Commands to run at sandbox lifecycle points. See Hooks. |
preview |
Preview targets and processes that serve your app. See Preview. |
resources |
Managed resources (e.g. a database) mapped into the sandbox. See Resources. |
All keys are optional — include only what your repository needs. hooks,
preview, and resources are the parts that shape what happens inside a sandbox.
Next
Hooks
Run install/setup commands when the sandbox is ready. Configure hooks.
Preview
Serve your app so reviewers get a live preview. Configure preview.
Resources
Wire a database branch into the sandbox. Configure resources.
Annotated example
A complete, walked-through settings.json.
See the example.
For a field-by-field table, see the
settings.json reference.