CLI for AI-assisted PRD (Product Requirements Document) task processing.
npm install @okam/aiCLI for AI-assisted PRD (Product Requirements Document) task processing.
``bash`
npx @okam/ai
Initialize a new PRD project with prd.json and progress.txt templates.
`bash`
npx @okam/ai init
npx @okam/ai init --force # Overwrite existing files
Creates a prd.json with the following structure:
`json`
{
"project": "",
"goal": "",
"config": {
"agent": "claude",
"context": "",
"verification": "Run your tests and type checks."
},
"statuses": ["pending", "in_progress", "completed", "blocked"],
"tasks": [
{ "id": "1", "description": "", "status": "pending", "steps": [] }
]
}
Also creates a progress.txt log with a creation date header.
Run an AI agent to process PRD tasks iteratively.
`bash`
npx @okam/ai ralph # Run 1 iteration
npx @okam/ai ralph 5 # Run 5 iterations
npx @okam/ai ralph -a codex # Use Codex CLI instead of Claude
Prerequisites:
- jq - JSON processor for parsing AI responsesbash
- - Shell for running the orchestration scriptclaude
- Either CLI (for --agent claude) or codex CLI (for --agent codex)
Options:
| Flag | Description | Default |
|------|-------------|---------|
| -a, --agent | AI agent to use (claude or codex) | claude |-c, --context
| | Additional context file or directory | Current working directory |-v, --verification
| | Verification command after each task | Run your tests and type checks. |-p, --prd
| | Path to prd.json file | prd.json |--progress
| | Path to progress.txt file | progress.txt |
Configuration priority: CLI flags > prd.json config > defaults. If config.context is a relative path, it is resolved relative to the PRD file.
Archive prd.json and progress.txt to archive/ folder with timestamped filenames.
`bash`
npx @okam/ai archive
Files are renamed to: {type}_{project-slug}_{YYYY-MM-DD_HH-mm-ss}.{ext}
Example: prd_my-project_2026-01-22_11-35-31.json
Configure defaults in your prd.json config section:
`json`
{
"config": {
"agent": "claude",
"context": "NX monorepo with React, TypeScript, Tailwind CSS",
"verification": "npx nx run-many -t build lint test"
}
}
`bash``
nx build ai # Build the library
nx test ai # Run unit tests
nx lint ai # Run linting