NativeScope / Storage Engine
CLI
Every flag the nativescope command accepts.
On this page
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
| Flag | Default | What it does |
|---|---|---|
--port <number> | 4782 | Port for the local server and the WebSocket the app connects to. |
--project <dir> | current directory | Run against a project in another directory. |
--token <string> | random per session | Session token the app must present. Generated for you; set it only if you are scripting. |
--no-metro | off | Do not start Metro. Use when you run Metro yourself. |
--no-open | off | Do not open the browser. |
--lan | off | Bind 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. |
--fake | off | Connect a simulated app that generates activity, with no device or simulator. |
--fake-scale | off | Make 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 --lanyarn nativescope --lanpnpm nativescope --lanbunx nativescope --lanNativeScope 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 --fakeyarn nativescope --fakepnpm nativescope --fakebunx nativescope --fakeA large one, for exercising the pagination and streaming paths:
npx nativescope --fake --fake-scaleyarn nativescope --fake --fake-scalepnpm nativescope --fake --fake-scalebunx nativescope --fake --fake-scale
