Skip to main content
Version: 20.x

detox

Detox CLI lets you operate Detox from command line.

Installation

Install detox-cli globally via npm:

npm install detox-cli --global

Usage

detox <command> [options]

Commands

CommandDescription
initCreate initial E2E tests folder for Detox.
buildRun the command defined in 'build' property of the specified configuration.
testInitiating your test suite.
recorderStarts a Detox Recorder recording.
build-framework-cacheMacOS only. Builds or rebuilds a cached Detox framework and/or XCUITest-runner in ~/Library/Detox. The cache is specific for each combination of Xcode and Detox versions.
clean-framework-cacheMacOS only. Deletes all compiled framework and XCUITest-runner binaries from ~/Library/Detox, they will be rebuilt on 'npm install' or when running 'build-framework-cache'.
rebuild-framework-cacheMacOS only. Cleans and builds a cached Detox framework and XCUITest-runner in ~/Library/Detox. The cache is specific for each combination of Xcode and Detox versions.
reset-lock-fileResets Detox lock file completely - all devices are marked as available after that.
run-serverStarts a standalone Detox server.

Options

OptionsDescription
--versionShow version number
--helpShow help