Skip to content

writ configure

Create or edit the engagement configuration.

Terminal window
writ configure

The command asks a question for each value, and then writes ~/.writ/config.yaml. The command shows the current value in brackets. To keep the current value, press Return.

Read Configure the engagement for the meaning of each value.

Each flag sets one value without a question.

Flag Purpose
--config <path> Use the configuration at this path.
--holder-provider <name> The wire protocol of the holder: anthropic or openai.
--holder-model <name> The model of the holder.
--holder-key-env <name> The environment variable that holds the API key of the holder.
--holder-base-url <url> An alternative endpoint for the holder.
--holder-input-price <amount> The price of one million input tokens, such as $3.00.
--holder-output-price <amount> The price of one million output tokens, such as $15.00.
--judge-provider <name> The wire protocol of the judge.
--judge-model <name> The model of the judge.
--judge-key-env <name> The environment variable that holds the API key of the judge.
--judge-base-url <url> An alternative endpoint for the judge.
--judge-input-price <amount> The price of one million input tokens for the judge.
--judge-output-price <amount> The price of one million output tokens for the judge.
--judge-budget-share <percentage> The part of the cost bound that the judge can spend, such as 10%.
--sandbox <engine> The sandbox engine: docker, podman, or none.
--sandbox-image <image> The container image that shell commands run in.
Terminal window
writ configure \
--holder-provider anthropic \
--holder-model claude-opus-5 \
--holder-key-env ANTHROPIC_API_KEY \
--holder-input-price '$3.00' \
--holder-output-price '$15.00' \
--sandbox docker \
--sandbox-image python:3.12

Put a dollar amount in single quotation marks, because a shell expands $.

A judge is necessary for each judgment clause.

Terminal window
writ configure \
--judge-provider anthropic \
--judge-model claude-sonnet-5 \
--judge-key-env ANTHROPIC_API_KEY \
--judge-input-price '$1.00' \
--judge-output-price '$5.00' \
--judge-budget-share 10%

The budget share must be a whole percentage between 1% and 99%.

To remove the judge, run writ configure and give an empty judge model.

Terminal window
writ configure --config ./ci-config.yaml
writ issue bug-fixer.yaml --config ./ci-config.yaml

A separate file is useful for continuous integration, where the model, the prices, and the sandbox are different.

Code Meaning
0 The command wrote the configuration.
3 A value is wrong, or Writ cannot write the file.