icons-cli
v1.1.1
Published
Generate app icons for all platforms - CLI and SDK
Maintainers
Readme
icons-cli
Generate app icons for all platforms from a single source image.
npx icons-cli pwa logo.pngFeatures
- 26 platforms - iOS, Android, macOS, Windows, PWA, Favicon, plus social media (Twitter/X, Instagram, YouTube, LinkedIn, Facebook, TikTok) and more
- Single source - One image in, all icons out
- Smart defaults - Sensible output directories and filenames
- SDK included - Use programmatically in your build scripts
- Fast - Powered by Sharp for high-performance image processing
Installation
# Use directly with npx
npx icons-cli <provider> <input>
# Or install globally
npm install -g icons-cli
# Or add to your project
npm install icons-cliCLI Usage
icons <provider> <input> [options]Providers
| Provider | Description |
| ----------- | --------------------------------------------------------------- |
| android | Generate Android app icons for Play Store and devices |
| chrome | Generate Chrome/Chromium extension icons |
| discord | Generate Discord bot and server icons |
| electron | Generate Electron app icons for all desktop platforms |
| facebook | Generate profile, cover, and post images for Facebook |
| favicon | Generate favicon bundle (ICO + PNG) |
| firefox | Generate Firefox extension icons |
| instagram | Generate profile, post, and story images for Instagram |
| ios | Generate iOS app icons for iPhone and iPad |
| ipad | Generate iPad app icons for App Store and devices |
| iphone | Generate iPhone app icons for App Store and devices |
| linkedin | Generate profile, banner, and post images for LinkedIn |
| macos | Generate macOS app icons (.icns + appiconset) |
| og | Generate social media preview images |
| pwa | Generate complete PWA icon set with manifest |
| safari | Generate Safari web extension icons |
| slack | Generate Slack app and bot icons |
| tauri | Generate Tauri app icons for all platforms |
| tiktok | Generate profile and video images for TikTok |
| tvos | Generate Apple TV app icons |
| twitter | Generate profile and header images for X (Twitter) |
| vscode | Generate VS Code extension icons |
| watchos | Generate Apple Watch app icons |
| web | Generate basic web icons (favicon + apple-touch) |
| windows | Generate Windows app icons (.ico + tiles) |
| youtube | Generate channel art, profile, and thumbnail images for YouTube |
Options
| Option | Description |
| -------------------- | ------------------------------------------ |
| -o, --output <dir> | Output directory (default: ./<provider>) |
| -z, --zip | Create zip archive |
| -q, --quiet | Suppress all output |
| --dry-run | Preview without writing files |
| -f, --force | Overwrite existing files |
Input Sources
# Local file
icons pwa ./logo.png
# URL
icons pwa https://example.com/logo.png
# Clipboard
icons pwa clipboardExamples
# Generate PWA icons
icons pwa logo.png
# Generate iOS icons to custom directory
icons ios logo.png -o ./assets/ios
# Generate favicon with zip archive
icons favicon logo.png -z
# Preview what would be generated
icons android logo.png --dry-run
# Generate from URL
icons pwa https://example.com/logo.pngSDK Usage
import { icons } from "icons-cli";
// Generate to files
await icons.pwa.generate("logo.png", {
output: "./public",
});
// Generate to buffers (no file I/O)
const buffers = await icons.pwa.generate("logo.png");
// With options
await icons.ios.generate("logo.png", {
output: "./ios-assets",
zip: true,
});SDK Options
| Option | Type | Default | Description |
| --------- | --------- | ----------- | -------------------------------------------- |
| output | string | undefined | Output directory. Returns buffers if not set |
| zip | boolean | false | Create zip archive |
| verbose | boolean | false | Show console output |
| force | boolean | false | Overwrite existing files |
Available Providers
import { icons } from "icons-cli";
// Apple platforms
icons.ios.generate(input, options);
icons.ipad.generate(input, options);
icons.iphone.generate(input, options);
icons.macos.generate(input, options);
icons.tvos.generate(input, options);
icons.watchos.generate(input, options);
// Other platforms
icons.android.generate(input, options);
icons.electron.generate(input, options);
icons.favicon.generate(input, options);
icons.pwa.generate(input, options);
icons.tauri.generate(input, options);
icons.web.generate(input, options);
icons.windows.generate(input, options);
// Browser extensions
icons.chrome.generate(input, options);
icons.firefox.generate(input, options);
icons.safari.generate(input, options);
// Apps
icons.discord.generate(input, options);
icons.og.generate(input, options);
icons.slack.generate(input, options);
icons.vscode.generate(input, options);
// Social Media
icons.facebook.generate(input, options);
icons.instagram.generate(input, options);
icons.linkedin.generate(input, options);
icons.tiktok.generate(input, options);
icons.twitter.generate(input, options);
icons.youtube.generate(input, options);Recommended Input
For best results, use a 1024x1024 PNG with transparency.
| Provider | Recommended Size | | --------------------------------- | ---------------- | | iOS, iPhone, iPad, Android, macOS | 1024x1024 | | watchOS | 1024x1024 | | tvOS | 1280x1280 | | Windows, Electron, Tauri | 1024x1024 | | PWA, Favicon, Web | 512x512 | | Chrome, Firefox, Safari | 128x128 | | VS Code | 256x256 | | Discord, Slack | 512x512 | | OG Images | 1200x630 | | Twitter, LinkedIn, TikTok | 400x400 | | Instagram, Facebook | 1080x1080 | | YouTube | 2560x2560 |
Supported Input Formats
PNG, JPEG, WebP, AVIF, TIFF, GIF, SVG
License
MIT
