v0.1.0). Everything on this page reflects the shipping command surface. The AI commands (chat, agent, plan, review, ask) run through the Trace backend — free accounts get ask; agent/plan require a trial or paid plan. The local commands (erc, drc, gerbers, export, convert, rules, history, index) work without a subscription.What it is
buildwithtrace is a terminal interface for Trace’s AI-powered EDA tools. On macOS and Windows, it requires the Trace desktop app to be installed (the CLI uses the desktop app’s local engine). On Linux, the CLI downloads a standalone engine automatically on first use — no desktop app needed.
- Design with AI —
buildwithtrace chat,buildwithtrace agent, andbuildwithtrace plangive you the full agentic design loop, with file edits, tool execution, and plan mode, against your local.kicad_sch/.kicad_pcb/.trace_sch/.trace_pcbfiles. - Validate locally —
buildwithtrace erc,buildwithtrace drc, andbuildwithtrace gerbersrun on a bundled engine, no cloud round-trip required. Perfect for CI. - Convert anything —
buildwithtrace convertturns Altium (.SchDoc/.PcbDoc/.PrjPcb) into KiCad with netlist-accurate connectivity, and moves losslessly between KiCad and Trace’s text DSL (.trace_sch/.trace_pcb). - Manufacture —
buildwithtrace dfm,buildwithtrace bom,buildwithtrace components, andbuildwithtrace ordertake you from design to fab. - Integrate —
buildwithtrace mcp serveexposes Trace as a Model Context Protocol server so Cursor, Claude Desktop, or any MCP client can drive it. The GitHub Action drops it into CI.
How it fits together
trace-cli). On macOS and Windows, the desktop app must be installed — the CLI detects it automatically. On Linux, if you don’t have the desktop app installed, the CLI downloads a standalone engine on first use. Either way, the commands work identically.Install
The CLI is a Python package (buildwithtrace) and requires Python 3.10+. It installs a single command: buildwithtrace. (There’s no trace binary — that name collides with the macOS system /usr/bin/trace.)
- pip
- pipx (isolated)
- Homebrew
- npm
- GitHub Actions
Authenticate
--provider github for GitHub). Tokens are stored in your OS keychain (com.buildwithtrace.cli), falling back to a 0600 file if no keychain is available.
For headless / CI machines, use a token instead of the browser:
Quick start
The command surface at a glance
| Command | What it does | Runs |
|---|---|---|
buildwithtrace chat | Interactive AI design session | Backend |
buildwithtrace ask | One-shot read-only question | Backend |
buildwithtrace agent | Single auto-approved instruction | Backend |
buildwithtrace plan | Research → plan → execute | Backend |
buildwithtrace review | AI design review | Backend |
buildwithtrace signal | Trace a net/component through connectivity | Backend |
buildwithtrace erc / drc | Electrical / design rule checks | Local engine |
buildwithtrace gerbers | Gerber + drill export | Local engine |
buildwithtrace export | PDF / SVG / netlist / BOM / STEP / pos | Local engine |
buildwithtrace convert | Altium ↔ KiCad ↔ .trace_sch/.trace_pcb | Local |
buildwithtrace index | Offline component/net lookup | Local |
buildwithtrace rules | Manage .trace/rules.md | Local |
buildwithtrace history | Browse .history autosave (read-only) | Local |
buildwithtrace components | Search / check parts | Backend |
buildwithtrace bom | Generate / enrich BOMs | Backend |
buildwithtrace generate | Generate symbols / footprints | Backend |
buildwithtrace dfm | DFM autofill / checks | Backend |
buildwithtrace order | Manufacturing orders | Backend |
buildwithtrace versions | Schematic version snapshots | Backend |
buildwithtrace teams | Team workspaces | Backend |
buildwithtrace billing | Plan, quota, upgrade | Backend |
buildwithtrace share | Shareable conversation links | Backend |
buildwithtrace altium | Live Altium Designer bridge | Backend + bridge |
buildwithtrace byok | Bring your own LLM key | Local |
buildwithtrace mcp | MCP server for AI assistants | Local |
buildwithtrace config | CLI configuration | Local |
buildwithtrace engine | Manage the local engine binary | Local |
buildwithtrace doctor | Diagnose environment & connectivity | Local |
buildwithtrace whoami | Show current user | Local |
Security
The CLI executes AI tool calls (read, write, search-replace, delete) locally on your machine, behind the same sandbox the desktop app uses:- Project-directory sandbox — every file path is resolved (
Path.resolve(), symlink-safe) and must live inside the project directory. Paths that escape it are rejected. - Extension allowlist — reads/writes are limited to EDA file types:
.trace_sch,.trace_pcb,.kicad_sch,.kicad_pcb,.kicad_sym,.kicad_mod, Altium (.SchDoc,.PcbDoc,.SchLib,.PcbLib,.PrjPcb), plus.svg,.zip,.gbr,.drl,.md, and thefp-lib-table/sym-lib-tablefiles. Anything else is blocked. - Write approval — in
buildwithtrace chat, write/search-replace/delete tools prompt for approval before touching disk. Pass--yesto auto-approve (e.g. for scripted runs).buildwithtrace agentauto-approves by design;buildwithtrace askandbuildwithtrace reviewnever write. - Credentials — auth tokens and BYOK keys live in your OS keychain (service
com.buildwithtrace.cli), never in plaintext config. See Configuration.
erc, drc, gerbers, export, convert, index). AI commands stream the relevant file content to the backend so the model can reason about it; tool execution always happens locally.
Caveats & FAQ
Local commands require the Trace desktop app (or KiCad)
The CLI searches these locations for the engine:| Priority | Location | Notes |
|---|---|---|
| 1 | TRACE_ENGINE_PATH env var | Explicit override |
| 2 | /Applications/Trace.app/ (macOS) | Desktop app bundle |
| 3 | %LOCALAPPDATA%\Programs\Trace\ (Windows) | Desktop app install |
| 4 | /usr/bin/trace-cli or /opt/trace/ (Linux) | System install or AppImage |
| 5 | kicad-cli in PATH | KiCad fallback (same engine, different branding) |
Which commands need the engine and which don't?
Which commands need the engine and which don't?
buildwithtrace erc— Electrical Rule Checkbuildwithtrace drc— Design Rule Checkbuildwithtrace gerbers— Gerber/drill exportbuildwithtrace export— PDF/SVG/STEP export
buildwithtrace convert— format conversion (Altium ↔ KiCad ↔ Trace)buildwithtrace index— local project indexingbuildwithtrace rules— TraceRules managementbuildwithtrace history— git-based local history (needsgitin PATH)buildwithtrace ask/chat/agent/plan/review— AI commands (need network, not engine)buildwithtrace auth— authenticationbuildwithtrace byok— key managementbuildwithtrace doctor— diagnostics
Engine version must match your files
Engine version must match your files
Python 3.10+ required (not 3.9 or earlier)
Python 3.10+ required (not 3.9 or earlier)
- macOS: The system Python (
/usr/bin/python3) is often 3.9. Install viabrew install python@3.12orpyenv install 3.12. - Ubuntu 20.04 LTS: Ships Python 3.8. Use the
deadsnakesPPA:sudo add-apt-repository ppa:deadsnakes/ppa && sudo apt install python3.12. - Symptom:
SyntaxErrororImportErroron install/import if version is too old.
AI commands require authentication + a paid plan
AI commands require authentication + a paid plan
| Command | Free plan | Trial / Paid |
|---|---|---|
ask | ✓ | ✓ |
chat | ✗ | ✓ |
agent | ✗ | ✓ |
plan | ✗ | ✓ |
review | ✗ | ✓ |
buildwithtrace auth status to check.Local commands (erc, drc, gerbers, export, convert, index, rules, history) never require auth or a subscription.Altium conversion: known limitations
Altium conversion: known limitations
- Fonts: Custom Altium fonts render as DM Sans. Text sizing may differ slightly.
- 3D models: Embedded STEP models are referenced but not extracted into separate files.
- Custom pad shapes: Arbitrary polygon pads approximated as bounding primitive.
- Harness connectors & multi-level bus aliases: Partially supported; deep nesting may lose connectivity.
- Expression-based design rules: Converted to comments (KiCad DRC doesn’t support expression rules).
- Large files (>200 MB PcbDoc): No size guard — may use significant RAM on memory-constrained machines.
- Non-UTF-8 text: Characters not representable in UTF-8 are replaced with
�.
support@buildwithtrace.com.Conversion quality depends on available libraries
Conversion quality depends on available libraries
.trace_sch → .kicad_sch or .trace_pcb → .kicad_pcb, the converter needs access to KiCad symbol/footprint libraries to produce accurate geometry. Without them:- Symbols get placeholder rectangles with correct pins but approximate dimensions
- Footprints get placeholder pads based on pin count but imprecise geometry
~/.trace/libraries/ on first use. If the download fails (offline, GitHub unreachable), conversion still works but with reduced visual fidelity.No 'trace' command (macOS system conflict)
No 'trace' command (macOS system conflict)
buildwithtrace. macOS ships /usr/bin/trace (a kernel tracing tool) — shadowing it would break system debugging. For a shorter alias:Credential storage and fallback behavior
Credential storage and fallback behavior
- macOS: Keychain Access (service
com.buildwithtrace.cli) - Windows: Credential Manager
- Linux: libsecret (GNOME Keyring / KWallet)
libsecret), credentials fall back to ~/.config/trace/credentials.json. The CLI does not warn you about this fallback.CI/Docker: Set TRACE_API_TOKEN=trc_xxx as an environment variable instead. This bypasses the keychain entirely.OAuth login in headless/SSH/WSL environments
OAuth login in headless/SSH/WSL environments
buildwithtrace auth login opens a browser for OAuth. This fails in:- SSH sessions without X11 forwarding
- WSL2 without
BROWSERset - Docker containers
- Headless CI servers
Corporate proxies and SSL inspection
Corporate proxies and SSL inspection
buildwithtrace doctor to diagnose connectivity issues — it checks proxy settings and reports them.CI/CD: ERC/DRC don't need auth or network
CI/CD: ERC/DRC don't need auth or network
buildwithtrace erc and buildwithtrace drc run entirely locally (engine binary + files). They never contact the Trace backend. This means:- Work on forked PRs where secrets aren’t available
- Work fully offline
- Work behind restrictive firewalls
Exit codes for CI integration
Exit codes for CI integration
| Code | Meaning |
|---|---|
0 | Success |
1 | General failure (conversion error, API error, unexpected exception) |
2 | Authentication required or failed |
5 | Engine binary not found / unavailable |
10 | ERC/DRC found violations (design has issues but the command ran correctly) |
--exit-zero on erc/drc to always return 0 (useful when you want violations as informational, not blocking).Don't run two CLI instances on the same project
Don't run two CLI instances on the same project
buildwithtrace agent or buildwithtrace chat sessions against the same project simultaneously can result in:- Last-write-wins on
.trace_sch/.kicad_schfiles - Race conditions in the trace→kicad conversion
AI file access is sandboxed
AI file access is sandboxed
chat or agent mode, it’s restricted to:- Only files inside your project directory (path traversal blocked)
- Only EDA file types:
.trace_sch,.trace_pcb,.kicad_sch,.kicad_pcb,.kicad_sym,.kicad_mod, Altium formats,.svg,.zip,.gbr,.drl,.md,.net
.py, .json, .csv, .pdf, .png, or other non-EDA files. If it tries, the CLI blocks it with a security error. This is intentional — the sandbox prevents accidental data exfiltration.BYOK keys are stored in the OS keychain
BYOK keys are stored in the OS keychain
buildwithtrace byok set anthropic sk-ant-xxx stores the key in your OS keychain, never in config files or shell history. To rotate: run buildwithtrace byok set again with the new key. To remove: buildwithtrace byok clear.Offline mode is limited to local commands
Offline mode is limited to local commands
- The engine binary is already installed (desktop app or KiCad present)
- Symbol libraries are already cached (for conversion quality)
buildwithtrace convert once to trigger library download.'history' command requires git
'history' command requires git
buildwithtrace history uses your system git binary to read the .history/ repository the desktop app maintains. If git is not in your PATH, the command fails with a clear error. Install git from git-scm.com.Analytics and error reporting opt-out
Analytics and error reporting opt-out
Network timeouts during AI streaming
Network timeouts during AI streaming
- The CLI shows: “Stream timed out after 300s”
- Partial output is still visible in your terminal
- The conversation may be in an inconsistent state — start a new one rather than
--resume
Where to go next
Command Reference
Bring Your Own Key
MCP Server & Agent Plugin
npx plugins add buildwithtrace/trace-plugin — skills + MCP for Cursor, Claude, Codex.Automation & CI/CD
Configuration
config.toml, environment variables, environments, credentials.
