Back to browse
GitHub Repository

Export Apple SF Symbols as SVG

63 starsSwift

Sfsym – Export Apple SF Symbols as Vector SVG/PDF/PNG

by olliewagner·Apr 18, 2026·29 points·10 comments

AI Analysis

●●SolidWizardryNiche GemShip It

Extracts exact vector paths from private macOS APIs instead of tracing rasters.

Strengths
  • Private ivar access gets true vector geometry, not approximated traces.
  • Reads Assets.car BOM tree so symbol list stays current automatically.
  • Machine-readable CLI schema enables easy integration with AI agents.
Weaknesses
  • Relies on private APIs that could break in future macOS updates.
  • macOS only, limiting utility for cross-platform design workflows.
Target Audience

macOS developers, designers, AI agent builders

Similar To

SF Symbols App · react-sf-symbols · sf-symbols-svg

Post Description

I found myself reaching for SF Symbols' 'Copy Image As…' quite often during agentic design sessions, so I made a command-line tool that the agent can use by itself. It exports Apple SF Symbols as SVG, PDF, or PNG.

The vector paths come directly from macOS's symbol renderer. Internally it reaches a private ivar on NSSymbolImageRep to get the CUINamedVectorGlyph, draws into a CGPDFContext, then walks the PDF content stream back out as SVG `d` commands. The output matches what the system draws, rather than an approximation traced from rasters.

A few things about it:

- Every subcommand accepts `--json`, and `sfsym schema` returns a machine-readable description of the whole CLI. - Symbol enumeration reads the OS's Assets.car BOM tree, so the list of 8,300+ names stays current with macOS updates without a version table in the binary. - Each SVG `<path>` carries a `data-layer` attribute, so you can retheme in CSS without touching geometry.

It's been saving me a bunch of clicking. Please let me know if you have any other ideas for it.

Similar Projects