Connecting Supabase lets Trevize provision an isolated preview branch for every run — its own branch of your Supabase project’s database — so agents and previews work against realistic data. The branch is torn down when the run’s sandbox is cleaned up.
Connect Supabase
Authorize
Choose Connect Supabase. A popup opens where you authorize Trevize with your Supabase organization and pick which organization to grant access to.
Choose a project
Once connected, select the project runs should branch from and save the configuration. Use Reconnect to switch organizations, or Disconnect to stop provisioning branches.
Use it in a repository
Declare the resource in a repository’s .trevize/settings.json,
mapping your app’s database environment variable to the one Trevize provides:
{
"resources": {
"supabase": {
"env": {
"DATABASE_URL": "SUPABASE_DATABASE_URL"
}
}
}
}For each run, Trevize provisions a preview branch and injects
SUPABASE_DATABASE_URL, SUPABASE_BRANCH_ID, and SUPABASE_BRANCH_REF into the
sandbox. The mapping above sets your app’s DATABASE_URL from
SUPABASE_DATABASE_URL. The settings page shows, per repository, whether the
resource is configured and the env mapping in effect.