{"_id":"@automatasz/compressor","name":"@automatasz/compressor","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@automatasz/compressor","version":"1.0.0","description":"Batch-compress JPEGs from the terminal: quality, max size, recursive scan, savings estimate, and an interactive before/after comparison viewer.","type":"module","bin":{"compressor":"dist/index.js"},"main":"dist/index.js","exports":{".":"./dist/index.js"},"repository":{"type":"git","url":"git+https://github.com/automatasz/compressor.git"},"license":"MIT","engines":{"node":">=20"},"keywords":["jpeg","jpg","compress","image","cli","sharp"],"scripts":{"build":"tsc -p tsconfig.build.json","start":"bun run src/index.ts","prepublishOnly":"npm run build"},"dependencies":{"sharp":"^0.33.0"},"devDependencies":{"@types/node":"^22.0.0","typescript":"^7.0.2"},"gitHead":"75bd6251eb0195c6439a9da962171880ea00e8a9","_id":"@automatasz/compressor@1.0.0","bugs":{"url":"https://github.com/automatasz/compressor/issues"},"homepage":"https://github.com/automatasz/compressor#readme","_nodeVersion":"24.17.0","_npmVersion":"11.13.0","dist":{"integrity":"sha512-bMPI2vAwE1Q5VACNNTxjJYz65vBJWvWL0OBwhJ3AF6XxJeV11olBItfKHuhhuqgQCXbVBF6Lmtg47NZ7TKitkw==","shasum":"c180c953dce894ab15db138eac761dcbd9ad53de","tarball":"https://registry.npmjs.org/@automatasz/compressor/-/compressor-1.0.0.tgz","fileCount":4,"unpackedSize":22294,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIGsPBBKyEaUTRs53ckMpVa3z5SUiAdSwwnwI2btfSUvXAiEA8lY77EYdn+QugbqCikknXjVvw2yAiS5/4I6RxBLsyYE="}]},"_npmUser":{"name":"automatasz","email":"mataspss@gmail.com"},"directories":{},"maintainers":[{"name":"automatasz","email":"mataspss@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/compressor_1.0.0_1787686902913_0.6992235378019962"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-25T19:41:42.702Z","1.0.0":"2026-08-25T19:41:43.040Z","modified":"2026-08-25T19:41:43.298Z"},"maintainers":[{"name":"automatasz","email":"mataspss@gmail.com"}],"description":"Batch-compress JPEGs from the terminal: quality, max size, recursive scan, savings estimate, and an interactive before/after comparison viewer.","homepage":"https://github.com/automatasz/compressor#readme","keywords":["jpeg","jpg","compress","image","cli","sharp"],"repository":{"type":"git","url":"git+https://github.com/automatasz/compressor.git"},"bugs":{"url":"https://github.com/automatasz/compressor/issues"},"license":"MIT","readme":"# compressor\n\nBatch-compress JPEGs from the terminal. Built on [sharp](https://sharp.pixelplumbing.com/).\n\nScans a directory for `.jpg`/`.jpeg` files, re-encodes them (reduced quality,\nresized to a max edge length), and writes the results to `./compressed/`\npreserving the folder structure. Optionally estimates savings before\ncompressing, or opens an interactive before/after comparison viewer.\n\n## Install\n\n```sh\n# from npm\nnpm install -g @automatasz/compressor\n\n# or run without installing\nnpx @automatasz/compressor\n```\n\nRequires Node.js 20+.\n\n## Usage\n\nRun it in the directory you want to compress:\n\n```sh\ncompressor [options]\n```\n\n| Option | Description |\n| --- | --- |\n| `--quality <n>` | JPEG quality 1–100 (default: `75`) |\n| `--max-size <n>` | Longest edge in pixels (default: `1920`) |\n| `--recursive` | Scan subfolders (default) |\n| `--no-recursive` | Only scan the current folder |\n| `--compare` | Open the visual before/after viewer after compressing |\n| `--estimate` | Estimate savings without compressing all files |\n| `--help` | Show help |\n\n## Examples\n\n```sh\n# Default run in the current directory\ncompressor\n\n# Aggressive compression, no subfolders\ncompressor --quality 60 --max-size 1280 --no-recursive\n\n# See how much you would save first\ncompressor --estimate\n\n# Compress and open the comparison viewer (macOS: `open` is used)\ncompressor --compare\n```\n\nCompressed files land in `./compressed/`, mirroring the source folder layout.\nWith `--compare`, an interactive `comparison.html` is generated there and a\nlocal server is started to view it.\n\n## Development\n\n```sh\nbun install          # install dependencies\nbun run start        # run from source\nnpm run build        # compile TypeScript to dist/\nnpm pack             # dry-run the publishable tarball\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md","_rev":"1-a807446386a476659803125bafa3f82c"}