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

JSON Commands

Documents flags for browsing, downloading, and updating Iconify sets from the npm registry.

The json group downloads and maintains Iconify icon set files from npm. The typical workflow is browse, download, then update. Downloaded files are consumed by JsonCollectionProvider at runtime, so JSON management happens at development time, not in production.

When to use these commands

Starting a new project: Browse available sets with json browse to explore the catalog. Pick the ones the project needs, then download them with json download. The files land in ./resources/json/ by default, ready for JsonCollectionProvider.

Ongoing maintenance: Run json update periodically (or as part of a CI step) to pull newer versions from npm. Use --dry-run to check for updates without downloading.

json download

Download one or more Iconify JSON sets from the npm registry. Each set is saved as <prefix>.json in the destination directory and recorded in the swarm-icons.json manifest.

Terminal window
swarm-icons json download lucide tabler heroicons

With no arguments and no --all flag, the command re-downloads every set listed in the existing swarm-icons.json manifest. If no manifest exists, it prints the popular sets list instead.

Download all popular sets at once:

Terminal window
swarm-icons json download --all

List popular sets with their download status:

Terminal window
swarm-icons json download --list

Flags

Flag Short Type Default Description
--all bool false Download all popular sets
--list -l bool false List popular sets with download status
--dest -d string ./resources/json/ Destination directory

The popular sets list includes: bi, bx, carbon, fa6-brands, fa6-regular, fa6-solid, flowbite, fluent, heroicons, icon-park-outline, iconoir, ion, line-md, lucide, mdi, mingcute, octicon, ph, ri, simple-icons, solar, tabler, uil.

json update

Compare locally downloaded icon set versions against the latest npm registry versions and update outdated sets.

Terminal window
swarm-icons json update

Check for updates without downloading:

Terminal window
swarm-icons json update --dry-run

Update specific sets only:

Terminal window
swarm-icons json update lucide tabler

Flags

Flag Short Type Default Description
--dry-run bool false Check for updates without downloading
--dest -d string ./resources/json/ Destination directory

With no positional arguments, the command updates every set in the manifest. Pass specific prefixes to update a subset.

json browse

Fetch the full Iconify collection index and display it as a paginated table. The DL column shows * for sets already downloaded locally.

Terminal window
swarm-icons json browse

Filter by prefix, name, or category:

Terminal window
swarm-icons json browse --search weather

The output is paginated. After each page, the terminal prompts Continue? (yes/no) [yes]. Press Enter to continue or type no to stop.

Flags

Flag Short Type Default Description
--search -s string Filter by prefix, name, or category (case-insensitive)
--page-size -n int 30 Number of rows per page

See also

Edit this page

Last updated: