NativeScope / Storage Engine

CLI

Every flag the nativescope command accepts.

nativescope [options]

Running it with no arguments is the intended path: it detects your project, starts Metro with the NativeScope resolver, sets up the Android tunnel if needed, and opens the studio.

Options

FlagDefaultWhat it does
--port <number>4782Port for the local server and the WebSocket the app connects to.
--project <dir>current directoryRun against a project in another directory.
--token <string>random per sessionSession token the app must present. Generated for you; set it only if you are scripting.
--no-metrooffDo not start Metro. Use when you run Metro yourself.
--no-openoffDo not open the browser.
--lanoffBind the service to your local network so a physical iPhone — or an Android device over Wi-Fi — on the same network can connect. See Devices & connection.
--fakeoffConnect a simulated app that generates activity, with no device or simulator.
--fake-scaleoffMake the simulated app large: thousands of keys, multi-megabyte values, a 100k-row table.

Running Metro yourself

--no-metro starts the service without Metro, so you attach the resolver to your own config. See Devices & connection for the setup, the .cjs/.mjs/.ts caveat, and when to choose it over the all-in-one command.

Android devices

No flag is needed. NativeScope watches for devices and reapplies adb reverse when one is plugged in later, when the cable drops, or when the adb server restarts. It reports real problems — more than one device attached, debugging not authorized — instead of failing silently.

If adb is not on your PATH, that whole subsystem is skipped as irrelevant, which is the correct behaviour for iOS-only work.

iOS devices

The iOS Simulator needs no flag — it shares your Mac's loopback.

A physical iPhone connects over Wi-Fi. Start NativeScope with --lan, keep the phone on the same network as your Mac, and reload the app:

npx nativescope --lan
yarn nativescope --lan
pnpm nativescope --lan
bunx nativescope --lan

NativeScope reuses the dev-server host your app already loaded its bundle from, so there is no IP to type. See Devices & connection for the full picture and the security note on --lan.

Developing without an app

--fake is the fastest way to work on the studio itself or to see what NativeScope does before wiring it into a project.

A small simulated app that emits realistic activity:

npx nativescope --fake
yarn nativescope --fake
pnpm nativescope --fake
bunx nativescope --fake

A large one, for exercising the pagination and streaming paths:

npx nativescope --fake --fake-scale
yarn nativescope --fake --fake-scale
pnpm nativescope --fake --fake-scale
bunx nativescope --fake --fake-scale