CLI — set-state
aynig set-state --dwp-state <state> [options]aynig set-state creates a state commit for any non-working DWP state.
Use it when a DWP run has moved into a new state such as review, failed, or
triage and you want the runner to take action on the next cycle.
The command writes dwp-state: <state> automatically, validates trailer
format, and can push the current branch when a remote is configured.
Behavior
--dwp-stateis required.workingis not allowed. Useaynig set-workingfor that state.- The default commit title is
chore: set <state>when--subjectis not provided. - The body can be provided with
--prompt,--prompt-file, or--prompt-stdin. - Trailers from
HEADare not copied by default, because this is treated as a completely new state. --keep-trailerscopies existingdwp-*trailers fromHEADexcept the ones this command manages itself.- The push remote is resolved from
--dwp-remotefirst, then from thedwp-sourcetrailer onHEAD. - When a remote is resolved, the command pushes the current branch after the commit.
Options
--dwp-state <state>
Required. Sets the new non-working DWP state and writes it as the
dwp-state trailer.
Example:
aynig set-state --dwp-state review--subject <text>
Sets the commit title. If omitted, AYNIG uses chore: set <state>.
Example:
aynig set-state --dwp-state review --subject "review: ready for feedback"--prompt <text>
Sets the commit body directly on the command line.
Example:
aynig set-state --dwp-state failed --prompt "Tests failed in CI; investigating flaky snapshot output."--prompt-file <path>
Reads the commit body from a file.
Example:
aynig set-state --dwp-state failed --prompt-file ./failure.txt--prompt-stdin
Reads the commit body from standard input. This is useful when generating the body from another command or when writing a longer message in a shell pipeline.
Example:
printf "Blocked on API credentials from staging environment.\n" | aynig set-state --dwp-state triage --prompt-stdin--dwp-remote <name>
Uses the named git remote for the post-commit push and records it in a DWP trailer as
dwp-source: git:<name>.
Example:
aynig set-state --dwp-state review --dwp-remote origin--keep-trailers
Copies existing dwp-* trailers from HEAD into the new state commit, while still
replacing trailers managed by aynig set-state such as dwp-state and, when applicable,
dwp-source.
Example:
aynig set-state --dwp-state review --keep-trailers--trailer <key:value>
Adds an extra trailer to the commit. Repeat the flag to add more than one.
dwp-state cannot be set with --trailer; it is managed by --dwp-state.
Example:
aynig set-state --dwp-state triage --trailer "dwp-issue: 42"Repeated example:
aynig set-state --dwp-state review --trailer "dwp-issue: 42" --trailer "dwp-note: waiting on design sign-off"Examples
Set a simple state with the default title:
aynig set-state --dwp-state reviewSet both the title and the body explicitly:
aynig set-state --dwp-state review --subject "review: ready for feedback" --prompt "Core flow is implemented and ready for another pass."Read a longer body from a file:
aynig set-state --dwp-state failed --prompt-file ./failure.txtPipe a generated body through stdin:
git status --short | aynig set-state --dwp-state triage --prompt-stdinPush through a specific remote and add extra trailers:
aynig set-state --dwp-state triage --dwp-remote origin --trailer "dwp-issue: 42" --trailer "dwp-note: waiting on upstream fix"