gerald fill
gerald fill [PATHS]... [options]Starts the model when none is running. Guide: Fill.
Arguments
Section titled “Arguments”| Argument | |
|---|---|
PATHS |
Ruby files with # TODO: implement <name> markers |
Options
Section titled “Options”| Option | Default | |
|---|---|---|
--port <PORT> |
8080 |
Port of the model |
--check <COMMAND> |
Command that tests one method, run as <command> <path> <method>; exit 0 passes |
|
--tests-from <COMMAND> |
Ruby naming | Command that prints the test files for one method |
--no-run-tests |
Do not run the project’s tests. With no --check, fill then writes nothing |
|
--budget <SECONDS> |
Seconds fill may spend on one file; methods not passing by then stay TODO |
|
--samples <N> |
3 |
Sampled attempts fill may try after the first |
--repair |
Show the model a failing attempt and its test output once, before sampling | |
--isolate |
Hide other unwritten markers from the model while it writes each method | |
--only <GLOB> |
Limit edits to matching paths, such as 'app/**/*.rb'. Repeatable |
|
--context <KIND> |
method |
Project facts shown to the model: none, method, method+rails, facts or facts+alike |
--evidence <WHERE> |
prefix |
Where tests that mention the method appear: prefix, instruction or none |
--near-names [on|off] |
on |
After an undefined-method failure, show the class’s nearest names on the next try |
--hook |
Run as an agent’s prompt hook: read its event on stdin, fill marked files in the project and print what Gerald did |
In --only, * and ? stay within one path segment; ** crosses segments.
Two options apply only when the same settings are used by the agent tool
(gerald mcp), and do nothing for fill in a terminal:
| Option | |
|---|---|
--on-request |
Tell the agent to use Gerald only when asked |
--tools <LIST> |
Offer only these tools, such as fill,test |
Output
Section titled “Output”One line per file on stdout:
cart.rb: wrote 2 of 2; all tests pass. Nothing to review.Failures go to stderr as <path>: <reason>.
As a hook
Section titled “As a hook”gerald fill --hook is what gerald install registers. It reads the agent’s
event on stdin, fills up to five marked files within 75 seconds, and prints a
note for the agent. It never fails: when it has nothing to say it prints
nothing and exits 0.
Exit status
Section titled “Exit status”2 when no path was given, Gerald is off, or any file was left unchanged.
Examples
Section titled “Examples”gerald fill app/models/cart.rbgerald fill lib/**/*.rb --budget 60gerald fill app/models/cart.rb --check 'bin/test-method'