Skip to main content
This is the complete reference for buildwithtrace (v0.1.0) — the single command the CLI installs. (There’s no trace binary; that name collides with the macOS system /usr/bin/trace. If you want a shorter command, add a shell alias alias trace=buildwithtrace, which shadows the macOS system tool.) Run buildwithtrace <command> --help for inline help on any command.

Global options

These apply to the root command:
When CI is set in the environment, output defaults to JSON automatically and interactive prompts are skipped. See Automation & CI/CD.

AI design commands

These stream from the Trace backend over SSE and execute tool calls locally against your files. They require authentication. Free accounts can use ask; chat/agent/plan require a paid plan, free agent credits, or an active legacy trial.

buildwithtrace chat

Interactive AI design session — the flagship command.
In-session slash commands (model-free, run locally): /help, /clear, /rules, /context.

buildwithtrace ask

Ask a single question. Read-only — no files are modified.

buildwithtrace agent

Execute a single instruction. File writes are auto-approved.

buildwithtrace plan

Multi-step plan mode: research → questions → plan → execute.

buildwithtrace review

AI design review of a project.

buildwithtrace signal

Trace electrical signal paths through schematic connectivity.

Local validation & export

These run on a local engine binary — the same C++ command-line tool (trace-cli) that ships inside the Trace desktop app. On macOS and Windows, the Trace desktop app must be installed (the CLI detects it automatically). On Linux, if the desktop app isn’t installed, the CLI downloads a standalone engine on first use. Manage it with buildwithtrace engine. No account required.
The CLI searches for the engine binary in this order:
  1. TRACE_ENGINE_PATH environment variable (explicit override)
  2. Trace desktop app/Applications/Trace.app/Contents/MacOS/trace-cli (macOS), %LOCALAPPDATA%\Programs\Trace\*\bin\trace-cli.exe (Windows), /usr/bin/trace-cli or /opt/trace/bin/trace-cli (Linux)
  3. KiCad — falls back to kicad-cli if Trace isn’t installed (same engine, different branding)
  4. Downloaded standalone~/.trace/engine/trace-cli (auto-downloaded on first use if none of the above exist)
  5. $PATH — checks which trace-cli or which kicad-cli
If you have the Trace desktop app installed, you never need to download anything — buildwithtrace erc, buildwithtrace drc, and buildwithtrace gerbers just work immediately.

buildwithtrace erc

Run an Electrical Rule Check on a schematic.
Exits 10 if violations are found (unless --exit-zero), 5 if the engine isn’t installed.

buildwithtrace drc

Run a Design Rule Check on a PCB.

buildwithtrace gerbers

Export Gerber + drill files for manufacturing.

buildwithtrace export

Export design files to other formats. The input file type is auto-detected from its extension.
netlist --format accepts kicad (default), cadstar, orcadpcb2, spice.

buildwithtrace engine

Manage the local engine binary used by ERC/DRC/export.

Format conversion

Local converters. No account required. Altium parsing uses a verified parser with netlist-driven connectivity for high-fidelity output.
File formats. --format trace writes Trace’s line-oriented text DSL.trace_sch for schematics, .trace_pcb for PCBs (grammars: trace_sch.ebnf / trace_pcb.ebnf). This is the canonical on-disk format the AI reads and writes, and it round-trips losslessly with KiCad. (trace_json is just an in-memory intermediate the converter passes through — it’s never written to disk by convert.) --format kicad (the default) writes KiCad’s native S-expression .kicad_sch / .kicad_pcb.

buildwithtrace convert schematic

buildwithtrace convert pcb

buildwithtrace convert project

Convert an entire Altium project directory (all .SchDoc + .PcbDoc, and writes a .kicad_pro).
All conversions work out of the box — the local converter is bundled with the CLI. No extra install is required for Trace ↔ KiCad (.trace_sch/.trace_pcb.kicad_sch/.kicad_pcb) or Altium → KiCad.

Offline EDA helpers

These never touch the network or the AI — pure local parsing. Great for scripts and quick lookups.

buildwithtrace index

Offline component and net lookup across your design files.

buildwithtrace rules

Manage .trace/rules.md — persistent design preferences the AI reads at the start of every conversation. See TraceRules.

buildwithtrace history

Read-only browser for the desktop app’s .history/ autosave repository. The CLI never writes to it (to avoid conflicting with the desktop app).

Components, BOM & manufacturing

Backend commands (require auth).

buildwithtrace components

search "<query>" — search distributors (Nexar/DigiKey/Mouser): check — validate a BOM against distributor stock:

buildwithtrace bom

enrich — fill in missing MPNs from distributors: generate — full BOM generation:

buildwithtrace generate

Generate KiCad symbols and footprints with AI. The component is generated server-side and the file is written to your project (<name>.kicad_sym / <name>.kicad_mod). Interactive runs ask for a credit-usage confirmation first.
--datasheet-file (local PDF) is deprecated and not used by generation — pass a --datasheet <url>, or omit it and the part number will be searched for a datasheet automatically.
Datasheet questions (“what’s the pinout of the STM32F401?”) go through buildwithtrace ask or agent — the AI fetches and parses the datasheet itself (URL, part number, or an attached PDF) and answers with just the relevant section.

buildwithtrace dfm

Design-for-manufacturing analysis.

buildwithtrace order

Manufacturing order pipeline.

Versions, teams, account & sharing

Backend commands (require auth).

buildwithtrace versions

Schematic version snapshots (full file content, stored server-side).

buildwithtrace teams

buildwithtrace billing

buildwithtrace share

Shareable conversation links.

buildwithtrace auth

Token management (create/list/revoke) requires an interactive login session — a PAT can’t manage tokens (enforced server-side, so a leaked PAT can’t mint more or revoke yours). PATs can also be created in the dashboard (Settings → Developer, with a scope + expiry picker). buildwithtrace whoami (top-level) prints the current user.

Integrations

buildwithtrace altium

Live bridge to a running Altium Designer instance (file-based IPC). Run buildwithtrace altium install-scripts first, then start StartTraceServer from the TraceAI script inside Altium.

buildwithtrace mcp

Expose Trace as a Model Context Protocol server. See MCP Server.

buildwithtrace byok

Bring your own LLM key. See Bring Your Own Key.

Configuration & diagnostics

buildwithtrace config

backend is an alias for env. See Configuration.

buildwithtrace doctor

Diagnoses API connectivity, authentication, the engine binary, Python version, installed copies, and your model provider. Exits non-zero if any check fails. Run it first whenever something misbehaves. The CLI can be installed through several channels (pip, Homebrew, npm, or the curl installer). doctor reports the running copy’s version and install origin, lists every buildwithtrace executable found on your PATH, and warns when multiple distinct installs coexist — PATH order decides which one runs, so keep one channel and uninstall the rest. buildwithtrace --version also shows the install origin, e.g. v0.1.4 (homebrew).

Exit codes

Commands use consistent exit codes so you can gate CI on them:
In CI, pass --exit-zero to buildwithtrace erc/buildwithtrace drc when you want to collect results without failing the job, and omit it when violations should block the pipeline.