---
title: "CLI · Nuxt AI Ready · Nuxt SEO"
meta:
  "og:description": "Command-line interface for managing runtime sync and IndexNow."
  "og:title": "CLI · Nuxt AI Ready · Nuxt SEO"
  description: "Command-line interface for managing runtime sync and IndexNow."
---

**Core Concepts**

# **CLI**

Last updated **Mar 2, 2026** by [Harlan Wilton](https://github.com/harlan-zw) in [chore: sync](https://github.com/nuxt-seo-pro/nuxt-ai-ready/commit/e2f353ebb8ac17dabf1bc9fe2976f4587c98cc3e).

[Copy for LLMs

The `nuxt-ai-ready` CLI provides commands for managing runtime indexing and IndexNow sync from your terminal.

## [Installation](#installation)

The CLI is included with the module. Run it via npx:

```
npx nuxt-ai-ready <command>
```

Or add a script to your `package.json`:

package.json

```
{
  "scripts": {
    "ai-ready": "nuxt-ai-ready"
  }
}
```

## [Authentication](#authentication)

The CLI automatically reads the secret from `node_modules/.cache/nuxt/ai-ready/secret`, which is generated when you run `nuxi dev` or `nuxi build`.

Run `nuxi dev` or `nuxi build` at least once before using the CLI to generate the auth secret.

## [Commands](#commands)

### [status](#status)

Show indexing status and IndexNow sync progress.

```
npx nuxt-ai-ready status
npx nuxt-ai-ready status --url https://mysite.com
```

**Options:**

| **Option** | **Alias** | **Default** | **Description** |
| --- | --- | --- | --- |
| `--url` | `-u` | `http://localhost:3000` | Site URL |
| `--cwd` |  | `.` | Working directory |

**Output:**

```
AI Ready Status
Total pages: 50
Indexed: 45
Pending: 5

IndexNow:
  Pending: 10
  Total submitted: 500
  Last submitted: 2025-01-15T10:30:00.000Z
```

### [poll](#poll)

Trigger page indexing for pending pages.

```
# Index up to 10 pages (default)
npx nuxt-ai-ready poll

# Index up to 50 pages
npx nuxt-ai-ready poll --limit 50

# Index all pending pages
npx nuxt-ai-ready poll --all
```

**Options:**

| **Option** | **Alias** | **Default** | **Description** |
| --- | --- | --- | --- |
| `--url` | `-u` | `http://localhost:3000` | Site URL |
| `--limit` | `-l` | `10` | Max pages to process |
| `--all` | `-a` | `false` | Process all pending pages |
| `--cwd` |  | `.` | Working directory |

**Output:**

```
Triggering poll at http://localhost:3000...
Indexed: 20 pages
Remaining: 25
Duration: 1234ms
```

### [restore](#restore)

Restore database from prerendered dump. Useful for resetting to the build-time state.

```
# Restore and clear existing pages
npx nuxt-ai-ready restore

# Restore without clearing (merge)
npx nuxt-ai-ready restore --no-clear
```

**Options:**

| **Option** | **Alias** | **Default** | **Description** |
| --- | --- | --- | --- |
| `--url` | `-u` | `http://localhost:3000` | Site URL |
| `--clear` |  | `true` | Clear existing pages first |
| `--cwd` |  | `.` | Working directory |

**Output:**

```
Restoring database at http://localhost:3000...
Restored: 50 pages
Cleared: 45 existing pages
```

### [prune](#prune)

Remove stale routes that are no longer in the sitemap.

```
# Preview what would be pruned (dry run)
npx nuxt-ai-ready prune --dry

# Prune routes older than 7 days
npx nuxt-ai-ready prune --ttl 604800

# Preview with custom TTL
npx nuxt-ai-ready prune --dry --ttl 86400
```

**Options:**

| **Option** | **Alias** | **Default** | **Description** |
| --- | --- | --- | --- |
| `--url` | `-u` | `http://localhost:3000` | Site URL |
| `--dry` | `-d` | `false` | Preview without deleting |
| `--ttl` |  | `pruneTtl` config | Prune routes older than this (seconds) |
| `--cwd` |  | `.` | Working directory |

**Output (dry run):**

```
Previewing stale routes at http://localhost:3000...
Would prune: 5 routes
  • /old-page-1
  • /old-page-2
  • /removed-feature
  ... and 2 more
```

### [indexnow](#indexnow)

Trigger IndexNow sync to notify search engines of changes.

```
# Submit up to 100 URLs (default)
npx nuxt-ai-ready indexnow

# Submit up to 500 URLs
npx nuxt-ai-ready indexnow --limit 500
```

**Options:**

| **Option** | **Alias** | **Default** | **Description** |
| --- | --- | --- | --- |
| `--url` | `-u` | `http://localhost:3000` | Site URL |
| `--limit` | `-l` | `100` | Max URLs to submit |
| `--cwd` |  | `.` | Working directory |

**Output:**

```
Triggering IndexNow sync at http://localhost:3000...
Submitted: 50 URLs
Remaining: 150
```

## [Workflow Examples](#workflow-examples)

### [Development Workflow](#development-workflow)

```
# Start dev server
nuxi dev

# In another terminal, check status
npx nuxt-ai-ready status

# Manually trigger indexing
npx nuxt-ai-ready poll --all
```

### [Production Deployment](#production-deployment)

```
# After deployment, index all pages
npx nuxt-ai-ready poll --all --url https://mysite.com

# Notify search engines
npx nuxt-ai-ready indexnow --url https://mysite.com

# Clean up old routes weekly
npx nuxt-ai-ready prune --ttl 604800 --url https://mysite.com
```

### [CI/CD Integration](#cicd-integration)

Add to your deployment pipeline:

.github/workflows/deploy.yml

```
- name: Index pages
  run: npx nuxt-ai-ready poll --all --url ${{ vars.SITE_URL }}

- name: Notify search engines
  run: npx nuxt-ai-ready indexnow --url ${{ vars.SITE_URL }}
```

## [Troubleshooting](#troubleshooting)

### ["No secret found" Error](#no-secret-found-error)

The CLI needs an auth secret generated by the module. Run `nuxi dev` or `nuxi build` first:

```
nuxi dev
# or
nuxi build
```

### [Connection Refused](#connection-refused)

Ensure the dev server or production site is running and accessible at the specified URL:

```
# Check if server is running
curl http://localhost:3000/__ai-ready/status
```

### [Wrong Working Directory](#wrong-working-directory)

If running from a different directory, specify `--cwd`:

```
npx nuxt-ai-ready status --cwd /path/to/project
```

[Edit this page](https://github.com/nuxt-seo-pro/nuxt-ai-ready/edit/main/docs/content/2.guides/7.cli.md)

[Markdown For LLMs](https://nuxtseo.com/docs/ai-ready/guides/cli.md)

**Did this page help you? **

### **Related **

[**Runtime Sync**](https://nuxtseo.com/docs/ai-ready/guides/runtime-indexing) [**IndexNow**](https://nuxtseo.com/docs/ai-ready/guides/indexnow) [**Configuration**](https://nuxtseo.com/docs/ai-ready/api/config)

[**IndexNow** Instantly notify search engines when your content changes.](https://nuxtseo.com/docs/ai-ready/guides/indexnow) [**RAG Setup** Vectorize your site's markdown for semantic search and RAG pipelines.](https://nuxtseo.com/docs/ai-ready/advanced/rag-example)

**On this page**

- [Installation](#installation)
- [Authentication](#authentication)
- [Commands](#commands)
- [Workflow Examples](#workflow-examples)
- [Troubleshooting](#troubleshooting)