denji import
Bulk-add icons from a file or stdin
Bulk-add multiple icons at once from a JSON manifest, a plain text file, or stdin. Complements denji export for migrating icon sets between projects.
Usage
denji import [file] [options]Arguments
file
Path to a .json manifest (from denji export) or a .txt file with one prefix:name per line.
When omitted, icons are read from stdin.
Options
--dry-run
Preview which icons would be added without writing any files.
denji import icons.json --dry-runInput Formats
JSON Manifest
A manifest file produced by denji export:
denji import denji-export.jsonIcons without a source field are skipped automatically.
Text File
One Iconify identifier per line:
mdi:home
lucide:check
lucide:arrow-rightdenji import icons.txtStdin
echo "mdi:home\nlucide:check" | denji import
# Or pipe from denji export
denji export | denji import --dry-runExamples
Migrate icons from another project:
# In the source project
denji export --output icons.json
# In the target project
denji import icons.jsonBulk-add from a curated list:
denji import icons.txtPreview before importing:
denji import icons.json --dry-runBehavior
- Invalid icon identifiers (missing
prefix:nameformat) are skipped with a warning - All the same validations from
denji addapply (includingallowedLibrariesrestrictions) - Hooks (
preAdd,postAdd) run as normal unless--dry-runis set - Duplicate icons are updated in place (same behavior as
denji add)
denji import uses the same logic as denji add internally. All config options, framework settings, and hooks behave identically.