packages/desktop/apps/electron/resources/docs/tool-icons.md
Customize the icons shown next to CLI commands in chat activity rows.
When the agent runs a CLI command (e.g., git status, npm install), the app resolves the command name to a branded icon. The mapping is defined in:
~/.craft-agent/tool-icons/tool-icons.json
Icon files (.png, .ico, .svg, .jpg) live in the same directory alongside the JSON config.
{
"version": 1,
"tools": [
{
"id": "git",
"displayName": "Git",
"icon": "git.ico",
"commands": ["git"]
}
]
}
| Field | Type | Description |
|---|---|---|
version | number | Schema version (currently 1) |
tools | array | Array of tool entries |
tools[].id | string | Unique identifier (slug format, e.g. "git") |
tools[].displayName | string | Human-readable name shown in the UI |
tools[].icon | string | Icon filename relative to the tool-icons directory |
tools[].commands | string[] | CLI command names that map to this tool |
~/.craft-agent/tool-icons/ (any of: .png, .ico, .svg, .jpg)tool-icons.json:{
"id": "my-tool",
"displayName": "My Tool",
"icon": "my-tool.png",
"commands": ["my-tool", "mt"]
}
The command parser handles complex bash strings:
git status matches gitgit add . && npm publish matches the first recognized toolNODE_ENV=prod npm test matches npmsudo docker ps matches docker/usr/local/bin/node matches nodegit log | head -10 matches gitThe first recognized command in the string determines the icon.
A tool can match multiple command names:
{
"id": "npm",
"displayName": "npm",
"icon": "npm.png",
"commands": ["npm", "npx"]
}
The app ships with ~57 built-in tool icons covering common CLI tools (git, npm, docker, python, rust, aws, etc.). These are seeded on first run and are never overwritten, so your customizations are preserved across updates.