
Note: Inspect CLI is a commercial product that requires an Inspect Pro or Inspect Teams subscription.
Installation
๐ฑ What is Inspect CLI?
Key Features:- ๐ Debug iOS websites and WebView with Chrome DevTools
- ๐ Discovery of iOS Simulators
- ๐ฑ Automatic device discovery and connection
- โก Fast setup - works in seconds
๐ System Requirements
- Node.js: 16 or higher
- OS: Works on MacOS, Windows and Linux.
- iOS Devices: iOS 12+ with Web Inspector enabled
๐ Authentication
Before using Inspect CLI, you need to authenticate with your inspect.dev account:๐ Usage
Basic Usage
Advanced Configuration
๐ Command Reference
Commands
| Command | Description |
|---|---|
inspect login | Login to inspect.dev using OAuth |
inspect logout | Logout from inspect.dev |
inspect | Start the debug server |
Options
| Option | Short | Description | Default |
|---|---|---|---|
--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
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
Custom DevTools Frontend
Use a different DevTools frontend:๐ Troubleshooting
Common Issues
โNot authenticatedโ error:- Ensure Web Inspector is enabled in Safari settings
- Try disconnecting and reconnecting the USB cable
- Check that youโve trusted the computer