Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Usage

CLI Reference

npx tsx scripts/index.ts [options]

Options

FlagAliasDescriptionDefault
--input-iPath to spec file or openspec directory(required)
--output-oOutput directory for .feature files./features
--language-lGherkin language codeen

Output Paths

InputOutput
openspec/specs/auth/spec.mdfeatures/auth.feature
openspec/changes/add-auth/specs/auth/spec.mdfeatures/add-auth_auth.feature

Examples

Convert a single spec file

npx tsx scripts/index.ts -i openspec/specs/auth/spec.md -o features

Generates features/auth.feature.

Convert an entire OpenSpec directory

npx tsx scripts/index.ts -i ./openspec -o ./features

Walks openspec/specs/<domain>/spec.md and all openspec/changes/<change>/specs/<domain>/spec.md files.

Convert to a different language

# Portuguese
npx tsx scripts/index.ts -i ./openspec -o ./features -l pt

# Simplified Chinese
npx tsx scripts/index.ts -i ./openspec -o ./features -l zh-CN

# Arabic (right-to-left)
npx tsx scripts/index.ts -i ./openspec -o ./features -l ar

Convert a delta change

npx tsx scripts/index.ts -i openspec/changes/add-auth/specs/auth/spec.md -o features

This generates features/add-auth_auth.feature with ADDED/MODIFIED/REMOVED annotations.

Working Directory Structure

project/
├── openspec/
│   ├── specs/
│   │   ├── auth/
│   │   │   └── spec.md
│   │   └── billing/
│   │       └── spec.md
│   └── changes/
│       └── add-auth/
│           └── specs/
│               └── auth/
│                   └── spec.md
└── features/              # ← generated
    ├── auth.feature
    ├── billing.feature
    └── add-auth_auth.feature