← 返回
开发者工具 中文

🦄 Unicon CLI

Add and manage 19,000+ icons from 9 libraries in React, Vue, Svelte, or web projects using the Unicon CLI for search, bundles, previews, and tree-shakable co...
在 React、Vue、Svelte 或 Web 项目中添加和管理来自 9 个库的 19,000 多个图标,支持通过 Unicon CLI 进行搜索、打包、预览及 Tree-shaking 优化。
charlesrhoward
开发者工具 clawhub v0.2.0 1 版本 99838.4 Key: 无需
★ 4
Stars
📥 1,156
下载
💾 30
安装
1
版本
#latest

概述

Unicon

Unicon is a unified icon library providing 19,000+ icons from 9 popular libraries. Unlike traditional npm packages that bundle thousands of icons, Unicon generates only the icons you need.

Quick Start

# Install CLI globally
npm install -g @webrenew/unicon

# Or use directly with npx
npx @webrenew/unicon search "dashboard"

Core Commands

CommandDescription
----------------------
unicon search AI-powered semantic search (supports --pick for interactive selection)
unicon get Get single icon to stdout, file, or clipboard (--copy)
unicon info Show detailed icon information
unicon preview ASCII art preview in terminal
unicon bundleBundle multiple icons (supports --stars for favorites)
unicon initCreate .uniconrc.json config (--interactive for wizard)
unicon syncRegenerate bundles (--watch for auto-sync)
unicon add Add bundle to config
unicon star Add icon to favorites
unicon auditFind unused/missing icons in project
unicon sourcesList available icon libraries
unicon categoriesList icon categories
unicon cacheManage local cache
unicon skillInstall AI assistant skills

Output Formats

FormatExtensionUse Case
-----------------------------
react.tsxReact/Next.js (auto-detected)
vue.vueVue 3 SFC (auto-detected)
svelte.svelteSvelte components (auto-detected)
svg.svgRaw SVG markup
json.jsonData/programmatic use

Note: CLI auto-detects your framework from package.json and uses the appropriate format.

Icon Sources

SourceIconsDescription
----------------------------
lucide1,900+Beautiful & consistent
phosphor1,500+6 weights available
hugeicons1,800+Modern outlined icons
heroicons292Tailwind Labs
tabler4,600+Pixel-perfect stroke
feather287Simple and clean
remix2,800+Multiple categories
simple-icons3,300+Brand logos
iconoir1,600+Modern outlined icons

Common Workflows

Add Icons to a React Project

# 1. Initialize config (interactive wizard)
unicon init --interactive

# 2. Search for icons interactively
unicon search "navigation arrows" --pick

# 3. Add bundle to config
unicon add nav --query "arrow chevron menu"

# 4. Generate components
unicon sync

# 5. Import and use
# import { ArrowRight, Menu } from "./src/icons/nav"

Get a Single Icon Quickly

# Output to stdout (auto-detects framework)
unicon get home

# Copy to clipboard directly
unicon get home --copy

# Save to file
unicon get settings --format react -o ./Settings.tsx

# Different framework
unicon get home --format vue -o ./Home.vue

Interactive Search with Selection

# Search and pick icons interactively
unicon search "dashboard" --pick

# Then choose action: copy, save, star, or create bundle

Bundle by Category

# Bundle all dashboard icons (tree-shakeable by default)
unicon bundle --category Dashboards -o ./src/icons

# Bundle specific icons by search
unicon bundle --query "social media" --format svg -o ./public/icons

# Bundle all favorited icons
unicon bundle --stars -o ./src/icons/favorites

# Single file mode (not tree-shakeable)
unicon bundle --query "ui" --single-file -o ./icons.tsx

Favorites System

# Star icons for later
unicon star home
unicon star settings
unicon star user

# Bundle all starred icons
unicon bundle --stars -o ./src/icons/favorites

# View favorites
unicon favorites

Watch Mode for Development

# Auto-regenerate when config changes
unicon sync --watch

Audit Project Usage

# Find unused bundled icons and missing imports
unicon audit

Preview Icons in Terminal

# ASCII art preview
unicon preview home

# Custom size
unicon preview star --width 24

Tree-Shaking Benefits

Unlike npm install lucide-react which downloads thousands of icons:

  • Generates only the icons you need as individual files
  • No external dependencies to ship
  • True tree-shaking with one component per file
  • Import only what you use: import { Home } from "./icons"

Web Interface

Browse and copy icons at: https://unicon.sh

  • Visual search with AI
  • One-click copy (SVG, React, Vue, Svelte)
  • Filter by library and category
  • Bundle builder for multiple icons

References

AI Assistant Integration

Install Unicon skills for AI coding assistants:

# List supported assistants
unicon skill --list

# Install for specific assistant
unicon skill --ide claude      # Claude Code
unicon skill --ide cursor      # Cursor
unicon skill --ide windsurf    # Windsurf

# Install for all supported assistants
unicon skill --all

Supported AI Assistants

IDEDirectory
----------------
Claude Code.claude/skills/unicon/SKILL.md
Cursor.cursor/rules/unicon.mdc
Windsurf.windsurf/rules/unicon.md
Agent.agent/rules/unicon.md
Antigravity.antigravity/rules/unicon.md
OpenCode.opencode/rules/unicon.md
Codex.codex/unicon.md
Aider.aider/rules/unicon.md

Once installed, ask your AI assistant: "Add a home icon to my project"

Cache

Icons are cached locally at ~/.unicon/cache for 24 hours:

unicon cache --stats   # Show cache info
unicon cache --clear   # Clear cache

版本历史

共 1 个版本

  • v0.2.0 当前
    2026-03-29 07:18 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 672 📥 324,481
developer-tools

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 68 📥 180,438

memories.sh CLI

charlesrhoward
memories.sh 的 CLI 参考与工作流——面向 AI 代理的持久化记忆层。适用场景:(1)运行 memories CLI 命令进行添加、搜索、编辑等操作时。
★ 0 📥 299