Installation
Install the CLI globally using npm to access the `appicon` command from anywhere on your system.
# Install globally
npm install -g @zorthana/appiconUsage
Point the CLI to your source image (preferably a 1024x1024 PNG). It processes everything locally via `sharp`.
# Generate both iOS and Android icons in the current directory appicon input.png # Generate ONLY Android icons appicon input.png --android # Generate ONLY iOS icons appicon input.png --ios # Output to a specific directory appicon input.png --output ./my-assetsOptions
- -i, --ios: Generate only iOS AppIcon.appiconset
- -a, --android: Generate only Android mipmap folders
- -b, --both: Generate both iOS and Android icons (default)
- -o, --output <dir>: Output directory (defaults to current directory)
Output Structure
The CLI creates an `ios` directory containing the `AppIcon.appiconset` and an `android` directory containing the standard `mipmap-*` folders and a `playstore-icon.png`.
CI/CD & npm scripts
You can run the generator without installing by using `npx`:
# Run via npx
npx @zorthana/appicon logo.png