Scour
$ scour Community Low RiskScour is a Python SVG optimizer and cleaner that strips editor metadata, unused definitions, redundant precision, and XML prologs to produce smaller, cleaner SVG files. It runs headlessly via -i/-o files or stdin/stdout (--quiet suppresses summary stderr output).
brew install scour Local SVG cleanup and minification with scour runs directly on workspace assets without MCP overhead.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Headless -i/-o/stdin execution with --quiet and clean exit codes, though no --json stats output.
- Non-interactive
-i/-oand stdout piping with--quiet
100% offline XML/SVG cleaner with separate -i input and -o output paths.
- Reads
-iand writes-o(or stdout) without network access
Installable across macOS, Linux, and Windows via brew install scour, pip, or uvx scour.
- Available via Homebrew, PyPI, and
uvx
Reliable SVG cleaner in Python environments, though svgo is often preferred in Node-heavy frontend stacks.
- Strips editor metadata, comments, and redundant attributes cleanly
Mature community tool (scour-project/scour) with rare upstream updates.
- Stable, slow-moving codebase on GitHub
Clear --help output and GitHub wiki documenting optimization flags.
- Wiki and
--helpreference
Security, Auth & Guardrails
None required; operates strictly on local SVG XML files or stdin.
100% free, offline, and Apache-2.0 open-source.
# Scour Agent Rules - Always write to a distinct `-o out.svg` path (or omit `-o` to inspect stdout) rather than overwriting source art. - Pass `--quiet` when capturing stdout so optimization stats do not mix with SVG XML.
Agent-Ready Command Recipes
Safe Read-Only Queries
scour -i in.svg --quiet --enable-viewboxing
Emits the cleaned SVG to stdout with --quiet so in.svg remains untouched.
Controlled Writes & Previews
scour -i in.svg -o out.svg --enable-viewboxing --strip-xml-prolog
Removes Inkscape/editor metadata and XML prologs while writing the result to out.svg.
Strengths for Agents
- + Outputs cleaned SVG to stdout by default when
-ois omitted, enabling safe inspection. - + Zero-Node install via
brew install scouroruvx scour. - + Effectively strips Inkscape/Illustrator metadata and XML prologs.
Caveats & Pitfalls
- ! No
--jsonsavings report; optimization summaries are plain text unless silenced with--quiet. - ! Upstream maintenance cadence is very slow compared to
svgo.