Skip to content

Add CLI Auto Best and target-size parity - #11

Merged
SLP-DEV1 merged 4 commits into
mainfrom
feat/cli-auto-best-target-size
Aug 26, 2026
Merged

Add CLI Auto Best and target-size parity#11
SLP-DEV1 merged 4 commits into
mainfrom
feat/cli-auto-best-target-size

Conversation

@SLP-DEV1

Copy link
Copy Markdown
Owner

Summary

Bring the local CLI much closer to the GUI for the two highest-value compression workflows.

Auto Best

  • add --auto-best
  • mirror the GUI candidate strategy: WebP + JPEG for non-alpha images, WebP + PNG for alpha images
  • include an explicit --format as an additional candidate when it is not already part of the set
  • choose the smallest local candidate
  • expose candidate size/format/quality/dimensions in JSON output

Target size

  • add --target-size-kb <KB> plus --target-size <KB> alias
  • mirror the GUI's up-to-seven-step quality search from quality 1 through the preferred quality
  • return the highest JPG/WebP quality that reaches the requested target when possible
  • report targetBytes and targetReached in CLI output/JSON
  • allow Auto Best + target-size to be combined

Validation

CI now:

  • syntax-checks the CLI
  • performs the existing real WebP smoke test
  • creates a noisy JPEG fixture and verifies target-size output is <= 20 KB with targetReached: true
  • runs Auto Best and verifies multiple candidates plus an Auto Best selection are returned
  • runs strict TypeScript and the production build

Docs

README examples/options/roadmap now reflect the new CLI capabilities and keep reSmush.it/Auto Compare clearly GUI-only.

@SLP-DEV1
SLP-DEV1 merged commit c8d1b41 into main Aug 26, 2026
1 check passed
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