Skip to content

writ init

Create a writ file.

Terminal window
writ init <name>

The command creates <name>.yaml in the current directory. The command stops with an error when the file exists, so the command cannot overwrite your work.

Flag Purpose
--full Include each optional field.

The name must start with a lowercase letter. After the first letter, the name can contain lowercase letters, numbers, and single hyphens.

Terminal window
writ init bug-fixer

Without --full, the file contains the three necessary fields and some bounds in comments:

writ: bug-fixer
mandate: ""
grants: []
# bounds:
# iterations: 25
# cost: $1.00
# wall_clock: 15m

With --full, the file contains each field and the default remedies:

Terminal window
writ init bug-fixer --full
writ: bug-fixer
holder: default
mandate: ""
grants: []
bounds:
iterations: 25
cost: $1.00
wall_clock: 15m
edits:
max_files: 5
max_changed_lines: 200
invariants: []
obligations: []
satisfaction:
all: []
remedies:
on_bound_breach: { do: halt, inform: issuer }
on_invariant_breach: { do: revert, inform: holder, strikes: 3 }
on_assent_refused: { do: halt, inform: issuer }

Use --full when you want to see each field. Use the short file when you know the fields, because a short writ is easier to read.