{"id":45948611,"url":"https://github.com/andmitr/favicon-generator-cli","last_synced_at":"2026-03-13T16:01:38.856Z","repository":{"id":296675730,"uuid":"992376056","full_name":"andmitr/favicon-generator-cli","owner":"andmitr","description":"A Node.js CLI tool that generates a full set of favicons from PNG and SVG source images. Outputs optimized icons in multiple sizes and formats (ICO, Apple Touch Icon, Android Chrome, etc.) ready for cross-browser use.","archived":false,"fork":false,"pushed_at":"2026-03-08T04:39:55.000Z","size":32,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-03-08T09:51:11.776Z","etag":null,"topics":["cli","favicon","icons","image-processing","nodejs","tools","utility"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andmitr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-05-29T04:00:15.000Z","updated_at":"2026-03-08T04:44:00.000Z","dependencies_parsed_at":"2025-10-23T16:43:39.448Z","dependency_job_id":null,"html_url":"https://github.com/andmitr/favicon-generator-cli","commit_stats":null,"previous_names":["theevilgrinch/favicon-generator-cli","reabat/favicon-generator-cli","andmitr/favicon-generator-cli"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/andmitr/favicon-generator-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andmitr%2Ffavicon-generator-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andmitr%2Ffavicon-generator-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andmitr%2Ffavicon-generator-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andmitr%2Ffavicon-generator-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andmitr","download_url":"https://codeload.github.com/andmitr/favicon-generator-cli/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andmitr%2Ffavicon-generator-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30468020,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-13T11:00:43.441Z","status":"ssl_error","status_checked_at":"2026-03-13T11:00:23.173Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","favicon","icons","image-processing","nodejs","tools","utility"],"created_at":"2026-02-28T11:58:51.303Z","updated_at":"2026-03-13T16:01:38.849Z","avatar_url":"https://github.com/andmitr.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Favicon Generator CLI\n\nA Node.js CLI tool that generates a full set of favicons from PNG and SVG source images. Outputs optimized icons in \nmultiple sizes and formats (ICO, Apple Touch Icon, Android Chrome, etc.) ready for cross-browser use.\n\n[![License](https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square\u0026logo=opensource)](LICENSE) \n\n[![npm version](https://img.shields.io/npm/v/favicon-generator-cli?style=flat-square\u0026logo=npm)](https://www.npmjs.com/package/favicon-generator-cli)\n[![Docker](https://img.shields.io/badge/ghcr.io-container-blue?style=flat-square\u0026logo=docker)](https://github.com/andmitr/favicon-generator-cli/pkgs/container/favicon-generator-cli)\n\n## Table of Contents\n\n- [Features](#features)\n- [Dependencies](#dependencies)\n- [Installation](#installation)\n- [Usage](#usage)\n- [Sponsorship](#sponsorship)\n- [License](#license)\n\n## Features\n\n- **Generated files:**\n  - `favicon.ico` (multi-size: 16px, 32px, 48px, 256px from PNG)\n  - `favicon.svg` (optimized from source SVG)\n  - `favicon-16x16.png`\n  - `favicon-32x32.png`\n  - `favicon-48x48.png`\n  - `apple-touch-icon.png` (180×180px)\n  - `icon-192.png` and `icon-512.png` (for Android/PWA manifest)\n- **PNG and SVG input:** Accepts both formats as source material. Defaults\n  to `./favicon_src.png` and `./favicon_src.svg`.\n- **Image optimization:** Uses `sharp` for PNG resizing,\n  `imagemin` + `imagemin-pngquant` for PNG compression, `svgo` for SVG\n  optimization, and `png2icons` for ICO generation.\n- **Custom output directory:** Specify an output path with `--dist`, or let\n  the tool create a `favicons_xxxx` directory in the current working directory.\n- **CLI arguments:** Simple command-line interface with `--help` for usage\n  details.\n- **Error handling:** Reports missing source files and image processing\n  failures.\n\n\u003e **Note:** This tool does not generate a 512×512 maskable icon for PWA\n\u003e safe-zone compliance. This must be created separately using a tool\n\u003e like [maskable.app](https://maskable.app/editor). Make sure your PWA\n\u003e manifest references the maskable icon alongside other icons.\n\n## Dependencies\n\n- [Node.js](https://nodejs.org/) v24 LTS (tested and recommended version, specified in `.nvmrc`)\n- Docker (if you choose to run the tool via container)\n- npm packages (installed automatically with the tool):\n  - imagemin \n  - imagemin-pngquant\n  - sharp\n  - svgo\n  - png2icons\n  \n## Installation\n\n### From npm\n\n```bash\nsudo npm install -g favicon-generator-cli\n```\n\n### From GitHub\n\n```bash\nsudo npm install -g git+https://github.com/andmitr/favicon-generator-cli.git\n```\n\n### From Docker Registry (GitHub Container Registry)\n\n```bash\ndocker pull ghcr.io/andmitr/favicon-generator-cli:latest\n```\n\nTo use a shorter image name locally, create a tag:\n\n```shell\ndocker tag ghcr.io/andmitr/favicon-generator-cli:latest favgen\n```\n\n### Uninstall\n\n```bash\nsudo npm uninstall -g favicon-generator-cli\n```\n\n### Troubleshooting: libvips conflict\n\nIf you have libvips installed system-wide, sharp installation may fail. Use SHARP_IGNORE_GLOBAL_LIBVIPS=1 to bypass it:\n\n```bash\n# From npm\nsudo SHARP_IGNORE_GLOBAL_LIBVIPS=1 npm install -g favicon-generator-cli\n\n# From GitHub\nsudo SHARP_IGNORE_GLOBAL_LIBVIPS=1 npm install -g git+https://github.com/andmitr/favicon-generator-cli.git\n\n# Run without installation\nSHARP_IGNORE_GLOBAL_LIBVIPS=1 npx --package=favicon-generator-cli favgen\n```\n\n## Usage\n\n```bash\nfavgen [--png \u003cpath\u003e] [--svg \u003cpath\u003e] [--dist \u003coutput-dir\u003e]\n```\n\n### Docker \n\n```bash\ndocker run --rm -v \"$PWD:/app\" ghcr.io/andmitr/favicon-generator-cli:latest [--png \u003cpath\u003e] [--svg \u003cpath\u003e] [--dist \u003coutput-dir\u003e]\n```\n\nIf you created the local favgen image tag:\n\n```shell\ndocker run --rm -v \"$PWD:/app\" favgen [--png \u003cpath\u003e] [--svg \u003cpath\u003e] [--dist \u003coutput-dir\u003e]\n```\n\n#### Shortcuts (Alias)\n\nTo avoid typing the long Docker command every time, add this alias to your ~/.bashrc or ~/.zshrc:\n\n```shell\nalias favgend='docker run --rm -v \"$PWD:/app\" ghcr.io/andmitr/favicon-generator-cli:latest'\n```\n\nThen you can use it just like the native command:\n\n```shell\nfavgend --help\nfavgend --dist favicons\n```\n\n### Run without installation\n\n```bash\nnpx --package=favicon-generator-cli favgen [--png \u003cpath\u003e] [--svg \u003cpath\u003e] [--dist \u003coutput-dir\u003e]\n```\n\n### Arguments\n\n| Argument | Alias | Default           | Description                          |\n|----------|-------|-------------------|--------------------------------------|\n| --png    | -p    | ./favicon_src.png | Path to the source PNG image         |\n| --svg    | -s    | ./favicon_src.svg | Path to the source SVG image         |\n| --dist   | -d    | ./favicons_xxxx   | Output directory for generated files |\n| --help   | -h    | —                 | Show help message and exit           |\n\n### Examples\n```bash\n# Custom source files and output directory\nfavgen --png ./myicon.png --svg ./myicon.svg --dist ./favs\n\n# Default source files, custom output directory\nfavgen --dist icons\n```\n\n### HTML Usage\n\nAdd the generated favicons to the `\u003chead\u003e` of your HTML:\n```html\n\u003clink rel=\"icon\" href=\"/favicon.ico\" type=\"image/x-icon\"\u003e\n\u003clink rel=\"icon\" href=\"/favicon.svg\" sizes=\"any\" type=\"image/svg+xml\"\u003e\n\u003clink rel=\"icon\" href=\"/favicon-16x16.png\" sizes=\"16x16\" type=\"image/png\"\u003e\n\u003clink rel=\"icon\" href=\"/favicon-32x32.png\" sizes=\"32x32\" type=\"image/png\"\u003e\n\u003clink rel=\"icon\" href=\"/favicon-48x48.png\" sizes=\"48x48\" type=\"image/png\"\u003e\n\u003clink rel=\"apple-touch-icon\" href=\"/apple-touch-icon.png\" type=\"image/png\"\u003e\n\u003clink rel=\"manifest\" href=\"/manifest.webmanifest\"\u003e\n```\nReference `icon-192.png` and `icon-512.png` in your `manifest.webmanifest`.\n\n## Sponsorship\n\n[![Boosty](https://img.shields.io/badge/Boosty-F15F2C?style=for-the-badge\u0026logo=boosty\u0026logoColor=white)![Support](https://img.shields.io/badge/Support%20me-grey?style=for-the-badge)](https://boosty.to/andmitr/donate)\n\n![Bitcoin](https://img.shields.io/badge/Bitcoin-F7931A?style=flat\u0026logo=bitcoin\u0026logoColor=white\u0026logoSize=auto)\n\n```\n1CCnwAvJYEoDVGM7vsBg2Q99cF9EHtBVaY\n```\n\n![Tether](https://img.shields.io/badge/Tether%20(USDT%20ETH)-168363?style=flat\u0026logo=tether\u0026logoColor=white\u0026logoSize=auto)\n\n```\n0x54f0ccc6b2987de454f69f2814fc9202bcfb74fe\n```\n\n## License\n\nMIT Licensed. See [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandmitr%2Ffavicon-generator-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandmitr%2Ffavicon-generator-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandmitr%2Ffavicon-generator-cli/lists"}