---
title: "CLI · Nuxt OG Image · Nuxt SEO"
canonical_url: "https://nuxtseo.com/docs/og-image/guides/cli"
last_updated: "2026-08-16T09:55:30.071Z"
meta:
  description: "Use the nuxt-og-image CLI to scaffold, manage, and migrate OG image components."
  "og:description": "Use the nuxt-og-image CLI to scaffold, manage, and migrate OG image components."
  "og:title": "CLI · Nuxt OG Image · Nuxt SEO"
---

Nuxt SEO on GitHub

**OG Image v6** is here. Looking for an older version? [~~View v5 docs ~~](https://nuxtseo.com/docs/og-image/v5/getting-started/introduction).

](https://nuxtseo.com/docs/og-image/getting-started/introduction)

](https://nuxtseo.com/docs/og-image/api/define-og-image)

](https://nuxtseo.com/docs/og-image/releases/v6)

Switch to OG Image](https://nuxtseo.com/docs/og-image/getting-started/introduction)Switch to Nuxt SEO](https://nuxtseo.com/docs/nuxt-seo/getting-started/introduction)Switch to Robots](https://nuxtseo.com/docs/robots/getting-started/introduction)Switch to Sitemap](https://nuxtseo.com/docs/sitemap/getting-started/introduction)Switch to Schema.org](https://nuxtseo.com/docs/schema-org/getting-started/introduction)Switch to Link Checker](https://nuxtseo.com/docs/link-checker/getting-started/introduction)Switch to SEO Utils](https://nuxtseo.com/docs/seo-utils/getting-started/introduction)Switch to Site Config](https://nuxtseo.com/docs/site-config/getting-started/introduction)Switch to Skew Protection](https://nuxtseo.com/docs/skew-protection/getting-started/introduction)Switch to AI Ready](https://nuxtseo.com/docs/ai-ready/getting-started/introduction)

**Core Concepts**

# **CLI**

The `**nuxt-og-image**` CLI provides commands for scaffolding components, switching renderers, managing templates, and migrating between versions.

```bash
npx nuxt-og-image --help
```

## `**create**`

Scaffold a new OG image component with a starter template.

```bash
npx nuxt-og-image create [name] [--renderer <renderer>] [--path <dir>]
```

The command auto-detects your CSS framework (Tailwind CSS, [**~~UnoCSS~~**](https://unocss.dev), or plain CSS) and generates an appropriate template. The renderer is inferred from existing components or installed packages when `**--renderer**` is omitted.

After creating the component, you'll be prompted to insert `**defineOgImage()**` into a page file.

### Options

| **Flag** | **Description** |
| --- | --- |
| `**--renderer <renderer>**` | Force a specific renderer (`**satori**`, `**takumi**`, `**browser**`) |
| `**--path <dir>**` | Custom output directory (default: `**components/OgImage/**`) |

### Examples

```bash
# Interactive - prompts for name and renderer
npx nuxt-og-image create

# Create a component with inferred renderer
npx nuxt-og-image create BlogPost

# Specify renderer explicitly
npx nuxt-og-image create BlogPost --renderer satori

# Custom output path
npx nuxt-og-image create BlogPost --path components/custom
```

## `**switch**`

Migrate OG image components from one renderer to another. Renames file suffixes, installs the target renderer's dependencies, and removes the old renderer's dependencies when no components remain using it.

```bash
npx nuxt-og-image switch [--from <renderer>] [--to <renderer>] [--dry-run] [--yes]
```

### Options

| **Flag** | **Description** |
| --- | --- |
| `**--from <renderer>**` | Source renderer to migrate from |
| `**--to <renderer>**` | Target renderer to migrate to |
| `**--dry-run**` | Preview changes without applying them |
| `**--yes**` | Skip confirmation prompts (CI mode) |

### Examples

```bash
# Interactive - prompts for source and target
npx nuxt-og-image switch

# Migrate all satori components to takumi
npx nuxt-og-image switch --from satori --to takumi

# Preview what would change
npx nuxt-og-image switch --from satori --to takumi --dry-run

# Non-interactive (CI)
npx nuxt-og-image switch --from satori --to takumi --yes
```

## `**enable**`

Install dependencies for a specific renderer.

```bash
npx nuxt-og-image enable <renderer> [--edge]
```

### Options

| **Flag** | **Description** |
| --- | --- |
| `**--edge**` | Also install Wasm variants for edge runtimes (Cloudflare, Vercel Edge) |

### Examples

```bash
# Install takumi dependencies
npx nuxt-og-image enable takumi

# Install satori dependencies for edge runtime
npx nuxt-og-image enable satori --edge
```

## `**list**`

List available community templates.

```bash
npx nuxt-og-image list
```

## `**eject**`

Copy a community template into your project for customization. Community templates are only available in development; you must eject before production builds.

```bash
npx nuxt-og-image eject <name>
```

The template is copied to `**components/OgImage/**` (or `**app/components/OgImage/**` for Nuxt v4).

### Examples

```bash
npx nuxt-og-image eject NuxtSeo
npx nuxt-og-image eject BlogPost
```

## `**generate-secret**`

Generate a cryptographically secure signing secret for URL tamper protection.

```bash
npx nuxt-og-image generate-secret
```

This generates a 64-character hex string that should be set as the `**NUXT_OG_IMAGE_SECRET**` environment variable. See the [**~~Security Guide~~**](https://nuxtseo.com/docs/og-image/guides/security#url-signing) for details.

## `**migrate v6**`

Automate migration from v5 to v6. See the [**~~Migration Guide~~**](https://nuxtseo.com/docs/og-image/migration-guide/v6) for details.

```bash
npx nuxt-og-image migrate v6 [--dry-run] [--yes] [--renderer <renderer>]
```

### Options

| **Flag** | **Description** |
| --- | --- |
| `**--dry-run**` | Preview changes without applying them |
| `**--yes**` | Skip confirmation prompts |
| `**--renderer <renderer>**` | Default renderer for components without a suffix |

**Was this page helpful?**

### **Related **

[**Install Nuxt OG Image**](https://nuxtseo.com/docs/og-image/getting-started/installation)

[**v5 to v6**](https://nuxtseo.com/docs/og-image/migration-guide/v6)

[**Security**](https://nuxtseo.com/docs/og-image/guides/security)

[**Performance** Optimize OG image generation for fast rendering and minimal HTML overhead.](https://nuxtseo.com/docs/og-image/guides/performance) [**Security** Learn about the security defaults and how to further harden your OG image endpoint.](https://nuxtseo.com/docs/og-image/guides/security)