appicon
Resolves desktop and brand icons to local file paths for use in Waybar, Rofi, scripts, and AI agents via an MCP stdio server with tools for resolve, prefetch, cache, sources, packs, and overrides.
README
appicon
Resolve desktop and brand icons to local file paths — for Waybar, Rofi, scripts, and anything else that needs a real icon file.
appicon resolve firefox
appicon resolve --json --format png --size 24 "VS Code"
appicon resolve --json firefox discord
appicon resolve --offline some-cached-app
appicon resolve --explain missing-app
appicon prefetch firefox discord
appicon prefetch --from-desktop
appicon prefetch --json --offline firefox
appicon override set my-browser firefox
appicon override suggest my-browser
appicon override list
appicon sources get --json
appicon sources set --file ./sources.json
appicon status
appicon cache stats
appicon cache prune
appicon mcp # stdio MCP for agents
appicon daemon # optional user socket daemon
appicon completion bash # print completion script
appicon man | man -l - # view man page
Resolve order (default): file → overrides → XDG / .desktop → SVGL. Fully reorderable via sources.json / sources.yaml / --order — including opt-in simple-icons, dashboard-icons, github, BYOK (logo-dev, iconify, noun-project), glyph, and local packs. See docs/sources.md and docs/packs.md.
XDG, SVGL (cache-first), local packs, opt-in CDN/github/BYOK/glyph stages, PNG rasterization, --offline, cache prune, MCP, optional unix-socket daemon (not on Windows), and shell completions are implemented. Deferred ideas: docs/deferred.md.
Consumer contract: exit 0 / 1 (miss) / 2 (error); stable resolve --json fields (single object or {results:[…]} batch) — docs/consumer-contract.md, schemas docs/resolve-result.schema.json / docs/resolve-batch-result.schema.json. Misses are supported (callers keep glyphs). Auth-skipped BYOK stages show as stage(auth) in --explain tried. Treat appicon like optional peers such as zscroll / cava: never require the binary for a working bar.
Portability: Primary target is Linux (XDG, Flatpak/Snap roots, systemd daemon). macOS/Windows build and run in-process resolve; config/cache fall back to OS user dirs when XDG_* are unset. Daemon refuses on Windows (daemon_supported=false in status).
PNG note: resolve --format png prefers resvg or rsvg-convert on PATH, otherwise a pure-Go oksvg fallback. Rasterized files are cached under $XDG_CACHE_HOME/appicon/raster/.
Theme note: --theme dark|light, APPICON_THEME, or GTK_THEME suffix (Adwaita:dark) prefer matching SVGL/CDN and XDG variants (name-dark / name-symbolic / name-light). Icon theme name is separate (APPICON_ICON_THEME).
Sources: $XDG_CONFIG_HOME/appicon/sources.json (or .yaml) — every stage is an ordered entry. Default without a file is file → overrides → xdg → svgl. Opt-in remotes are never enabled by default. BYOK stages take token_env / secret_env (env var names whose values hold secrets — never put keys or secret paths in config).
appicon sources list
appicon sources get --json
appicon pack install simple-icons # local clone + register
appicon pack install --name mine --subdir icons https://github.com/org/my-icons.git
appicon resolve --order glyph,svgl,xdg my-app
appicon resolve --order logo-dev,xdg shopify.com # needs LOGO_DEV_TOKEN
appicon status
Example — remaps and a personal pack before path/XDG/SVGL:
{
"sources": [
{ "type": "overrides" },
{ "type": "pack", "name": "mine", "path": "~/.local/share/appicon/packs/mine" },
{ "type": "file" },
{ "type": "xdg" },
{ "type": "svgl" },
{ "type": "simple-icons" }
]
}
CDN stages (simple-icons / dashboard-icons) are separate from local pack install clones of the same upstreams. Do not point http-index at third-party CDNs unless you control the allowlist and accept their terms.
Overrides
Long-tail query remaps live in $XDG_CONFIG_HOME/appicon/overrides.json (or .yaml):
appicon override set my-wm-class firefox
appicon override list --json
appicon override export --format yaml > overrides.yaml
appicon override import --merge --file overrides.yaml
MCP (agents)
Run the same binary as a stdio MCP server — tools call internal/resolve (no extra download logic):
appicon mcp
| Tool | Mirrors |
|---|---|
resolve |
appicon resolve --json (optional order, explain, queries batch; miss → path:null, not IsError) |
prefetch |
appicon prefetch (optional order, offline, theme, from_desktop, json) |
status |
appicon status --json |
sources_list / sources_get / sources_set |
appicon sources list|get|set |
pack_list / pack_path / pack_add / pack_install / pack_update / pack_install_bundle |
appicon pack … (pack_install: recipe or url, plus name/subdir/ref) |
cache_stats / cache_clear / cache_prune |
matching cache subcommands |
override_list / override_get / override_set / override_rm / override_suggest / override_export / override_import |
appicon override … |
version |
appicon version |
Example Cursor / Claude Desktop snippet:
{
"mcpServers": {
"appicon": {
"command": "appicon",
"args": ["mcp"]
}
}
}
Agents should prefer MCP tools over shelling appicon when MCP is connected. Call resolve / sources_* / pack_* only — never invent CDN or SVGL URLs in other repos.
Daemon (optional)
Long-lived resolve over $XDG_RUNTIME_DIR/appicon.sock (mode 0600). Same allowlists/cache as the CLI, including order, explain, and batch. resolve / prefetch dial the socket when present and fall back in-process (--local / APPICON_NO_DAEMON=1 skips dial).
appicon daemon # foreground
# or user systemd — see contrib/systemd/README.md
systemctl --user enable --now appicon.socket
Home Manager (Linux): programs.appicon.daemon.enable = true.
Shell completions
# bash
eval "$(appicon completion bash)"
# or install: appicon completion bash > ~/.local/share/bash-completion/completions/appicon
# zsh
appicon completion zsh > "${fpath[1]}/_appicon" # then: compinit
# fish
appicon completion fish > ~/.config/fish/completions/appicon.fish
Man page
appicon man | man -l -
# or: appicon man > /usr/local/share/man/man1/appicon.1
Install
ver=v0.2.1
arch=$(uname -m)
case "$arch" in
x86_64) arch=amd64 ;;
aarch64|arm64) arch=arm64 ;;
esac
curl -fsSL "https://github.com/bolens/appicon/releases/download/${ver}/appicon_${ver}_linux_${arch}.tar.gz" | tar -xz
install -m 755 appicon ~/.local/bin/appicon
appicon version # → v0.2.1
Checksums: download SHA256SUMS (and optionally SHA256SUMS.sigstore.json) from the same release.
# checksums
sha256sum --check --ignore-missing SHA256SUMS
# optional cosign keyless verify (Sigstore)
cosign verify-blob \
--bundle SHA256SUMS.sigstore.json \
--certificate-identity-regexp '^https://github.com/bolens/appicon/\.github/workflows/release\.yml@refs/tags/v' \
--certificate-oidc-issuer 'https://token.actions.githubusercontent.com' \
SHA256SUMS
# optional GitHub build provenance attestation
gh attestation verify "appicon_${ver}_linux_${arch}.tar.gz" --repo bolens/appicon
Or: bash scripts/ci/verify-release.sh /path/to/downloaded/assets.
See SECURITY.md for reporting vulnerabilities and the trust model.
waybar-config pins this via make install-appicon.
AUR (Arch)
Reference PKGBUILDs live under packaging/aur/:
| Package | Tracks |
|---|---|
appicon |
Tagged source release |
appicon-bin |
Prebuilt release tarball |
appicon-git |
Latest git commit on main |
Fill checksums (except -git) and push to aur.archlinux.org when ready.
Nix
nix flake lock # once
nix run github:bolens/appicon -- version
nix build github:bolens/appicon#appicon-bin # linux prebuilt (like AUR appicon-bin)
nix build github:bolens/appicon#appicon-git # source + unstable version (like AUR appicon-git)
# local: see nix/README.md for vendorHash + appicon / appicon-bin / appicon-git
Home Manager: programs.appicon.enable = true via homeManagerModules.default (overlay or set package to appicon / appicon-bin / appicon-git). Optional programs.appicon.daemon.enable = true for the user socket daemon on Linux.
From source:
git clone https://github.com/bolens/appicon.git
cd appicon
make build
./bin/appicon version
Cache
Remote assets live under $XDG_CACHE_HOME/appicon (default ~/.cache/appicon). XDG hits return theme paths directly and are not copied.
Optional query remaps: $XDG_CONFIG_HOME/appicon/overrides.json — manage with:
appicon override set steam_app_12345 "Some Game"
appicon override get steam_app_12345
appicon override list --json
appicon override export --format yaml
appicon override import --merge --file overrides.yaml
appicon override rm steam_app_12345
appicon override path
Brand logos from SVGL are third-party marks — cached for personal use; this project does not redistribute a logo pack.
Examples
Shell-out-only consumers (no SVGL URLs):
bash examples/rofi-appicon.sh
bash examples/walker-appicon.sh firefox
bash examples/notify-appicon.sh firefox "Hello" "Icon from appicon"
Development
make check-fast # go test + vet + gofmt
make check # + golangci-lint + govulncheck + gitleaks + actionlint + markdownlint + docs crosslinks
make build
Documentation
Canonical map (update the listed source of truth when behavior changes): docs/README.md.
| Topic | Doc |
|---|---|
Exit codes / resolve --json |
docs/consumer-contract.md, docs/resolve-result.schema.json |
Stages / sources.json |
docs/sources.md |
| Local packs / recipes | docs/packs.md |
| Not a backlog | docs/deferred.md |
| Security / verify releases | SECURITY.md |
| Agents | AGENTS.md |
| Contributing | CONTRIBUTING.md |
| Changelog | CHANGELOG.md |
| Nix / AUR / systemd | nix/README.md, packaging/aur/README.md, contrib/systemd/README.md |
To cut a release locally (no push): bash scripts/ci/cut-release.sh v0.2.1.
License
MIT for code only. See LICENSE.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。