onadiet
v0.1.1
Published
Put your files on a diet — the `diet` CLI. Shrink PDFs, images, and folders under a size limit, locally, no upload, safe by default.
Maintainers
Readme
onadiet
Put your files on a diet.
Shrink PDFs, images, and folders under a size limit — locally, on your machine, with no uploads. Safe by default, and it tells you exactly what it did.
[!NOTE] On npm now (
v0.1.0).dietslims PDFs, images, SVGs, and folders end-to-end today (hit a target size, hold a quality floor, honest receipts) — proven against real-file golden corpora. Install withnpm i -g onadiet(ornpx onadiet); it is early (0.x), so the API may still move.brew installis next.
Install
brew install onadiet # macOS — installs the `diet` command
npm i -g onadiet # global; then just `diet …`
npx onadiet report.pdf # zero-install, one-offThe command is diet (with onadiet as an alias).
Use (planned)
diet report.pdf --to 5mb # hit a "goal weight" (--to / --under / --goal)
diet weigh report.pdf # what does it weigh, what's heavy? (no writes)
diet plan report.pdf --to 5mb # dry-run: what it WOULD do
diet check ./public --max 25mb # CI weigh-in: pass/fail a budget, honest exit codes
diet checkup # which engines/codecs are availableQuality is a diet plan, not a raw flag: --plan cleanse | balanced | lowcarb | keto | crash
(lossless → tiny). Everything speaks --json for scripts and agents. Safe by default: never overwrites,
skips anything it would make bigger, writes atomically, refuses to silently break a signed PDF.
Full walkthrough: usage docs. This
CLI is a thin shell over the engine in @onadiet/core.
License
Apache-2.0 © Sharvil Kadam.
