Skip to content

ccjs init

Interactive project scaffolding wizard for CodeceptJS.

Usage

bash
ccjs init

What It Does

The init command creates a complete CodeceptJS project structure with a single command. The interactive wizard guides you through:

  1. Selecting a helper — Playwright (default), WebDriver, Puppeteer, Appium, or TestCafe
  2. Choosing browsers — Chromium, Firefox, WebKit
  3. Setting the base URL — Your application URL
  4. Enabling TypeScript — Generates .ts config and type definitions
  5. Selecting plugins — screenshotOnFail, retryFailedStep, allure, and more

Flags

FlagShortDescription
--yes-yAccept all defaults (non-interactive mode)
--helper <name>-hPre-select the testing helper
--test-dir <path>-dSet the test directory (default: ./tests)
--typescript-tEnable 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 ./e2e

Generated Files

FilePurpose
codecept.conf.tsMain configuration file
tests/first.test.tsStarter test file
steps.d.tsTypeScript autocompletion definitions
output/Screenshot and report output directory

TIP

After running ccjs init, use ccjs doctor to verify your environment is set up correctly.

Released under the MIT License. Built with ❤️ on top of CodeceptJS.