| name | better-icons |
| description | Use when working with icons in any project. Provides CLI for searching 200+ icon libraries (Iconify) and retrieving SVGs. Commands: `better-icons search <query>` to find icons, `better-icons get <id>` to get SVG. Also available as MCP server for AI agents. |
Better Icons
Search and retrieve icons from 200+ libraries via Iconify.
Installation
Before using any better-icons commands, ensure the tool is available in the environment.
Option 1 — Install globally (recommended, matches all examples below):
npm install -g better-icons
bun add -g better-icons
Option 2 — Run without installing (prefix every command with npx or bunx):
npx better-icons search arrow --limit 10
npx better-icons get lucide:home > icon.svg
bunx better-icons search arrow --limit 10
bunx better-icons get lucide:home > icon.svg
For AI agents: Prefer the global install so that better-icons is on $PATH and the commands below work as-is. Run the install step once during environment setup, then use the commands without npx/bunx.
CLI
better-icons search <query> [--prefix <prefix>] [--limit <n>] [--json]
better-icons search <query> -d [dir] [--color <color>] [--size <px>]
better-icons get <icon-id> [--color <color>] [--size <px>] [--json]
better-icons setup [-a cursor,claude-code] [-s global|project]
Examples
better-icons search arrow --limit 10
better-icons search home --json | jq '.icons[0]'
better-icons get lucide:home > icon.svg
better-icons get mdi:home --color '#333' --json
better-icons search arrow -d
better-icons search check -d ./my-icons
better-icons search star -d -c '#000' -s 24 --limit 64
Icon ID Format
prefix:name - e.g., lucide:home, mdi:arrow-right, heroicons:check
Popular Collections
lucide, mdi, heroicons, tabler, ph, ri, solar, iconamoon
MCP Tools (for AI agents)
| Tool | Description |
|---|
search_icons | Search across all libraries |
get_icon | Get single icon SVG |
get_icons | Batch retrieve multiple icons |
list_collections | Browse available icon sets |
recommend_icons | Smart recommendations for use cases |
find_similar_icons | Find variations across collections |
sync_icon | Add icon to project file |
scan_project_icons | List icons in project |
TypeScript Interfaces
interface SearchIcons {
query: string
limit?: number
prefix?: string
category?: string
}
interface GetIcon {
icon_id: string
color?: string
size?: number
}
interface GetIcons {
icon_ids: string[]
color?: string
size?: number
}
interface RecommendIcons {
use_case: string
style?: 'solid' | 'outline' | 'any'
limit?: number
}
interface SyncIcon {
icons_file: string
framework: 'react' | 'vue' | 'svelte' | 'solid' | 'svg'
icon_id: string
component_name?: string
}
API
All icons from https://api.iconify.design