---
title: "CLI"
description: "Use the nuxt-seo-utils CLI to generate favicon and icon variants."
canonical_url: "https://nuxtseo.com/docs/seo-utils/guides/cli"
last_updated: "2026-05-06T18:43:39.159Z"
---

## Overview

Nuxt SEO Utils includes a CLI for generating favicon and app icon variants from a single source image. It produces all the standard sizes needed for modern browsers and devices.

When running in development mode, the module will detect if your project is missing favicon files and suggest the CLI command to generate them.

## Icon Generation

Generate favicon and icon variants from a source image in your `public/` directory:

```bash
npx nuxt-seo-utils icons --source logo.svg
```

### What It Generates

<table>
<thead>
  <tr>
    <th>
      File
    </th>
    
    <th>
      Size
    </th>
    
    <th>
      Purpose
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        icon-16x16.png
      </code>
    </td>
    
    <td>
      16x16
    </td>
    
    <td>
      Small favicon
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        icon-32x32.png
      </code>
    </td>
    
    <td>
      32x32
    </td>
    
    <td>
      Standard favicon
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        apple-touch-icon.png
      </code>
    </td>
    
    <td>
      180x180
    </td>
    
    <td>
      iOS home screen
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        icon-192x192.png
      </code>
    </td>
    
    <td>
      192x192
    </td>
    
    <td>
      Android / PWA
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        icon-512x512.png
      </code>
    </td>
    
    <td>
      512x512
    </td>
    
    <td>
      PWA splash
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        favicon.ico
      </code>
    </td>
    
    <td>
      32x32
    </td>
    
    <td>
      Legacy browser support
    </td>
  </tr>
</tbody>
</table>

All files are written to your `public/` directory and automatically detected by the module.

### Supported Source Formats

SVG, PNG, JPG, JPEG, and WebP files are supported as input. SVG is recommended for best quality at all sizes.

### Requirements

The CLI uses [sharp](https://sharp.pixelplumbing.com/) for image processing. Install it as a dev dependency:

```bash
pnpm add -D sharp
```

### Options

<table>
<thead>
  <tr>
    <th>
      Option
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        --source
      </code>
    </td>
    
    <td>
      Source image file relative to the public directory (required)
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --cwd
      </code>
    </td>
    
    <td>
      Working directory (default: <code>
        .
      </code>
      
      )
    </td>
  </tr>
</tbody>
</table>
