Skip to content

"--dry-run" flag for generation paths #17

@LeeSinLiang

Description

@LeeSinLiang

--dry-run flag for generation paths

Summary
Add a --dry-run flag to show what CommitLM would generate without writing files or modifying commit messages.

Scope

  • commitlm generate --dry-run prints the synthesized commit message and/or doc path + preview.
  • Respect in hooks via env var COMMITLM_DRY_RUN=1 (no file writes).

Tasks

  • Wire flag at CLI and pass through to generators.
  • Ensure no writes and exit code 0.
  • Add examples to README.

Acceptance criteria

  • Running with --dry-run never creates/changes files.
  • Output includes which provider/model would be used.

Test plan
Stage a change; run commitlm generate --dry-run and verify only stdout changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions