CLI Reference
Raiken ships as a CLI that initializes projects and starts the dashboard.
Commands
raiken init
Initialize Raiken in the current project.
raiken initOptions:
| Flag | Description |
|---|---|
--force, -f | Overwrite existing configuration files |
What it does:
- Detects your project type and test framework
- Creates
.raiken/workspace directory - Writes
raiken.config.json - Creates
test-results/andtest-reports/directories - Optionally generates
playwright.config.ts - Optionally creates an example test file
- Adds scripts to
package.json
Example output:
🔎 Analyzing your project...
🔍 Detected project information: Project: my-app Type: nextjs Test Framework: playwright Package Manager: pnpm
✓ Auto-detected project configuration. nextjs + playwright → e2e/
? Use auto-detected configuration? Yes? Install Playwright browsers now? Yes? Generate an example test file? Yes
📁 Setting up nextjs project: my-app
✓ Created .raiken/ directory✓ Updated .gitignore to exclude .raiken/✓ Created test directory: e2e/✓ Created raiken.config.json✓ Created playwright.config.ts✓ Updated package.json scripts✓ Created example test: e2e/example.spec.ts📦 Installing Playwright browsers...✓ Playwright browsers installed successfully
✅ Project initialization complete!
Next steps: 1. Run "raiken start" to launch the dashboard 2. Open http://localhost:7101 in your browser 3. Start generating AI-powered tests!raiken start
Start the Raiken server and dashboard.
raiken startOptions:
| Flag | Description |
|---|---|
-p, --port <number> | Set the server port (default: 7101) |
Example:
raiken start -p 8080Example output:
📍 Found 3 entry points✅ Code graph built successfully: 47 files indexed
🚀 Raiken UI running at http://localhost:7101Environment variables
Raiken reads .env from your project root.
| Variable | Required | Description |
|---|---|---|
OPENROUTER_API_KEY | Yes | API key for AI generation |
OPENROUTER_MODEL | No | Override the default model |
OPENROUTER_BASE_URL | No | Custom API base URL |
Exit codes
| Code | Meaning |
|---|---|
0 | Success |
1 | Initialization failed or startup error |
Quick reference
# Initialize a new projectraiken init
# Force reinitialize (overwrites config)raiken init --force
# Start the dashboardraiken start
# Start on a custom portraiken start -p 8080
# Check versionraiken --version
# Show helpraiken --help