daydream
Daydream CLI docs

CLI reference

Use daydream --help-all for all review options and daydream COMMAND --help for subsystem options. The command parsers define accepted values and combinations. A bare target, no arguments, or a leading option selects review. TARGET names a Git worktree root. Without TARGET, review prompts with the current directory as the default.

Review modes

Default mode offers fixes. When a pull request (PR) exists, default mode also offers to post the review. With accepted fixes, Daydream runs canonical tests, commits, pushes, and checks remote continuous integration (CI). Before fixes, commit or unstage existing staged changes. Configure the canonical test command before accepting fixes.

ModeResult
--reviewWrites a report without posting, fixes, or tests.
--commentPosts a PR review without fixes or tests.
--diagram-only KINDPosts a standalone PR diagram comment.
--shallowSelects shallow review.

--review, --comment, and --diagram-only are mutually exclusive. Comment and diagram-only modes require a PR. Diagram kinds are auto, sequence, flowchart, and both. --diagram KIND adds diagrams to a review and also accepts off, the default. --diagram cannot accompany --diagram-only. --flow NAME selects an extension flow and cannot accompany --review, --comment, --diagram-only, or --shallow.

Select work

OptionBehavior
--branch BRANCHFetches and reviews origin/BRANCH in a detached temporary worktree.
--base REFSets the comparison base. Default: PR base, then repository default branch.
--worktreeCreates a detached temporary worktree at local HEAD.
--stack STACKOverrides automatic stack detection.
--ignore-path PATHExcludes a path from the diff. Repeatable.

Without --branch, review uses local HEAD. See Configuration for model selection and temporary-worktree support files. See Integration for findings artifacts and separate PR publication.

Unattended runs

--non-interactive uses each prompt's unattended default. A nonterminal input or enabled CI selects this mode automatically. Unattended runs decline fixes unless --yes is set. --yes accepts eligible fix, post, commit, and cleanup gates. --yes cannot accompany --review, --comment, or --diagram-only. A test failure writes handoff.md and returns failure. See Troubleshooting for recovery.

Resume and cleanup

Use --start-at STAGE on the same target and diff:

StageAction
reviewStarts a review. Default.
tttStarts intent and alternative analysis.
per-stackReuses intent analysis and restarts stack reviews.
mergeReuses parsed findings.
fixReuses merged findings.

Every resume processes exploration before the selected stage. Daydream validates the saved diff identity and required evidence. Shallow runs support only review and fix. Diagram-only runs do not support resuming.

--cleanup removes the root report after an eligible successful run. --no-cleanup retains the report. Without either flag, --yes removes the report after success. Otherwise, interactive runs ask and unattended runs retain the report. Failures and findings-artifact runs retain the report.

Bounded search and exit statuses

daydream search PATTERN ROOT... searches fixed text in tracked and nonignored untracked files below the current directory. Repeat --expand PATH to include named ignored paths, with a concrete --reason QUESTION. Output uses JavaScript Object Notation (JSON). Search status 2 indicates incomplete scans, skipped files, or invalid scope.

Review returns 0 for success or no work, 1 for failure, 2 for argument errors, and 130 for interruption. Improve and benchmark document their status exceptions.

Back to Daydream