Skip to main content
Connect your CLI to your Synth account and save API keys locally.

Usage

uvx synth-ai setup
Opens your browser to authenticate with Synth, then saves SYNTH_API_KEY and ENVIRONMENT_API_KEY to ~/.synth/config. Other commands (deploy, train, eval, etc.) automatically use these keys.

What It Does

  1. Opens browser authentication - Connects to Synth platform for OAuth flow
  2. Fetches API keys - Retrieves your SYNTH_API_KEY and ENVIRONMENT_API_KEY
  3. Saves credentials - Stores keys in ~/.synth/config for future CLI use
  4. Verifies Modal - Checks if Modal is authenticated (needed for cloud deployments)

Options

--local    Load credentials from your local machine instead of browser
--dev      Use development environment instead of production

Examples

# Standard setup (recommended)
uvx synth-ai setup

# Load from local machine (no browser)
uvx synth-ai setup --local

# Use development environment
uvx synth-ai setup --dev

Where Keys Are Stored

Keys are saved to: ~/.synth/config This file is read automatically by all Synth AI commands. You can also use .env files in your project directory to override these values.

Troubleshooting

”Failed to fetch keys from frontend”

”Modal authentication required”

  • Run: modal token new
  • Then re-run: uvx synth-ai setup

Browser doesn’t open

  • Use --local flag to skip browser authentication
  • Or check your default browser settings

Next Steps

After setup completes:
  1. Deploy your task app
  2. Smoke-test your deployment
  3. Run training