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 --helpThe 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 configurationExample
endia init --template nextjsendia 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 pathExample
endia record --url http://localhost:3000 --browser chromiumendia 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 outputExample
endia run --filter "auth/*" --parallel 4 --retry 2endia watch
Run tests on file changes
Flags
--include <glob>Files to watch--exclude <glob>Files to ignoreExample
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 browserExample
endia report --format html --openendia config
Manage configuration
Flags
get <key>Get a config valueset <key> <value>Set a config valuelistShow all configurationExample
endia config set browser firefoxendia update
Update Endia CLI
Flags
--checkCheck for updates without installing--betaInclude beta versionsExample
endia updateConfiguration 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 runendia.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'
}
}