Skip to main content
go-swarm-icons
On this page

CLI Reference

Summarizes CLI installation and links to every command group's detailed reference page.

The swarm-icons binary manages Iconify icon sets from the terminal. Browse the catalog, download JSON files, search and export icons, and generate manifests, all without Node.js.

When to use the CLI

The CLI is a development-time companion to the go-swarm-icons library. It handles three workflows:

  • Building a local icon library: Browse the full Iconify catalog with json browse, download the sets a project needs with json download, and keep them current with json update. The downloaded JSON files feed JsonCollectionProvider at runtime.

  • Exploring and exporting icons: Search sets by keyword with icon search, list everything in a prefix with icon list, and export individual SVGs with icon export for use with DirectoryProvider or as standalone assets.

  • Project setup and tooling: Scaffold a starter configuration with init, pre-warm the Iconify API cache for offline builds with cache warm, and generate icon name manifests for build pipelines with manifest generate.

Installation

The CLI is a separate Go module. It is not required by any library import.

Terminal window
go install github.com/frostybee/go-swarm-icons/cmd/swarm-icons@latest

Verify the installation:

Terminal window
swarm-icons --help

Commands

Command Description
init Generate a starter Go configuration file
json download Download Iconify JSON sets from the npm registry
json update Check for and apply updates to downloaded sets
json browse Browse all available Iconify icon sets
icon export Export icons as individual SVG files
icon list List available icons from a directory, JSON set, or the API
icon search Search for icons by name within an icon set
cache warm Pre-fetch icons from the Iconify API and cache them on disk
cache clear Clear the icon cache directory
manifest generate Generate a JSON manifest of icon names from a directory

See also

Edit this page

Last updated: