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.
swarm-icons json download lucide tabler heroiconsWith 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:
swarm-icons json download --allList popular sets with their download status:
swarm-icons json download --listFlags
| 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.
swarm-icons json updateCheck for updates without downloading:
swarm-icons json update --dry-runUpdate specific sets only:
swarm-icons json update lucide tablerFlags
| 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.
swarm-icons json browseFilter by prefix, name, or category:
swarm-icons json browse --search weatherThe 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
- JSON Collection Provider: use downloaded JSON files at runtime with
NewJsonCollectionProvider - Init & Manifest: create the project manifest and generate icon name indexes