ccjs init
Interactive project scaffolding wizard for CodeceptJS.
Usage
bash
ccjs initWhat It Does
The init command creates a complete CodeceptJS project structure with a single command. The interactive wizard guides you through:
- Selecting a helper — Playwright (default), WebDriver, Puppeteer, Appium, or TestCafe
- Choosing browsers — Chromium, Firefox, WebKit
- Setting the base URL — Your application URL
- Enabling TypeScript — Generates
.tsconfig and type definitions - Selecting plugins — screenshotOnFail, retryFailedStep, allure, and more
Flags
| Flag | Short | Description |
|---|---|---|
--yes | -y | Accept all defaults (non-interactive mode) |
--helper <name> | -h | Pre-select the testing helper |
--test-dir <path> | -d | Set the test directory (default: ./tests) |
--typescript | -t | Enable TypeScript for tests (default: true) |
Examples
bash
# Interactive mode (recommended for first time)
ccjs init
# Non-interactive mode for CI
ccjs init --yes
# Pre-select helper and test directory
ccjs init --yes --helper Playwright --test-dir ./e2eGenerated Files
| File | Purpose |
|---|---|
codecept.conf.ts | Main configuration file |
tests/first.test.ts | Starter test file |
steps.d.ts | TypeScript autocompletion definitions |
output/ | Screenshot and report output directory |
TIP
After running ccjs init, use ccjs doctor to verify your environment is set up correctly.