Linux command
sfsym 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Install
brew install yapstudios/tap/sfsym
Export a symbol as SVG
sfsym export [heart.fill] -o [heart.svg]
Export a PNG
sfsym export [star.fill] --color [#FFD60A] --size [48] -o [star.png]
Render a palette (multi-color) symbol
sfsym export [person.2.fill] --mode [palette] --palette [#4F46E5,#22D3EE] -o [out.svg]
List every available symbol
sfsym list
Search the catalogue
sfsym list --search [magnifyingglass]
Browse symbols in a category
sfsym list --category [weather] --limit [10]
Batch-process many exports from stdin
cat [jobs.txt] | sfsym batch
说明
sfsym is a command-line tool that renders Apple's SF Symbols directly through the operating-system symbol renderer, no Xcode required. It produces crisp SVG, PDF, or PNG assets in any weight, mode, color, or size supported by the system — useful for design pipelines, documentation generation, icon build steps, and web exports. The tool bundles a universal binary that runs on Apple Silicon and Intel Macs, so it can be dropped into CI. For batch workflows the batch subcommand accepts stdin requests and reaches roughly 800 exports per second because it reuses a single rendering context. Machine-readable metadata is available through info, modes, and schema, making sfsym easy to wrap from scripts and editor plugins.
参数
- -f _FORMAT_
- Force output format: _svg_, _pdf_, or _png_.
- --mode _MODE_
- Rendering mode: _monochrome_, _hierarchical_, _palette_, _multicolor_.
- --weight _WEIGHT_
- Font weight of the symbol: _ultralight_, _thin_, _light_, _regular_, _medium_, _semibold_, _bold_, _heavy_, _black_.
- --size _N_
- Canvas size in points (1–2048). PNG output uses 2× pixel density.
- --color _HEX_|_NAME_
- Primary color. Accepts short and long hex (_#RGB_, _#RRGGBB_, _#RRGGBBAA_) or a named system color.
- --palette _C1,C2,..._
- Comma-separated palette colors used with --mode palette.
- -o _PATH_
- Output file; - writes to stdout.
- --json
- Produce structured output for info/list/schema.
FAQ
What is the sfsym command used for?
sfsym is a command-line tool that renders Apple's SF Symbols directly through the operating-system symbol renderer, no Xcode required. It produces crisp SVG, PDF, or PNG assets in any weight, mode, color, or size supported by the system — useful for design pipelines, documentation generation, icon build steps, and web exports. The tool bundles a universal binary that runs on Apple Silicon and Intel Macs, so it can be dropped into CI. For batch workflows the batch subcommand accepts stdin requests and reaches roughly 800 exports per second because it reuses a single rendering context. Machine-readable metadata is available through info, modes, and schema, making sfsym easy to wrap from scripts and editor plugins.
How do I run a basic sfsym example?
Run `brew install yapstudios/tap/sfsym` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -f _FORMAT_ do in sfsym?
Force output format: _svg_, _pdf_, or _png_.