Three modules, each with its own go.mod. Install only what the project needs.
Requirements
go-swarm-icons requires Go 1.25.0 or later.
Core module
The core module contains the icon manager, all four providers, the renderer, the fluent Icon API, and the SVG sanitization pipeline. It has no external dependencies beyond the Go standard library.
go get github.com/frostybee/go-swarm-icons@latestImport it with the swarmicons alias:
import swarmicons "github.com/frostybee/go-swarm-icons"Lucide submodule
The Lucide submodule bundles an embedded Iconify JSON collection containing ~1,500 Lucide icons (~800 KB). It depends on the core module.
go get github.com/frostybee/go-swarm-icons/lucide@latestimport "github.com/frostybee/go-swarm-icons/lucide"Goldmark submodule
The Goldmark submodule adds inline :icon[prefix:name] syntax to Goldmark-processed Markdown. It depends on the core module and github.com/yuin/goldmark.
go get github.com/frostybee/go-swarm-icons/goldmark@latestImport it with the swarmgoldmark alias:
import swarmgoldmark "github.com/frostybee/go-swarm-icons/goldmark"Which modules to install
- Directory-based SVGs, no Markdown: the core module is enough.
- Embedded Lucide icons: core + Lucide submodule.
- Other Iconify sets (Tabler, Heroicons, ...): core module + the CLI tool below to download the sets.
- Markdown icon syntax: core + Goldmark submodule (and optionally Lucide).
CLI tool
The swarm-icons binary is the recommended way to add icon sets beyond Lucide. It browses, downloads, and updates any Iconify set from the npm registry, with no Node.js required, producing JSON files ready for JsonCollectionProvider. It is a separate Go module and is not required by any library import.
go install github.com/frostybee/go-swarm-icons/cmd/swarm-icons@latestFor the full command reference, see CLI Reference. For a step-by-step walkthrough of adding icon sets, see Working with Icon Sets.
What's next
- Quick Start: create a manager, resolve an icon, and render it to HTML
- Core Concepts: understand providers, prefixes, and attribute layers
- CLI Reference: browse, download, search, and export icon sets from the terminal