{"id":18275,"library":"detox-cli","title":"detox-cli","description":"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.","status":"active","version":"20.51.0","language":"javascript","source_language":"en","source_url":"https://github.com/wix/detox","tags":["javascript","detox","cli"],"install":[{"cmd":"npm install detox-cli","lang":"bash","label":"npm"},{"cmd":"yarn add detox-cli","lang":"bash","label":"yarn"},{"cmd":"pnpm add detox-cli","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"This package wraps the local detox installation; the actual test logic and API are in the 'detox' package.","package":"detox","optional":false}],"imports":[{"note":"As a CLI tool, it is typically invoked via npx or global install, not imported in code.","symbol":"detox-cli","correct":"npx detox-cli <command>"}],"quickstart":{"code":"npm install -g detox-cli\n# Then run tests in a React Native project with local detox installed:\ndetox test --configuration ios.sim.release","lang":"typescript","description":"Shows global install of detox-cli and basic test command, assuming local detox setup."},"warnings":[{"fix":"npm install --save-dev detox and npm install -g detox-cli","message":"Always install detox-cli globally but keep the 'detox' package as a local devDependency to ensure version alignment.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Use Node.js 18 or later.","message":"Detox CLI may require Node.js >= 18. Check your Node version before installing.","severity":"breaking","affected_versions":">=20.0.0"},{"fix":"Upgrade to detox-cli v20 and refer to current docs.","message":"Older versions of detox-cli (pre-v20) used a different API for starting the test runner.","severity":"deprecated","affected_versions":"<20.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run npm install -g detox-cli or use npx detox-cli.","cause":"detox-cli not installed globally or not in PATH.","error":"detox: command not found"},{"fix":"Add 'detox' as a devDependency: npm install --save-dev detox","cause":"'detox' package is not installed in the local project.","error":"Error: Cannot find module 'detox'"},{"fix":"Ensure 'detox' is installed locally: npm install --save-dev detox","cause":"The CLI wrapper cannot find the 'detox' package in the current project.","error":"detox-cli requires a local detox installation but none was found"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}