SVGO CLI

The CLI reduces SVG files using configurable rules so an agent can prepare lighter vector assets for a project.

  • 22,811 ★ on the repository
  • Last commit
  • MIT
CLI

Extended access

Why this level

  • The CLI changes SVG files, while configuration and custom plugins execute JavaScript.
All reasons and checks

svg/svgo

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add cli/svgo

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • The CLI changes SVG files, while configuration and custom plugins execute JavaScript.

This is third-party code. Review the repository files before installing.

What it does

SVGO removes redundant data left in SVG files by vector editors. An agent can process individual files or directories through the terminal and write output separately. Plugins control optimization. Users can keep the default preset or override selected rules and formatting. After processing, the agent can compare file sizes and present the images for visual inspection.

Who it is for. Frontend developers and designers reducing SVG assets exported by vector editors.

Good fit when

  • Editor-generated SVGs contain redundant data.
  • An agent should create lighter icon copies in a separate directory.
  • The team needs reproducible optimization settings.
  • A release needs size and appearance comparison before replacing assets.

Not a fit when

  • Files must remain byte-for-byte unchanged.
  • SVG rendering cannot be checked after structural changes.
  • The task concerns raster JPEG or PNG compression.

Example request

Optimize the test SVG folder into a separate directory and show size and visual differences before replacement.

Limitations

The package requires Node.js 16 or later, so check the installed runtime before starting. Plugins can alter SVG structure and identifiers; inspect settings when CSS or scripts reference elements. The CLI writes results to selected paths, so preserve originals and use a separate output directory initially. Custom plugins and configuration execute JavaScript; inspect unfamiliar configuration before running it.

How to disable. Remove SVGO from build scripts and restore originals from backups or Git. Uninstalling the CLI does not restore overwritten files.

FAQ

Where are rules configured?

In `svgo.config.mjs` or a file selected with `--config`.

Can it process nested folders?

Yes. Use recursive processing with `-r` and select the folder with `-f`.

How do I keep output separate?

Choose an output file or directory with `-o`.

Can I disable one default rule?

Yes. Override or disable the selected plugin within the default preset configuration.

Where are the flags documented?

Run `svgo --help`.

Discussion

No questions or reviews yet.

CLI tools
Official

An MCP server and skill for a set of thousands of brand SVG icons: the agent searches and inserts icons with no key

MCP serverExtended access3KRepository stars

A skill for the Vite SVG sprite plugin: setup, configuration, Vue and React components, SSR and migration from the old plugin.

SkillMinimal access117Repository stars

Search and drop in icons from 150+ Iconify collections as an MCP server, CLI and skill, writing SVG straight into the project

MCP serverExtended access1.5KRepository stars

A design studio for people and agents: dsa CLI, MCP endpoint and skill to edit layouts, slides, reports and 3D together.

CLIExtended access229Repository stars

A skill that draws logos in SVG: a brand interview, three to five concepts side by side, refinement and PNG export in seven sizes

SkillExtended access200Repository stars

Visant skills for Claude Code: anti-AI-slop UI audit, design, motion and copy decisions, video editing and website showreels

SkillExtended access89Repository stars

README in short

SVGO supports multiple optimization passes and custom plugins, with a programmatic API alongside its CLI.

README badge

Report a problem