Monicon
Installation

CLI

Learn how to use the Monicon CLI to generate icons

The Monicon CLI provides a command-line interface for generating icons, this is useful if you want to use Monicon as a tool-agnostic.

Installation

Install the Monicon Core globally

npm install @monicon/cli -g

Configuration

Create a monicon.config.ts (or .js) file in your project root:

monicon.config.ts
import { ,  } from "@monicon/core/plugins";
import {  } from "@monicon/core";

export default {
  // Loads individual icons by icon name
  : ["mdi:home", "feather:activity"],
  // Loads all icons from a collection
  : ["lucide"],
  : [
    ({ : ["src/components/icons"] }),
    ({ : "src/components/icons" }),
  ],
} satisfies ;

Commands

Generate Icons

Generate icons based on your configuration:

npx @monicon/cli generate

This command will:

  1. Load your monicon.config.ts file
  2. Fetch the specified icons
  3. Generate components in the configured output path

Watch Mode

Run the CLI in watch mode to automatically regenerate icons when your config changes:

npx @monicon/cli generate -w

This is useful during development to see changes immediately.

Help

Display help information:

npx @monicon/cli -h

Version

Check the installed CLI version:

npx @monicon/cli -v

Usage in Scripts

You can add the CLI to your package.json scripts for easy access:

package.json
{
  "scripts": {
    "dev": "npx @monicon/cli generate --watch && next dev",
    "build": "npx @monicon/cli generate && next build"
  }
}

On this page