inspect_cli.png Inspect CLI is the spiritual successor to ios-webkit-debug-proxy, handling device communication, simulator discovery, and protocol mappings between WebKit and CDP. It’s the command-line counterpart to Inspect, providing lower-level CDP endpoints for iOS debugging.
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 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:
# Login to your inspect.dev account
inspect login

# Logout when done
inspect logout

πŸ“– Usage

Basic Usage

# Start Inspect with default settings
inspect

# Start with debug output
inspect --debug

Advanced Configuration

# Use custom ports
inspect --ports 9221,9222

# Filter to specific device
inspect --device-id 4ea8dd11e8c4fbc1a2deadbeefa0fd3bbbb268c7

# Use custom DevTools frontend
inspect --frontend http://chrome-devtools-frontend.appspot.com/static/latest/devtools.html

πŸ“‹ Command Reference

Commands

CommandDescription
inspect loginLogin to inspect.dev using OAuth
inspect logoutLogout from inspect.dev
inspectStart the debug server

Options

OptionShortDescriptionDefault
--ports-pPort assignment configuration9221,9222
--frontend-fFrontend source URL or pathdevtools://devtools/bundled/inspector.html
--device-id-dFilter to specific device ID
--debugEnable verbose outputfalse
--helpShow help
--versionShow version

πŸ”Œ Getting Started

1. Connect Your Device

For iOS:
  1. Connect iPhone/iPad via USB
  2. Enable Web Inspector: Settings β†’ Safari β†’ Advanced β†’ Web Inspector
  3. Trust your computer when prompted

2. Start Inspect

inspect

3. Open DevTools

  1. Visit http://localhost:9221 to see connected devices
  2. Click on your device to see available apps
  3. 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