Software factory / Start
Change the settings with src
You want to change the factory settings from a terminal or a script, or let your coding agent do it. The src CLI has the same settings as the factory settings pages.
4 min read
Repository admins and organization owners can use it. Add --org <org> to act on an organization, not on the repository of the current folder.
1. Read the settings
src factory settings
2. Add a model key
src factory set-key anthropic < anthropic-key.txt
src factory keys
set-key reads the key from standard input, so the key stays out of your shell history. src factory keys lists the provider keys. To remove a key, run src factory delete-key anthropic.
3. Write the change
change.json holds only the fields that you change. null removes a value, so the inherited value holds again.
This change turns on PR review with its step Push fixes, moves it to Anthropic with high reasoning, and removes the repository's own Review rounds:
{
"agents": {
"review": {
"enabled": true,
"steps": { "fix": true },
"model": { "provider": "anthropic", "model": "claude-sonnet-4-5", "reasoning": "high" }
}
},
"reviewRounds": null
}
4. Send the change
src factory configure --file change.json
Done
The factory uses the new settings. src factory settings shows them.
The agents and their steps
Each agent has enabled, trigger and model. Triage and Assign also have mode. The reasoning of model is off, minimal, low, medium, high, xhigh or max. Leave it out for Default. The forge refuses another value.
The steps are in steps:
| Agent id | Name on the page | steps |
|---|---|---|
audit | Security audit | None |
spam | Spam | None |
review | PR review | fix (Push fixes), value (Check scope and duplicates), fixesIssue (Verify the linked issue) |
keep-green | Keep green | conflicts (Resolve merge conflicts), ci (Fix failing CI), mergeQueue (Resolve conflicts in the merge queue) |
summary | PR summary | impact, domains (File domains), classify |
triage | Triage | None |
assign | Assign | None |
issue-fix | Issue fix | fixPr: off, label or auto |
deps | Dependencies | None |
architecture | Architecture | None |
ci-cache | CI cache | None |
Each step is true or false, except fixPr. For example, {"agents": {"issue-fix": {"enabled": true, "steps": {"fixPr": "auto"}}}} turns on Issue fix, and opens a fix pull request for each issue that it reproduced.
The other fields
- Ease of merge: the two line limits are one field, for example
{"easeLimits": {"medium": 200, "hard": 800}}. - Monthly spend cap: the field
monthlySpendCapUsd, for an organization only. The settings answer also hasspend. See The spend in the answer. - The chats: the PR chat is the field
prChat, and the architecture chat is the fieldarchChat. Each hasenabledandmodel, and itsmodelcan havereasoningtoo. For example,{"archChat": {"enabled": false}}turns the architecture chat off. - Dependency updates: the field
deps, withautoUpdate(trueorfalse),schedule(dailyorweekly),minReleaseAgeDaysandmaxMajorPrs.
This change turns on auto-update each day, and the agent that fixes the update pull requests whose CI fails:
{
"agents": { "deps": { "enabled": true } },
"deps": { "autoUpdate": true, "schedule": "daily" }
}
The fields and the routes are in Install and set up the CLI, Use the REST API and Connect over MCP.
The spend in the answer
The settings answer of the REST route and of the MCP tool has spend, the line Spent this month of the settings pages. src factory settings --json spend prints it:
spentMicros: what the forge spent this UTC month on the models that it pays for, in millionths of a dollar.capUsd: the cap that holds, in dollars. While billing is on for the owner, it is the lower of two caps: the cap that a site admin gave the account, and the cap of the organization. It isnullwhen neither is set.billing: only while billing is on for the owner.aiLeftMicrosis what billing leaves for forge-paid AI this period, in millionths of a dollar.urlis the path of the Billing page of the owner, for example/organizations/acme/billing. It isnullon a repository of another person: the Billing page of a person is for that person only.
See When billing is on.