detox-cli

raw JSON →
20.51.0 verified Sat Apr 25 auth: no javascript

Optional global CLI wrapper for Detox, a gray-box end-to-end testing library for React Native and native mobile apps. This package (v20.51.0) provides the `detox` command-line tool for running tests on simulators/emulators. It is updated alongside the main `detox` package with frequent releases (multiple per month) and supports React Native 0.84 and iOS 26. Key differentiator: lightweight wrapper that can be installed globally, delegating to the local `detox` package to avoid version mismatches.

error detox: command not found
cause detox-cli not installed globally or not in PATH.
fix
Run npm install -g detox-cli or use npx detox-cli.
error Error: Cannot find module 'detox'
cause 'detox' package is not installed in the local project.
fix
Add 'detox' as a devDependency: npm install --save-dev detox
error detox-cli requires a local detox installation but none was found
cause The CLI wrapper cannot find the 'detox' package in the current project.
fix
Ensure 'detox' is installed locally: npm install --save-dev detox
gotcha Always install detox-cli globally but keep the 'detox' package as a local devDependency to ensure version alignment.
fix npm install --save-dev detox and npm install -g detox-cli
breaking Detox CLI may require Node.js >= 18. Check your Node version before installing.
fix Use Node.js 18 or later.
deprecated Older versions of detox-cli (pre-v20) used a different API for starting the test runner.
fix Upgrade to detox-cli v20 and refer to current docs.
npm install detox-cli
yarn add detox-cli
pnpm add detox-cli

Shows global install of detox-cli and basic test command, assuming local detox setup.

npm install -g detox-cli
# Then run tests in a React Native project with local detox installed:
detox test --configuration ios.sim.release