SEOX
CLI Commands

seox init

Initialize SEOX in your project

seox init

The init command creates a seox.config.ts file in your project with a basic configuration template.

Usage

bunx seox init

What It Does

  1. Checks if a configuration file already exists
  2. Detects your project structure (App Router or Pages Router)
  3. Creates a seox.config.ts file with sensible defaults

Generated Configuration

The command generates a configuration file:

seox.config.ts
import type { SEOXConfig } from 'seox';

export const config: SEOXConfig = {
  siteName: 'My Website',
  siteUrl: 'https://example.com',
  defaultTitle: 'My Website',
  titleTemplate: '%s | My Website',
  defaultDescription: 'Welcome to my website',
};

Options

OptionDescription
--forceOverwrite existing configuration
--helpShow help message

Examples

# Initialize with default settings
bunx seox init

# Force overwrite existing config
bunx seox init --force

Output Example

🚀 Initializing SEOX...

✓ Detected Next.js App Router project
✓ Created seox.config.ts

📝 Next steps:
   1. Edit seox.config.ts with your site details
   2. Run 'bunx seox configure' for interactive setup
   3. Import and use SEOX in your pages

Next Steps

After initialization, you can:

On this page