Preview Environments
How to set up, connect, and use preview environments in Baz
Preview environments let Baz open your UI in a sandboxed browser, validate the ticket’s requirements, collect screenshots, and run full Spec Reviews. Without a working preview environment, Baz agents will fall back on a Spec Review focused on Code <> Ticket <> Design alignment.
This guide explains what you need, how to connect it, and how to give Baz the correct preview URL so everything works end-to-end.
1. What is a preview environment?
A preview environment is an internet-accessible instance of your deployed application for a specific pull request or branch. Examples:
https://cr-123.yourcompany.comhttps://vercel.app/pr-77https://feature-branch.preevy.dev
Baz uses this environment to:
Load your UI via Playwright
Validate the behavior against the ticket
Take screenshots of met/unmet requirements.
2. What you need to provide
To make preview environments work with Baz, you need:
1. A deployable preview environment per PR
This can come from any platform:
Vercel Deploy Previews
Netlify Preview Deploys
GitHub Actions + Docker + any hosting
Internal preview clusters (if publicly accessible)
2. That preview environment must be reachable
Baz must be able to reach the URL from the public internet.
If your preview is behind a VPN or corporate firewall, you must allowlist Baz’s 3 outbound IPs:
18.190.165.140
3.20.124.148
3.12.220.913. Any required login credentials
If users must log in to see your app, Baz needs those credentials.
You configure them inside: Settings → Integrations → Preview Environment
3. Connecting your preview environment in Baz
Step 1 — Open the integration panel
In Baz: Settings → Integrations → Preview Environment → Configure
Step 2 — Enter the login credentials
This is only needed if your preview app is gated behind basic auth or a simple login screen.
User: the username Baz should log in with
Password: the password for that user
Click Connect.
If the credentials are valid, you’ll see the “Connected” state:
4. How Baz learns the preview URL
You must give Baz agents the URL of the preview environment in the context of the pull request.
Ideally, you do this by posting a comment on the GitHub PR.
Option A — Your CI posts the URL automatically
This is the recommended approach. After deployment, CI adds a comment like:
### Preview environment is ready
https://cr-1234.yourcompany.comBaz reads this comment, validates the URL, logs in if needed, and starts Spec Review.
Option B — You paste the URL manually
You can also comment manually on the PR:
Preview URL: https://cr-4567.dev.myapp.comBaz will detect it and run automatically.
FAQ
Last updated