Skip to main content

Dry Run

Dry Run

Recommended First Step

Resolve and preview supported operations before allowing Custy to change files, Git history, or remotes.

Commandcusty --dry-run COMMAND

Category

Core Concepts

Quick Command

custy --dry-run COMMAND [OPTIONS]

simulationsafetypreview

Overview​

Dry-run mode lets Custy resolve a command and report supported operations without performing their normal mutations. It is the recommended first step for commands and profiles that can edit project files, stage changes, create Git history, or push to remotes.

How the Effective Mode Is Resolved

Custy resolves dry-run behavior in this order: an explicit CLI option, the tool.custy.cli.execution.dry_run project setting, and finally the built-in default of false. This means omitting --dry-run does not necessarily enable normal execution when the project configuration already sets dry_run = true.

Choose preview or normal execution explicitly
bash
# Force preview mode, regardless of the configured default
custy --dry-run changelog generate

# Force normal execution, even when dry_run = true in configuration

custy --no-dry-run changelog generate

What Dry Run Changes

Dry run suppresses supported mutations, but it still does enough real work to resolve and validate the requested operation.

Simulation Boundary

Project Writes

Supported version, changelog, artifact, and backup writes are previewed instead of applied.

Git Mutations

Supported staging, commit, tag, and push operations are reported without normal execution.

Discovery and Reads

Configuration, project files, repository state, history, tags, and remotes can still be inspected.

Validation

Prerequisite and repository checks still run and can stop the preview with a useful error.

Resolution

Profiles, versions, paths, templates, and destinations are still resolved where the selected flow requires them.

Review

The output becomes a plan for checking what normal execution intends to do.

A Safe Preview Sequence

Dry-Run Review

1
Inspect repository state
Review git status, the current branch, local tags, and configured remotes.
current
2
Run the dry preview
Place --dry-run before the selected Custy command.
pending
3
Read resolved values
Confirm project paths, profile stages, version values, tags, and destinations.
pending
4
Resolve reported errors
Fix invalid configuration, missing resources, or repository prerequisites.
pending
5
Decide whether to execute
Run normally only when every intended effect and destination is understood.
pending
Preview common operations
bash
# Preview changelog content without replacing CHANGELOG.md
custy --dry-run changelog generate

# Preview the daily development pipeline

custy --dry-run run dev

# Preview the complete release pipeline

custy --dry-run run release


After the Preview

Before normal execution:

  • confirm the selected command or profile is the smallest one that reaches the intended result;
  • review paths, generated content, commit and tag messages, and every remote;
  • make sure the working tree contains only changes you intend Custy to include;
  • keep recovery information or backups when the operation can rewrite files or create history; and
  • inspect the working tree, commit, tags, and remotes again after execution.

Continue