CLI — run
aynig run [options]aynig run inspects the current repository, resolves the command for the
current DWP state, and executes the workflow for the branches it selects.
It is the main entry point for processing AYNIG state transitions.
Behavior
- Uses
.worktreesby default for worktree management. - Resolves the remote from
--dwp-remotewhen provided. - If
--dwp-remoteis omitted, AYNIG checks the latest commit trailerdwp-source: git:<name>and uses that remote when present. --current-branchcontrols whether the current branch is skipped, included, or used as the only branch.- In remote mode, current-branch resolution is based on the upstream branch of
the current local branch, such as
origin/main. --roleandAYNIG_ROLEmake AYNIG check.dwp/roles/<role>/command/<state>before.dwp/command/<state>.- Log level precedence is
--log-level>dwp-log-leveltrailer >AYNIG_LOG_LEVEL> defaulterror. - Command stdout and stderr are written to
.dwp/logs/<commit-hash>.log.
Options
-w, --worktree <path>
Sets the directory where AYNIG creates and manages worktrees. The default is
.worktrees.
Example:
aynig run --worktree .aynig-worktrees--dwp-remote <name>
Runs against branches discovered from the named remote instead of using only local branches.
Example:
aynig run --dwp-remote origin--role <name>
Prefers role-specific commands from .dwp/roles/<name>/command when present.
Example:
aynig run --role reviewer--current-branch <mode>
Controls how the current branch is handled. Supported values are skip
(default), include, and only.
Example:
aynig run --current-branch include--log-level <level>
Sets the runner log level. Supported values are debug, info, warn, and
error.
Example:
aynig run --log-level debugExamples
Run with the default local-branch behavior:
aynig runRun with a specific role:
aynig run --role reviewerRun against remote branches:
aynig run --dwp-remote originRun only the current branch:
aynig run --current-branch onlyRun with a custom worktree directory and verbose logging:
aynig run --worktree .aynig-worktrees --log-level debugUse the environment variable form for role selection:
AYNIG_ROLE=reviewer aynig run