@assetopt/cli
v1.2.0
Published
Command-line tool to optimize images, CSS, JS and SVG assets — open source, MIT.
Maintainers
Readme
@assetopt/cli
Command-line tool to optimize images, CSS, JS and SVG assets — open source, MIT.
🌐 Landing page & live demo → — overview, before/after gallery, and a downloadable demo pack to try assetopt yourself.
Install
npm install -g @assetopt/cli
# or as a project dev dependency
npm install --save-dev @assetopt/cliQuick start
# Generate a default .assetoptrc
assetopt init
# Dry-run: report potential savings without writing anything
assetopt analyze ./public
# Optimize for real (writes to ./optimized/ by default)
assetopt optimize ./publicCommands
| Command | Effect |
| ------------------------- | ----------------------------------------------------------- |
| assetopt optimize [dir] | Optimize and write results to output.dir |
| assetopt analyze [dir] | Dry-run: report savings without writing files |
| assetopt audit [dir] | Flag problematic assets (oversized, optimization potential) |
| assetopt init | Create a default .assetoptrc |
| assetopt clean | Remove the cache (or the whole output dir with --all) |
Run assetopt <command> --help to see every flag and option.
Documentation
For workflows, configuration reference, and the full feature catalog, see the project repository:
- Landing page — project overview, before/after gallery, and a downloadable demo pack
- Recommended workflows — three integration patterns (CI pre-deploy, hand-written static site, asset prep)
- CLI reference — every command, flag, and exit code
- Configuration reference — every
.assetoptrcfield - FAQ — common objections and edge cases
For the programmatic API, see @assetopt/core.
License
MIT.
