Free · Offline · MIT licensed · Rust CLI + MCP

svgbool — Free Open-Source SVG Boolean Operations CLI for AI Agents

svgbool — Figma Boolean Ops for AI Agents: Union, subtract, intersect and exclude closed SVG paths from one pipe spec. Skip hand-writing path data that is usually wrong — build a logo mark in one command with 14.2x fewer tokens. Offline, fast, and free.

Install in one minute — see the install commands below. Source and README: github.com/creatorops-studio/svgbool. 100% local — no network calls at all in the free build.

Works on SVG paths only — it never reads .fig files and never claims to be Figma.

One pipe spec, one logo mark

rect(10,10,180,180) | union circle(100,100,110) | offset 6 | save("logo.svg") — shapes, booleans, offset, transforms and save in a single line an agent can write without doing geometry in its head.

# 1. Build a logo mark: square union a circle, offset out 6, save it
svgbool run "rect(10,10,180,180) | union circle(100,100,110) | offset 6 | save(\"logo.svg\")"

# 2. Boolean on two existing files instead
svgbool boolean --op difference --a base.svg --b cutout.svg -o result.svg

# 3. Check a file before you trust it
svgbool validate logo.svg

# 4. Built-in templates: logo, icon, badge
svgbool template

Shapes: rect(x, y, w, h), circle(cx, cy, r), ellipse(cx, cy, rx, ry), polygon(x1, y1, …), path("d…"), load("file.svg"). Ops: union / intersect / difference / xor with a shape, offset 4, smooth / exact, translate 5, 5, scale 2, rotate 45, save("out.svg").

Curves are flattened at a configurable tolerance (default 0.25) for the boolean and re-fit as smooth Béziers on output; sharp corners are preserved exactly as lines. The result is an approximation within the flatten tolerance — not bit-exact curve preservation. If you need exact Bézier booleans, this tool is not that.

A validator that refuses to write a broken file

validate reports degenerate subpaths, self-intersecting rings and collapsed offsets as machine-readable JSON, and every boolean/offset that would produce an invalid result is refused — nothing is written, the caller keeps its original file.

Install in one minute

Install straight from GitHub with a Rust toolchain (cargo) — the crate is not on crates.io yet:

cargo install --git https://github.com/creatorops-studio/svgbool

Prefer a ready-made binary? Download the Release v0.1.0 binary for Linux x86_64 (1,508,752 B) from github.com/creatorops-studio/svgbool/releases/tag/v0.1.0.

Measured numbers, not marketing

Measured 5 December 2026 on Linux x86_64, release build, with svgbool benchmark. Each boolean was run 3 times and the range is shown — timings bounce run to run on this shared VM (cold first runs are slower), the token ratio does not. Tokens ≈ characters / 4 (standard approximation); the hand-written path is the flattened boolean-result path data of the sample logo, generated from the real output of the same spec and kept verbatim in examples/logo-hand-path.txt so the comparison is reproducible.

What was measuredResult
Token cost for one logo mark15 tokens (DSL spec) vs 213 tokens (hand-written flattened path) — 14.2× saving
Boolean + offset (logo spec: rect ∪ circle r=110, offset 6)0.09–0.26 ms
Peak RSS3,804–3,912 KB (~3.8 MB)
Binary size (release, stripped)1,508,752 B (1.44 MiB)

The token saving (14.2×) is measured on the sample logo in this repo; your mileage varies with the shape — a plain rectangle saves nothing, a complex mark saves more. Near-coincident edge cases and complex-arc exactness are documented limits: the boolean is an approximation within the flatten tolerance (default 0.25 units), never promised 100% exact.

Built for AI agents first

MCP server with four tools (boolean, offset, validate, run_dsl). Add this to your MCP config — no Figma, no browser, no cloud:

{
  "mcpServers": {
    "svgbool": {
      "command": "svgbool",
      "args": ["mcp"]
    }
  }
}

A logo mark that used to cost an agent 213 tokens of hand-written flattened path data now costs 15 tokens of DSL spec (14.2× saving, measured — see the repo README for the full benchmark). Example agent flow: run_dsl with a pipe spec (15 tokens, measured) → validate to confirm zero errors.

Built with: Rust, a single static binary, and an MCP server — clap + serde_json + geo + roxmltree.

Free, offline, MIT

Single static binary (1.44 MiB), no cloud, no account. Free core is 80% of a real logo/icon assembler; Pro (coming later, $10–29/month) adds an icon preset library, batch processing, stroke booleans and a Cloud API.

Frequently asked questions

Is svgbool really free?

Yes — MIT licensed, free core forever. Pro is a separate paid tier for presets/batch/API features.

Does it work offline?

Yes. 100% local; no network calls at all in the free build.

Does it keep my curves exact?

No — curves are flattened at a configurable tolerance (default 0.25) for the boolean and re-fit as smooth Béziers; sharp corners are preserved exactly. The README states this limit honestly.

Does it parse .fig files?

No — it works on SVG paths only, by design. (It also never claims to be Figma.)

How do I use it with Claude Code?

Add the MCP server block from the repo README to your MCP config; the agent gets boolean, offset, validate, run_dsl.

How do I install it?

Run cargo install --git https://github.com/creatorops-studio/svgbool (needs a Rust toolchain), or download the Release v0.1.0 binary for Linux x86_64 (1,508,752 B) from the v0.1.0 release. The crate is not on crates.io yet.

Build a logo mark in one command.

Free, offline, MIT licensed — get the source on GitHub. Works on SVG paths only — never claims to be Figma.