{"id":43981718,"url":"https://github.com/macadmins/icongrabber","last_synced_at":"2026-02-07T09:04:12.505Z","repository":{"id":332622024,"uuid":"1108454926","full_name":"macadmins/icongrabber","owner":"macadmins","description":"A fast, lightweight command-line tool to extract high-quality icons from macOS applications","archived":false,"fork":false,"pushed_at":"2026-01-14T17:31:09.000Z","size":148,"stargazers_count":31,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-14T21:34:32.488Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/macadmins.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","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},"funding":{"github":"macadmins"}},"created_at":"2025-12-02T13:23:46.000Z","updated_at":"2026-01-14T17:31:00.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/macadmins/icongrabber","commit_stats":null,"previous_names":["macadmins/icongrabber"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/macadmins/icongrabber","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macadmins%2Ficongrabber","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macadmins%2Ficongrabber/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macadmins%2Ficongrabber/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macadmins%2Ficongrabber/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/macadmins","download_url":"https://codeload.github.com/macadmins/icongrabber/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macadmins%2Ficongrabber/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29190842,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T07:37:03.739Z","status":"ssl_error","status_checked_at":"2026-02-07T07:37:03.029Z","response_time":63,"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":[],"created_at":"2026-02-07T09:04:12.440Z","updated_at":"2026-02-07T09:04:12.499Z","avatar_url":"https://github.com/macadmins.png","language":"Swift","funding_links":["https://github.com/sponsors/macadmins"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# Icon Grabber\n\n**A fast, simple command-line tool to extract high-quality icons from macOS applications.**\n\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)\n[![Platform](https://img.shields.io/badge/platform-macOS-lightgrey.svg)](https://www.apple.com/macos/)\n[![Swift](https://img.shields.io/badge/Swift-5.9+-orange.svg)](https://swift.org)\n[![CI Tests](https://github.com/macadmins/icongrabber/workflows/CI%20Tests/badge.svg)](https://github.com/macadmins/icongrabber/actions)\n\n---\n\n**Found this tool helpful?** Consider [sponsoring the project](https://github.com/sponsors/macadmins) to support ongoing development and maintenance. Your support helps keep Icon Grabber free and open source for everyone!\n\n[![GitHub Sponsors](https://img.shields.io/github/sponsors/macadmins?logo=github\u0026color=ea4aaa\u0026style=for-the-badge)](https://github.com/sponsors/macadmins)\n\n\u003c/div\u003e\n\n## Requirements\n\n- **macOS 15 (Sequoia) or later**\n\n## Features\n\n- **Simple \u0026 Fast** - Extract icons with a single command\n- **Flexible Sizing** - Get icons in any size from 16x16 to 1024x1024\n- **High Quality** - Preserves original icon quality in PNG format\n- **File Size Optimization** - Limit output file size using sips compression\n- **Scriptable** - Perfect for automation and batch processing\n- **Native** - Written in Swift, lightweight, no dependencies\n\n## Installation\n\n### Download Release (Recommended)\n\nDownload the latest installer from [Releases](https://github.com/macadmins/icongrabber/releases):\n\n```bash\n# Download the latest PKG installer\ncurl -LO $(curl -s https://api.github.com/repos/macadmins/icongrabber/releases/latest | grep \"browser_download_url.*\\.pkg\" | cut -d '\"' -f 4)\n\n# Or if you know the latest version number, use:\n# curl -LO https://github.com/macadmins/icongrabber/releases/latest/download/icongrabber-VERSION.pkg\n\n# Install\nsudo installer -pkg icongrabber-*.pkg -target /\n\n# Verify installation\nicongrabber --version\n```\n\n### Build from Source\n\n```bash\n# Clone the repository\ngit clone https://github.com/kitzy/icongrabber.git\ncd icongrabber\n\n# Build and install system-wide\nmake build\nsudo make install\n\n# Or install to your home directory (no sudo required)\nmake build\nmake install PREFIX=$HOME/.local\nexport PATH=\"$HOME/.local/bin:$PATH\" # Add to ~/.zshrc\n```\n\n## Quick Start\n\nExtract an icon in less than 30 seconds:\n\n```bash\n# Extract Safari's icon (creates Safari.png)\nicongrabber /Applications/Safari.app\n\n# Custom size\nicongrabber /Applications/Safari.app -s 256\n\n# Custom output location\nicongrabber /Applications/Safari.app -o ~/Desktop/my-icon.png\n\n# Limit file size to 100KB\nicongrabber /Applications/Safari.app -m 100KB\n\n# Limit file size to 2MB\nicongrabber /Applications/Safari.app -m 2M\n\n# Force overwrite existing file\nicongrabber /Applications/Safari.app -f\n```\n\nThat's it! \n\n## Usage\n\n### Basic Usage\n\n```bash\nicongrabber \u003capp-path\u003e [options]\n```\n\n### Options\n\n| Option | Description | Example |\n|--------|-------------|---------|\n| `-s, --size \u003cpixels\u003e` | Icon size (default: 512) | `-s 256` |\n| `-o, --output \u003cpath\u003e` | Output file path | `-o icon.png` |\n| `-i, --input \u003cpath\u003e` | Input app path (alternative) | `-i /Applications/Safari.app` |\n| `-m, --max-file-size \u003csize\u003e` | Max file size (optimizes with sips) | `-m 100KB` or `-m 2M` |\n| `-f, --force` | Overwrite existing files without prompting | `-f` |\n| `-h, --help` | Show help message | `-h` |\n| `-v, --version` | Show version | `-v` |\n\n### Common Sizes\n\n- **16x16** - Toolbar icons, favicons\n- **32x32** - Small UI elements\n- **64x64** - List views, thumbnails\n- **128x128** - Standard app icons\n- **256x256** - Retina displays\n- **512x512** - High-resolution (default)\n- **1024x1024** - Maximum quality\n\n## Examples\n\n### Extract a Single Icon\n\n```bash\n# Get Safari's icon at 512x512\nicongrabber /Applications/Safari.app\n```\n\n### Specify Output Location\n\n```bash\n# Save to a specific location\nicongrabber /Applications/Safari.app -o ~/Desktop/safari-icon.png\n```\n\n### Custom Size\n\n```bash\n# Get a 256x256 icon\nicongrabber /Applications/Safari.app -s 256 -o small-icon.png\n```\n\n### Optimize File Size\n\n```bash\n# Extract icon and limit file size to 100KB (auto-selects 256x256)\nicongrabber /Applications/Safari.app -m 100KB\n\n# Limit to 2MB using shorthand (auto-selects 1024x1024)\nicongrabber /Applications/Safari.app -m 2M\n\n# Combine with custom size for better optimization (manual size selection)\nicongrabber /Applications/Safari.app -s 256 -m 50K -o optimized.png\n```\n\n### Multiple Sizes\n\n```bash\n# Extract multiple sizes for the same app\n./examples/extract_multiple_sizes.sh /Applications/Safari.app\n```\n\n### Batch Processing\n\n```bash\n# Extract icons from all applications\n./examples/batch_extract.sh\n```\n\n### Automation Script\n\n```bash\n#!/bin/bash\n# Extract icon and use it in your workflow\nif icongrabber /Applications/MyApp.app -o assets/icon.png -s 512; then\n    echo \"✓ Icon extracted successfully\"\n    # Do something with the icon\n    convert assets/icon.png -resize 64x64 assets/icon-small.png\nfi\n```\n\n## Output\n\n### Default Naming\n\nIcons are automatically named based on the app name (spaces removed):\n\n| Application | Output File |\n|-------------|-------------|\n| Safari.app | `Safari.png` |\n| Visual Studio Code.app | `VisualStudioCode.png` |\n| Calculator.app | `Calculator.png` |\n\n### Custom Naming\n\nUse `-o` to specify your own filename:\n\n```bash\nicongrabber /Applications/Safari.app -o my-custom-name.png\n```\n\n## Development\n\n### Build from Source\n\n```bash\n# Clone the repository\ngit clone https://github.com/macadmins/icongrabber.git\ncd icongrabber\n\n# Build\nmake build\n\n# Run locally\n./bin/icongrabber /Applications/Safari.app\n```\n\n### Run Tests\n\n```bash\n# Run the full test suite\nmake test\n\n# Tests include:\n# - Basic icon extraction\n# - Multiple sizes (16, 32, 64, 128, 256, 512, 1024)\n# - Custom output paths\n# - Error handling\n# - CLI argument parsing\n```\n\nSee [tests/README.md](tests/README.md) for detailed test documentation.\n\n### Clean Build Artifacts\n\n```bash\nmake clean\n```\n\n### Continuous Integration\n\nThe project uses GitHub Actions for automated testing:\n- Integration tests on every PR\n- Multi-version testing (macOS 15, latest)\n- Installation verification\n- Swift syntax checking\n\nView the [CI workflow](.github/workflows/ci.yml) for details.\n\n## Documentation\n\n- [Contributing Guide](CONTRIBUTING.md) - How to contribute\n- [Release Guide](.github/RELEASE_GUIDE.md) - For maintainers: creating releases\n- [Test Documentation](tests/README.md) - Test suite details\n- [Scripts Documentation](scripts/README.md) - Helper scripts\n- Man Page - `man icongrabber` (after installation)\n\n## FAQ\n\n**Q: What formats are supported?** \nA: Currently PNG format only. Icons are extracted at the highest quality available.\n\n**Q: How does the file size optimization work?**\nA: The `--max-file-size` option uses macOS's built-in `sips` tool to compress the icon by converting to JPEG with varying quality levels, then back to PNG. This reduces file size while maintaining reasonable visual quality. You can specify sizes like `100KB`, `100K`, `2MB`, or `2M` (case-insensitive). If you don't specify an icon size with `-s`, the tool will automatically select an appropriate size based on your file size target.\n\n**Q: What if an app doesn't have an icon?** \nA: The tool will exit with an error code and display an error message.\n\n**Q: Can I use this in my build scripts?** \nA: Absolutely! The tool returns proper exit codes (0 for success, non-zero for errors) for easy integration.\n\n**Q: Does this work with paths containing spaces?** \nA: Yes! Just wrap the path in quotes: `icongrabber \"/Applications/Visual Studio Code.app\"`\n\n**Q: Can I use `~` in paths?** \nA: Yes, tilde expansion is supported: `icongrabber ~/Applications/MyApp.app`\n\n## Contributing\n\nContributions are welcome! Feel free to:\n\n- Report bugs\n- Suggest features\n- Submit pull requests\n- Improve documentation\n\nPlease see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.\n\n## License\n\nThis project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.\n\n## Acknowledgments\n\nBuilt with Swift and AppKit for the macOS community.\n\n---\n\n**Made with ❤️ for macOS administrators, developers and designers**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacadmins%2Ficongrabber","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmacadmins%2Ficongrabber","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacadmins%2Ficongrabber/lists"}