Skip to main content
CLI Guide

Command Line Interface

Record, run, and manage E2E tests from your terminal with the Endia CLI.

Local monorepo package
@endia/cli not published to npm yet

Installation

📦Local package
pnpm --filter @endia/cli start -- --help
Direct binary
node packages/cli/bin/endia.js --help

The CLI package identity is @endia/cli with the endia binary. It is available in this repository and is not yet published to the public npm registry.

Commands

endia init
Initialize Endia in your project

Flags

--template <name>Use a starter template
--forceOverwrite existing configuration

Example

endia init --template nextjs
endia record
Start a new recording session

Flags

--url <url>Target URL to record
--browser <browser>Browser to use (chromium, firefox, webkit)
--headlessRun in headless mode
--output <path>Output file path

Example

endia record --url http://localhost:3000 --browser chromium
endia run
Execute tests

Flags

--filter <pattern>Run tests matching pattern
--parallel <n>Number of parallel workers
--retry <n>Retry failed tests n times
--reporter <type>Output format (json, html, junit)
--ciCI mode with non-interactive output

Example

endia run --filter "auth/*" --parallel 4 --retry 2
endia watch
Run tests on file changes

Flags

--include <glob>Files to watch
--exclude <glob>Files to ignore

Example

endia watch --include "tests/**/*.ts"
endia report
Generate test reports

Flags

--format <type>Report format (html, json, markdown)
--output <path>Output directory
--openOpen report in browser

Example

endia report --format html --open
endia config
Manage configuration

Flags

get <key>Get a config value
set <key> <value>Set a config value
listShow all configuration

Example

endia config set browser firefox
endia update
Update Endia CLI

Flags

--checkCheck for updates without installing
--betaInclude beta versions

Example

endia update

Configuration File

Create a endia.config.js file in your project root to customize the CLI behavior.

Supported formats
endia.config.js
endia.config.ts
endia.config.mjs
.endiarc
Environment Variables

Override config with environment variables prefixed with ENDIA_

ENDIA_BROWSER=firefox endia run
endia.config.js
// endia.config.js
export default {
  // Base URL for tests
  baseUrl: 'http://localhost:3000',
  
  // Browser configuration
  browser: {
    name: 'chromium',
    headless: true,
    viewport: { width: 1280, height: 720 }
  },
  
  // Test settings
  tests: {
    directory: './tests',
    timeout: 30000,
    retries: 2
  },
  
  // Screenshot settings
  screenshots: {
    onFailure: true,
    fullPage: false,
    directory: './screenshots'
  },
  
  // CI/CD settings
  ci: {
    reporter: 'junit',
    outputFile: './reports/results.xml'
  },
  
  // Environment variables
  env: {
    TEST_USER: 'test@example.com'
  }
}

Ready to get started?

Install the CLI and record your first test in minutes.