Inspect CLI
Inspect CLI is a Chrome DevTools Protocol adapter for WebKit on iOS that enables debugging websites and web views with Chrome DevTools and other CDP-compatible tools.
It's the command-line counterpart to Inspect, providing lower-level CDP endpoints for iOS debugging.
Inspect CLI is the spiritual successor to ios-webkit-debug-proxy, handling device communication, simulator discovery, and protocol mappings between WebKit and CDP.
Note: Inspect CLI is a commercial product that requires an Inspect Pro or Inspect Teams subscription.
Installation
npm install -g @inspectdotdev/cli
Start Inspect CLI by running
inspect
📱 What is Inspect CLI?
Key Features:
- 🔍 Debug iOS and Android apps with Chrome DevTools
- 🔐 Secure OAuth authentication with inspect.dev
- 📱 Automatic device discovery and connection
- ⚡ Fast setup - works in seconds
📋 System Requirements
- Node.js: 16 or higher
- macOS: Required for iOS device debugging
- iOS Devices: iOS 6+ with Web Inspector enabled
🔐 Authentication
Before using Inspect CLI, you need to authenticate with your inspect.dev account:
inspect login
inspect logout
📖 Usage
Basic Usage
inspect
inspect --debug
Advanced Configuration
inspect --ports 9221,9222
inspect --device-id 4ea8dd11e8c4fbc1a2deadbeefa0fd3bbbb268c7
inspect --frontend http://chrome-devtools-frontend.appspot.com/static/latest/devtools.html
📋 Command Reference
Commands
inspect login | Login to inspect.dev using OAuth |
inspect logout | Logout from inspect.dev |
inspect | Start the debug server |
Options
--ports | -p | Port assignment configuration | 9221,9222 |
--frontend | -f | Frontend source URL or path | devtools://devtools/bundled/inspector.html |
--device-id | -d | Filter to specific device ID | |
--debug | | Enable verbose output | false |
--help | | Show help | |
--version | | Show version | |
🔌 Getting Started
1. Connect Your Device
For iOS:
- Connect iPhone/iPad via USB
- Enable Web Inspector: Settings → Safari → Advanced → Web Inspector
- Trust your computer when prompted
2. Start Inspect
inspect
3. Open DevTools
- Visit http://localhost:9221 to see connected devices
- Click on your device to see available apps
- Click on an app to open Chrome DevTools
🔧 Configuration
Port Configuration
By default, Inspect CLI uses ports 9221 and 9222:
- 9221: Device list server
- 9222: Debug target server
Change ports if needed:
inspect --ports 8221,8222
Custom DevTools Frontend
Use a different DevTools frontend:
inspect --frontend http://chrome-devtools-frontend.appspot.com/static/latest/devtools.html
🐛 Troubleshooting
Common Issues
"Not authenticated" error:
inspect login
"Port already in use" error:
inspect --ports 8221,8222
iOS device not showing:
- Ensure Web Inspector is enabled in Safari settings
- Try disconnecting and reconnecting the USB cable
- Check that you've trusted the computer
📄 License
This software is proprietary and requires a valid Inspect Pro or Inspect Teams subscription.
🆘 Support
Made with ❤️ by the Inspect team.