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:

  • Help ‣ Command Line Usage…

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:

  1. Choose a source collection (.AXICP).

  2. Choose a destination folder.

  3. Choose one or more output formats.

  4. (If exporting raster formats) choose one or more sizes.

  5. 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, --help

Show the help message.

--verbose

Generate 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-progress

Hide the progress window (recommended for unattended runs).

Vector output formats

/svg, --format-svg

Output format: Scalable Vector Graphics (*.SVG).

/xaml, --format-xaml

Output format: Microsoft XAML (*.XAML).

/resdir, --resource-directory

Generate XAML in a resource directory. Use with /xaml.

/wpf, --wpf-geometry

Generate XAML in a resource directory using WPF geometry. Use with /xaml and /resdir.

/ps, --format-ps

Output format: PostScript vector (*.PS). Requires Inkscape (see Export formats and options).

/eps, --format-eps

Output format: Encapsulated PostScript vector (*.EPS). Requires Inkscape.

/pdf, --format-pdf

Output format: Adobe PDF vector (*.PDF). Requires Inkscape.

Font output

/font, --format-font

Output format: Font vector (*.EOT, *.TTF, *.WOFF, *.OTF…). Requires FontForge (see Export formats and options).

/css, --format-font-css

Create 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-png

Output format: PNG raster (*.PNG), 32bpp with alpha transparency.

/bmp, --format-bmp

Output format: Windows BMP raster (*.BMP), 32bpp with alpha transparency.

/bmp24, --format-bmp24

Output format: Windows BMP raster (*.BMP), 24bpp no transparency.

/jpg, --format-jpeg

Output format: JPEG raster (*.JPG), 24bpp no transparency.

Platform icon containers

/ico, --format-ico

Output format: Windows icon (*.ICO).

/icns, --format-icns

Output format: macOS icon (*.ICNS).

Raster sizes (scales)

Use these options to generate raster sizes based on the icon set’s native size.

/s1x, --size-1x

Scale 1:1 (100%)

/s125x, --size-125x

Scale 1.25:1 (125%)

/s15x, --size-15x

Scale 1.5:1 (150%)

/s2x, --size-2x

Scale 2:1 (200%)

/s3x, --size-3x

Scale 3:1 (300%)

/s4x, --size-4x

Scale 4:1 (400%)

/s5x, --size-5x

Scale 5:1 (500%)

/s10x, --size-10x

Scale 10:1 (1000%)

Raster sizes (fixed pixels)

Use these options to generate exact raster sizes in pixels.

/s16p, --size-16p

16×16

/s20p, --size-20p

20×20

/s24p, --size-24p

24×24

/s32p, --size-32p

32×32

/s40p, --size-40p

40×40

/s48p, --size-48p

48×48

/s60p, --size-60p

60×60

/s64p, --size-64p

64×64

/s80p, --size-80p

80×80

/s96p, --size-96p

96×96

/s128p, --size-128p

128×128

/s256p, --size-256p

256×256

/s512p, --size-512p

512×512

/s768p, --size-768p

768×768

/s1024p, --size-1024p

1024×1024

/s2048p, --size-2048p

2048×2048

Raster generation options

/sf, --raster-subfolders

Create a subfolder for each raster image size.

/ghd, --raster-hot-disabled

Generate hot and disabled raster images.

/gis, --raster-image-strip

Generate raster image strips (PNG, JPG, BMP).

Dark mode and colorization

/dm, --dark-mode

Force 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 /g with 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