@epheiamoe/licon
v1.0.1
Published
CLI tool for fetching Lucide icons - designed for AI agents and developers
Readme
licon
CLI tool for fetching Lucide icons - designed for AI agents and human developers.
Installation
npm install -g @epheiamoe/liconOr install locally and link:
cd /path/to/licon
npm install
npm linkSetup
On first run, you'll be prompted to configure your local lucide repository path:
licon setupOr simply run any command - it will guide you through setup if not configured.
Commands
Search icons
licon search <query> # Default: 5 results, names only
licon search <query> -v # Show category and tags
licon search <query> -n 10 # Custom result limit
licon search <query>, # Multiple queries (comma-separated)Query syntax:
licon search settings- Single keywordlicon search settings,gear- Separate searches, outputs marked with [keyword]licon search settings gear- AND search (icons matching all terms)
Output:
[settings] 390 results:
settings
settings-2
calendar-cog
wrench
columns-3-cogGet SVG for embedding
licon get <name> # Single icon
licon get <name1> <name2> # Multiple icons
licon get <name> --format json # JSON outputOutput (default):
<!-- settings [account] -->
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="..."/>
</svg>Output (JSON):
{"name":"settings","svg":"<svg ..."}Multiple icons:
<!-- settings [account] -->
<svg>...</svg>
---
<!-- search [text, social] -->
<svg>...</svg>Save SVG to file
licon save <name> --output ./icons/Output: Saved: ./icons/<name>.svg
Convert to different format (PNG, WebP, SVG)
licon convert <name> --format png --output ./icons/
licon convert <name> --format webp --output ./icons/Requires sharp npm package for PNG/WebP conversion.
List all icons
licon listBrowse by category
licon cat <category> # List icons in category
licon categories # List all categoriesUpdate local lucide repository
licon upgrade # git pull in lucide directoryInteractive Mode (Human Use)
Simply run licon without arguments:
liconFeatures:
- Fuzzy search for icons
- Browse by category
- Preview SVG before copying
Configuration
Config stored at ~/.licon.json:
{
"repoPath": "/path/to/lucide",
"iconsDir": "/path/to/lucide/icons"
}Workflow Examples
Agent knows the icon name
Agent: I need an arrow-right icon
Action: licon get arrow-right
Result: SVG output with header commentAgent doesn't know the icon name
Action: licon search arrow
Result: List of matching icon names
Action: licon get arrow-right
Result: SVG outputMultiple icons
Action: licon get settings search user
Result: SVG for each icon, separated by ---Multiple searches
Action: licon search settings,gear
Result:
[settings] 390 results:
settings
settings-2
...
---
[gear] 815 results:
gear
cog
...Agent System Prompt
ICON RULE: When you need an icon in code, UI, or documentation, ALWAYS use licon.
1. Search: licon search <keywords>
2. Get SVG: licon get <icon-name>
3. Embed the SVG directly in your code
Multiple icons: licon get icon1 icon2 icon3
JSON output: licon get <name> --format json
NEVER use emoji as icons.