trace-cli has no settings file to edit. It keeps its own sign-in, reads your project's own settings, and takes everything else as options on each command. It reads the Trace app's settings, such as your libraries, but doesn't change them.
Sign-in
trace-cli auth login
trace-cli auth status
trace-cli auth status --json
auth loginopens your browser to sign in.trace-clikeeps this sign-in to itself, so signing in or out in the terminal never changes the Trace app's sign-in.- Until you run
auth login,trace-clican borrow the Trace app's sign-in while the app is signed in on the same computer. That only lasts while the app keeps it fresh. auth statussays which sign-intrace-cliis using, and exits with a nonzero code if there is none.trace-cli auth logoutsignstrace-cliout. The Trace app stays signed in.- Run
trace-clias the same user account you signed in with. Each user account on a computer has its own sign-in. auth status --jsonincludes your name, email and account and device IDs. Remove them before you share the output.
Signing in gives trace-cli your account. AI commands also need available usage on your plan (see Billing), and Workspaces commands need access to the project.
Sign in without a browser
On a build server, or for a coding assistant that can't open a browser, sign in with an API token:
- On the web dashboard, open Settings, then API Tokens under Developer, and create a token with Full access. Choose when it expires.
- Give it to
trace-cliin one of two ways:- Save it for this user account: pipe it into
trace-cli auth login --with-token, for example from your build system's secret store. - Or set the
TRACE_TOKENenvironment variable to the token for the job. It takes priority over any other sign-in.
- Save it for this user account: pipe it into
printf '%s' "$MY_TRACE_TOKEN" | trace-cli auth login --with-token
Treat a token like a password: keep it out of scripts, chat messages and design files, and keep it in your build system's secret store. trace-cli auth logout forgets a saved token, but the token keeps working elsewhere until you revoke it in API Tokens. To stop using TRACE_TOKEN, unset it.
Project files
trace-cli reads the same files as the Trace app, so keep a project together:
- The schematic (
.trace_sch) or board (.trace_pcb) and its matching.xofile. - The project file (
.kicad_pro), which holds the rule severities, net classes and other project settings. Without it,trace-cli chatwarns you and ERC and DRC fall back to default settings. - The project's library tables, so parts and footprints resolve.
.trace/rules.md, if you have one.trace-cli chatsends it to the assistant just as the app does. See TraceRules.
trace-cli chat and the project commands find the project in the current folder, or in the folders above it. --project names another one: its folder, its .kicad_pro or a design file. If a folder holds more than one project, name the one you want. Workspaces commands take the full path to the .kicad_pro in the local copy Trace keeps of a Workspaces project.
Command options
Options are set on each command. The ones you will use most:
| Option | Used by | What it does |
|---|---|---|
--project PATH | chat, project commands | The project to work on, instead of the one in the current folder. |
--mode ask | chat | Answers only, no edits. The default mode, agent, can edit your files. |
--model NAME | chat | gpt-astra, gpt-sol, genie-2-flash or genie-2. |
--format json | chat | One JSON event per line. |
--no-interactive, --auto-approve | chat | Decline or accept part previews and file deletions without asking. Neither one stops Agent mode from editing. |
--allow-route, --allow-spend | chat | Let a script start basic routing, or paid advanced layout runs up to --max-minutes N, without asking. |
--json | project commands | Print one JSON document. |
--output FILE, --format json | sch erc, pcb drc | Write the report as JSON. |
--exit-code-violations | sch erc, pcb drc | Exit with code 5 when there are findings. |
--json | workspaces | Print the result on one line. |
--yes | workspaces | Confirm an action without the prompt. |
--request-id ID | workspaces | Name an action so you can look it up later. |
The command reference has the full list, and --help on any command shows its options.
Your data
Checks, exports, board updates and conversions run entirely on your computer. Chat, basic routing, advanced layout and Workspaces work with Trace's servers, as they do in the app: the assistant receives the parts of your design it needs to answer.
Chats from the terminal are kept with the Trace app's chat history on this computer, so either one can pick them up.
trace-cli has no option for your own model provider key. See BYOK availability.