Hacker News Viewer

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

by olliewagner on 4/18/2026, 3:44:54 AM

I found myself reaching for SF Symbols&#x27; &#x27;Copy Image As…&#x27; 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.<p>The vector paths come directly from macOS&#x27;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.<p>A few things about it:<p>- Every subcommand accepts `--json`, and `sfsym schema` returns a machine-readable description of the whole CLI. - Symbol enumeration reads the OS&#x27;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 `&lt;path&gt;` carries a `data-layer` attribute, so you can retheme in CSS without touching geometry.<p>It&#x27;s been saving me a bunch of clicking. Please let me know if you have any other ideas for it.

https://github.com/yapstudios/sfsym

Comments

by: tasoeur

This is great! I found myself asking my AI agents to generate those icons every so often (esp. for websites), so thank you for taking the time to build this.<p>Quick question, are you also planning on supporting animations?

4/18/2026, 10:37:45 AM