npm package: @seoassist/seo-writer-cli
Description: Professional SEO content generation CLI with AI-powered article creation
Author: SEO Assist
Latest version: 1.0.0

# SEO Writer CLI

Professional SEO content generation CLI with AI-powered article creation. Generate unlimited SEO-optimized articles using your own OpenAI API key.

## Installation

```bash
npm install -g @seoassist/seo-writer-cli
```

## Configuration

Create a `.env` file:

```env
# Your OpenAI API key (required)
OPENAI_API_KEY=sk-...

# Your license key (required - get one at seowriter.com)
SEO_WRITER_LICENSE_KEY=

# Optional settings
SEO_WRITER_MODEL=gpt-4o-mini
SEO_WRITER_OUTDIR=out
SEO_WRITER_CONCURRENCY=3
```

## Quick Start

1. **Get a license:**
```bash
seo-writer billing subscribe --plan pro
```

2. **Set your license:**
```bash
seo-writer license --set YOUR-LICENSE-KEY
```

3. **Generate an article:**
```bash
seo-writer generate --keyword "content marketing" --words 1500 --images 3 --format pdf
```

## Commands

### Generate Single Article

```bash
seo-writer generate [options]

Options:
  -k, --keyword <keyword>      Primary keyword (required)
  -s, --secondary <keywords>   Secondary keywords (comma-separated)
  -w, --words <count>         Target word count (default: 1500)
  -t, --title <title>         Article title
  -a, --audience <audience>   Target audience
  --tone <tone>               Writing tone
  -b, --brand <brand>         Brand voice
  -f, --faq <count>           Number of FAQ items
  -d, --density <range>       Keyword density (e.g., "1.0,2.0")
  --schema                    Generate schema markup
  -i, --images <count>        Number of images
  --image-style <style>       Image style
  --image-aspect <ratio>      Aspect ratio (16:9, 4:3, 1:1, 9:16)
  --format <format>           Output format (pdf, docx, rtf, markdown)
```

### Bulk Generation

```bash
seo-writer bulk -i <input-file> [-f <format>]

Supported input formats:
  - JSON
  - CSV
  - YAML
```

### License Management

```bash
# Set license key
seo-writer license --set <KEY>

# Check license status
seo-writer license --status
```

### Billing

```bash
# Subscribe to a plan
seo-writer billing subscribe --plan <solo|pro|agency>

# Open billing portal
seo-writer billing portal
```

## Examples

### Basic Article
```bash
seo-writer generate \
  --keyword "seo basics" \
  --words 1000
```

### Full-Featured Article
```bash
seo-writer generate \
  --keyword "technical seo" \
  --secondary "site speed,core web vitals" \
  --words 2000 \
  --title "Technical SEO: The Developer's Guide" \
  --audience "web developers" \
  --tone "technical" \
  --brand "authoritative" \
  --faq 6 \
  --density "1.5,2.5" \
  --schema \
  --images 4 \
  --image-style "tech diagrams" \
  --image-aspect 16:9 \
  --format pdf
```

### Bulk Generation
```bash
# Using JSON
seo-writer bulk -i articles.json -f pdf

# Using CSV
seo-writer bulk -i articles.csv -f docx
```

## Output Structure

```
out/
├── article-slug-1/
│   ├── article-slug-1.pdf
│   ├── article-slug-1.meta.json
│   └── images/
│       ├── img-01.png
│       ├── img-02.png
│       └── img-03.png
└── article-slug-2/
    ├── article-slug-2.docx
    ├── article-slug-2.meta.json
    └── images/
        └── img-01.png
```

## Plan Limits

| Feature | Solo | Pro | Agency |
|---------|------|-----|--------|
| Images per article | 2 | 6 | 10 |
| Bulk articles | 5 | 20 | 20 |
| Concurrent tasks | 2 | 3 | 5 |
| Templates | ❌ | ✅ | ✅ |
| Schema | ❌ | ✅ | ✅ |

## Troubleshooting

### OPENAI_API_KEY Required
- Set your OpenAI API key in .env or environment
- Get one at: https://platform.openai.com/api-keys

### No Active License
- Purchase a license: `seo-writer billing subscribe --plan <plan>`
- Set your license: `seo-writer license --set <KEY>`

### Limits Exceeded
- Check your plan limits: `seo-writer license --status`
- Upgrade if needed: `seo-writer billing portal`

## Support

- Documentation: https://seoassist.io/docs/seo-writer
- GitHub: https://github.com/seoassist/seo-writer-cli
- Email: support@seoassist.io

## License

MIT © SEO Assist

---

**Note**: This tool requires a valid license key to function. All commands are protected and will not work without proper authentication.