Command line usage
IconGenerator includes a command line interface (CLI) designed for batch generation and automation. It is especially useful for developers who want to rebuild icon assets as part of a build script or CI pipeline.
You can use the CLI to generate all icon files defined in a collection document (.AXICP) without using the UI.
Open the command line help
From the UI
A built-in help page is available from the main menu:
From a terminal
Run the executable with /h or --help to print the usage:
icongenerator --help
Note
Depending on your installation, the executable may be named IconGenerator or IconGenerator.exe.
The examples in this page use icongenerator for readability.
If the command is not in your PATH, call it using a full path to the executable.
Basic syntax
The CLI uses a single command with multiple options.
Usage: IconGenerator [/h] [--verbose] [/g <AXICP-file>] [/d <destination-folder>] [/hp] [/svg]
[/xaml] [/resdir] [/wpf] [/ps] [/eps] [/pdf] [/font] [/css] [/fn <font-name>] [/fi <first-char-index>]
[/png] [/bmp] [/bmp24] [/jpg] [/ico] [/icns] [/s1x] [/s125x] [/s15x] [/s2x] [/s3x] [/s4x] [/s5x]
[/s10x] [/s16p] [/s20p] [/s24p] [/s32p] [/s40p] [/s48p] [/s60p] [/s64p] [/s80p] [/s96p] [/s128p]
[/s256p] [/s512p] [/s768p] [/s1024p] [/s2048p] [/sf] [/ghd] [/gis] [/dm] [/ic <#color>]
[/oc <#color>] [document-files...]
Conceptually, a CLI generation run is:
Choose a source collection (
.AXICP).Choose a destination folder.
Choose one or more output formats.
(If exporting raster formats) choose one or more sizes.
Choose optional behaviors (subfolders, strips, hot/disabled, dark mode, colorization).
Tip
A single run can generate multiple formats at once (for example /svg /xaml /png).
Arguments, quoting, and paths
Paths and spaces
If a file or folder path contains spaces, wrap it in quotes:
icongenerator -g "C:\My Project\icons.axicp" -d "D:\Build Output\icons" /svg
Windows vs macOS/Linux path separators
Windows paths commonly use backslashes:
C:\icons\output.macOS/Linux paths use forward slashes:
/Users/name/icons/output.
Note
The CLI accepts quoted paths on all platforms.
Colors and shell quoting
Color arguments use HTML hex syntax (#RRGGBB). In some shells, the # character starts a comment.
PowerShell: quote the value (for example
"#33FF99")bash/zsh (macOS/Linux): quote the value (for example
'#33FF99')
Example:
icongenerator -g c:\coll.axicp -d d:\icons /svg /ic "#33FF99" /oc "#33FF99"
Command reference
General options
/h,--helpShow the help message.
--verboseGenerate verbose log messages (useful for debugging scripts).
Input and destination
/g <file>,--generate-collection=<file>Collection file (
.AXICP) to generate./d <folder>,--destination-folder=<folder>Destination folder where icon files are written.
/hp,--hide-progressHide the progress window (recommended for unattended runs).
Vector output formats
/svg,--format-svgOutput format: Scalable Vector Graphics (
*.SVG)./xaml,--format-xamlOutput format: Microsoft XAML (
*.XAML)./resdir,--resource-directoryGenerate XAML in a resource directory. Use with
/xaml./wpf,--wpf-geometryGenerate XAML in a resource directory using WPF geometry. Use with
/xamland/resdir./ps,--format-psOutput format: PostScript vector (
*.PS). Requires Inkscape (see Export formats and options)./eps,--format-epsOutput format: Encapsulated PostScript vector (
*.EPS). Requires Inkscape./pdf,--format-pdfOutput format: Adobe PDF vector (
*.PDF). Requires Inkscape.
Font output
/font,--format-fontOutput format: Font vector (
*.EOT,*.TTF,*.WOFF,*.OTF…). Requires FontForge (see Export formats and options)./css,--format-font-cssCreate CSS with font icons (use with
/font)./fn <name>,--font-name=<name>Specify the font name.
/fi <index>,--font-index=<index>Specify the font first icon index. The index can usually be specified in decimal, or in hexadecimal (for example
xE000).
Bitmap output formats
/png,--format-pngOutput format: PNG raster (
*.PNG), 32bpp with alpha transparency./bmp,--format-bmpOutput format: Windows BMP raster (
*.BMP), 32bpp with alpha transparency./bmp24,--format-bmp24Output format: Windows BMP raster (
*.BMP), 24bpp no transparency./jpg,--format-jpegOutput format: JPEG raster (
*.JPG), 24bpp no transparency.
Platform icon containers
/ico,--format-icoOutput format: Windows icon (
*.ICO)./icns,--format-icnsOutput format: macOS icon (
*.ICNS).
Raster sizes (scales)
Use these options to generate raster sizes based on the icon set’s native size.
/s1x,--size-1xScale 1:1 (100%)
/s125x,--size-125xScale 1.25:1 (125%)
/s15x,--size-15xScale 1.5:1 (150%)
/s2x,--size-2xScale 2:1 (200%)
/s3x,--size-3xScale 3:1 (300%)
/s4x,--size-4xScale 4:1 (400%)
/s5x,--size-5xScale 5:1 (500%)
/s10x,--size-10xScale 10:1 (1000%)
Raster sizes (fixed pixels)
Use these options to generate exact raster sizes in pixels.
/s16p,--size-16p16×16
/s20p,--size-20p20×20
/s24p,--size-24p24×24
/s32p,--size-32p32×32
/s40p,--size-40p40×40
/s48p,--size-48p48×48
/s60p,--size-60p60×60
/s64p,--size-64p64×64
/s80p,--size-80p80×80
/s96p,--size-96p96×96
/s128p,--size-128p128×128
/s256p,--size-256p256×256
/s512p,--size-512p512×512
/s768p,--size-768p768×768
/s1024p,--size-1024p1024×1024
/s2048p,--size-2048p2048×2048
Raster generation options
/sf,--raster-subfoldersCreate a subfolder for each raster image size.
/ghd,--raster-hot-disabledGenerate hot and disabled raster images.
/gis,--raster-image-stripGenerate raster image strips (PNG, JPG, BMP).
Dark mode and colorization
/dm,--dark-modeForce dark mode generation of icons (vector and raster). (See also Make Icons for Dark Mode for the UI workflow.)
/ic <#color>,--icon-colorization=<#color>Icon colorization value for vector and raster outputs. Use HTML hex color syntax (
#RRGGBB)./oc <#color>,--overlay-colorization=<#color>Overlay colorization value for vector and raster outputs. Use HTML hex color syntax (
#RRGGBB).
Optional document files
[document-files...]You can optionally pass one or more document files at the end of the command line. IconGenerator opens them when it starts (useful if you want to launch the UI on a specific document). For batch generation, prefer using
/gwith a collection file.
Usage examples
Generate SVG from a collection
Generate collection file c:\coll.axicp to folder d:\icons (Windows backslashes). SVG vector files will be generated:
icongenerator -g c:\coll.axicp -d d:\icons /svg
Generate SVG, XAML and PS
icongenerator -g c:\coll.axicp -d d:\icons /svg /xaml /ps
Generate XAML in resource directory using WPF geometry
icongenerator -g c:\coll.axicp -d d:\icons /xaml --resource-directory --wpf-geometry
Generate a font with CSS
Generate FONT files with CSS. Font name is myfont. First character index is xE000 (can be specified as decimal too):
icongenerator -g c:\coll.axicp -d d:\icons /font /css /fn myfont /fi xE000
Generate PNG and BMP at multiple scales
Generate PNG and BMP files at scale 100%, 125%, 150%, 200% and 400%:
icongenerator -g c:\coll.axicp -d d:\icons /png /bmp /s1x /s125x /s15x /s2x /s4x
Generate PNG at fixed sizes (with subfolders)
Generate PNG files at fixed sizes 32×32, 48×48, 64×64, 128×128, 256×256. Create subfolders for each size:
icongenerator -g c:\coll.axicp -d d:\icons /png /s32p /s48p /s64p /s128p /s256p /sf
Generate SVG in dark mode
icongenerator -g c:\coll.axicp -d d:\icons /svg --dark-mode
Generate SVG colorized (icon and overlay)
Colorize with color #33FF99 (icon and overlay):
icongenerator -g c:\coll.axicp -d d:\icons /svg /ic "#33FF99" /oc "#33FF99"
Important
In PowerShell and macOS/Linux shells, always quote #RRGGBB values.
Scripting notes (Windows)
Wait for completion in a BAT script
Under Windows, if you launch the process using start, use /wait to wait until the generation ends
before continuing your script:
@echo off
start /wait icongenerator -g "C:\icons\coll.axicp" -d "D:\build\icons" /svg /png /s32p /s64p /sf
if errorlevel 1 (
echo Icon generation failed.
exit /b 1
)
PowerShell example
In PowerShell, you can call the executable and check $LASTEXITCODE:
& icongenerator -g "C:\icons\coll.axicp" -d "D:\build\icons" /svg /png /s32p /s64p /sf --verbose --hide-progress
if ($LASTEXITCODE -ne 0) {
throw "IconGenerator failed with exit code $LASTEXITCODE"
}
macOS/Linux shell example
icongenerator -g "/Users/me/icons/coll.axicp" -d "/Users/me/build/icons" /svg /png /s32p /s64p /sf --hide-progress
status=$?
if [ $status -ne 0 ]; then
echo "IconGenerator failed with exit code $status"
exit $status
fi