npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

favigen

v1.2.0

Published

A fast and easy-to-use CLI tool to generate favicons and icons for web apps from a single image.

Readme

Favigen - Favicon Generator CLI

🎨 A modern command-line tool to generate favicons, PNG icons, web manifest, and browser configuration files for your web projects.

Now supports output to any directory on your filesystem!

✨ Features

  • 🎯 Flexible Output Paths: Generate files anywhere on your filesystem
  • 🖼️ Multiple Formats: Generates favicon.ico and PNG icons in various sizes
  • 🎨 Smart Theme Detection: Automatically detects theme color from input image
  • 📱 PWA Ready: Generates site.webmanifest for Progressive Web App support
  • 🪟 Windows Tiles: Creates browserconfig.xml for Microsoft browsers
  • 🔧 Multiple Input Formats: Supports PNG, JPEG, and WebP input formats
  • 👀 Preview Mode: Dry-run mode for testing without writing files
  • 🛡️ Safe Operations: Smart path validation with user confirmation for external directories
  • 💬 Enhanced UX: Beautiful console output with clear progress indicators

Installation

npm install -g favigen

Or install locally in your project:

npm install favigen

🚀 Usage

favigen -i <input-file> [options]

📋 Options

Required

  • -i, --input <file>: Source image file (PNG/JPEG/WebP recommended)
    • Supports absolute and relative paths

Optional

  • -o, --output <dir>: Output directory (default: "icons")
    • NEW: Supports any filesystem path!
    • Examples: ./icons, /home/user/assets, C:\assets
  • -s, --sizes <list>: Comma-separated icon sizes for PNG generation
    • Default: "16,32,48,64,128,256,180,150,70"
  • -y, --yes: Auto-confirm all prompts (overwrite files, external paths)
  • --dry-run: Preview operations without writing files
  • --manifest: Generate site.webmanifest for PWA support
  • --browserconfig: Generate browserconfig.xml for Windows tiles
  • --app-name <name>: Application name for manifest files (default: "App")
  • --theme-color <color>: Theme color (hex) for manifest/browserconfig
    • Auto-detected from image if not specified

💡 Examples

Basic Usage

# Generate in current directory
favigen -i logo.png

# Generate in specific local directory
favigen -i logo.png -o ./assets/icons

Cross-Filesystem Generation

# Generate to absolute path (Linux/Mac)
favigen -i logo.png -o /home/user/website/assets/icons

# Generate to absolute path (Windows)
favigen -i logo.png -o "C:\Projects\MyWebsite\assets\icons"

# Generate to network drive
favigen -i logo.png -o "\\server\share\website\icons"

Advanced Usage

# Full PWA setup with custom theme
favigen -i logo.png -o ./public/icons --manifest --browserconfig --app-name "My App" --theme-color "#ff6b6b"

# Preview without writing files
favigen -i logo.png -o /var/www/html/icons --dry-run

# Auto-confirm all prompts
favigen -i logo.png -o ../shared/assets --yes

# Custom sizes only
favigen -i logo.png -s "16,32,64,128" -o ./favicons

🛡️ Security & Safety

The enhanced version includes several safety features:

  • Path Validation: Validates input and output paths before processing
  • External Path Confirmation: Prompts for confirmation when outputting outside current directory
  • Dry Run Mode: Preview operations without making changes
  • Auto-confirm Option: Use --yes flag to skip prompts in automated scripts
  • Clear Feedback: Shows resolved absolute paths before processing

🔧 Migration from Previous Versions

If you're upgrading from an earlier version:

  • Breaking Change: Output paths are no longer restricted to the current working directory
  • New Behavior: External paths will prompt for confirmation (unless using --yes)
  • Enhanced UX: Better console output and error messages
  • Backward Compatible: All existing commands continue to work as before

📁 Generated Files

The tool generates the following files in your specified output directory:

  • favicon.ico - Multi-resolution ICO file for browsers
  • icon-{size}x{size}.png - PNG icons in specified sizes
  • site.webmanifest - Web app manifest (with --manifest flag)
  • browserconfig.xml - Microsoft browser configuration (with --browserconfig flag)

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📄 License

ISC License - see LICENSE file for details.