Headless authentication
In non-interactive environments, authenticate with a token instead of the browser. Two options:- Dashboard (recommended for CI): Go to buildwithtrace.com/dashboard/settings > Developer > Create Token. This generates a long-lived Personal Access Token (
trace_pat_...), with a scope (mcp:alldefault /partner:read) + expiry picker. Shown once — copy it. - CLI: Run
buildwithtrace auth loginon a machine with a browser, thenbuildwithtrace auth token --create --name ci-botto mint a PAT (or plainbuildwithtrace auth tokento print the shorter-lived session token).
Creating/listing/revoking tokens needs an interactive login session — a PAT can’t manage tokens. Mint PATs on your laptop (or the dashboard) and inject them into CI as a secret.
TRACE_API_TOKEN is set, every command uses it automatically — no buildwithtrace auth login needed. Local-only commands (erc, drc, gerbers, export, convert, index) don’t need a token at all.
Non-interactive behavior
WhenCI is set (GitHub Actions, GitLab CI, etc.) or TRACE_NO_INTERACTIVE=1 is set:
- Output defaults to JSON.
- Confirmation prompts (like the symbol-generation credit prompt) are skipped.
- Preview/accept-edit-reject loops auto-accept.
--json flag or TRACE_JSON=1.
Exit codes
Gate your pipeline on these:GitHub Actions
Use the official action. It installs Python if needed, installs the CLI, wiresTRACE_API_TOKEN, and runs buildwithtrace doctor.
Supported runners:
ubuntu-* and macos-*. Windows runners are not yet supported. Add TRACE_API_TOKEN as a repository secret under Settings → Secrets and variables → Actions.Validate on every PR
AI design review on PRs
Generate Gerbers on release
Matrix across multiple boards
Other CI systems
Any runner with Python 3.10+ works:Scripting recipes
Batch convert a folder of Altium projects
Export manufacturing files for every board
Pipe the API token to another tool
Consume JSON output
Environment variables for CI
See the full list on the Configuration page.

