Skip to content

Improve CLI defaults and handling - #18

Merged
j9t merged 1 commit into
mainfrom
feat/cli-guidance
Nov 12, 2026
Merged

j9t merged 1 commit into
mainfrom
feat/cli-guidance

Conversation

@j9t

@j9t j9t commented Nov 12, 2026 •

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features
    • Preview zero-config processing with --zero --dry without modifying files. The preview reports processing options, file and total statistics, and cache statistics.
  • Improvements
    • Interactive terminal input now explains how to end input and choose file or directory processing.
    • Dry-run and verbose modes suggest the comprehensive preset when no minification options are set.
  • Documentation
    • Updated the README and changelog with zero-config preview behavior and related options.

Let `--zero --dry` and terminal-only `--dry` preview zero-config directory processing without prompting or writing files. Add STDIN guidance for terminal input and suggest `--preset=comprehensive` when dry or verbose runs have no minification options.

(This commit message was AI-generated.)
@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The CLI now previews zero-config processing with --zero --dry or --dry without input. It also adds terminal stdin instructions and comprehensive-preset suggestions when no minification options are set.

Changes: CLI preview and guidance

Layer / File(s) Summary
Zero-config preview flow
cli.js, README.md, CHANGELOG.md, test/cli.test.js
The CLI accepts --zero with --dry to preview current-directory processing without writing files. The preview reports processing statistics. Help text, documentation, and tests describe and verify this behavior.
Terminal and option guidance
cli.js, CHANGELOG.md, test/cli.test.js
Interactive stdin displays instructions for ending input and choosing a processing mode. Dry-run and verbose output suggest --preset=comprehensive when no minification options are set.

Backtest interrupt message

Layer / File(s) Summary
SIGINT message formatting
backtest/backtest.js
The cleanup message changes from “Ctrl + C” to “Ctrl+C”. Cleanup and exit code behavior are unchanged.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Possibly related PRs

  • j9t/html-minifier#8: Both changes update the CLI’s behavior for terminal stdin without arguments.
Merge Risk: Minimal · up to eb7ff

This change adds a dry-run preview for zero-config mode and clearer terminal guidance. No concrete merge-blocking risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "Improve CLI defaults and handling" is related to the changeset, which changes CLI behavior around zero-config mode, dry-run previews, stdin guidance, and preset suggestions. It is broad, an…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "Improve CLI defaults and handling" is related to the changeset, which changes CLI behavior around zero-config mode, dry-run previews, stdin guidance, and preset suggestions. It is broad, and it does not name the main change (zero-config dry-run preview). It is a real aspect of the change, so the check passes as partially related.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Central YAML; Path: .coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 99d3b51b-2a21-4141-93b2-0f40e24f775f
Commits

Reviewing files that changed from the base of the PR and between 5253403 and eb7ff05.

Files selected for processing: 5

  • CHANGELOG.md
  • README.md
  • backtest/backtest.js
  • cli.js
  • test/cli.test.js

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@j9t
j9t merged commit 0cea97c into main Nov 12, 2026
10 checks passed
@j9t
j9t deleted the feat/cli-guidance branch November 12, 2026 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant