Skip to content

Commands

All commands are run via the rebound-cli.sh script from the repository root.

Run these three commands after launching a debug build:

Terminal window
./rebound-cli.sh doctor
./rebound-cli.sh check
./rebound-cli.sh summary

doctor tells you if setup is broken. check proves runtime data is flowing. summary is the compact output to paste into PRs, agents, or CI.

Diagnoses connection failures. It checks local tools, direct TCP, Android device state, Rebound socket discovery, and ADB forwarding.

Terminal window
./rebound-cli.sh doctor

Use this when ping or check says the app is not reachable. The output tells you whether the problem is missing adb/nc, no connected device, no rebound socket in the running app, or a socket that exists but does not respond.

Runs a quick sanity pass: ping, snapshot, and summary. This is the fastest way to verify that the app, socket forward, and JSON output are all working together.

Terminal window
./rebound-cli.sh check

Response:

Rebound quick check [adb]
ping: ok
snapshot: ok (45 composables)
summary: ok (10 top entries)
Result: PASS

Health check to verify the connection to the app’s ReboundServer.

Terminal window
./rebound-cli.sh ping

Response: pong

If you get pong, the socket connection is working and the server is alive. If the connection fails, see CLI Setup - Troubleshooting.

Returns a full JSON snapshot of all instrumented composables with their current metrics.

Terminal window
./rebound-cli.sh snapshot

Response: Pretty-printed JSON (via python3 -m json.tool):

{
"composables": {
"com.example.ui.HomeScreen": {
"budgetClass": "SCREEN",
"budgetPerSecond": 3,
"totalCompositions": 189,
"peakRate": 12,
"currentRate": 8,
"totalEnters": 245,
"skipCount": 56,
"skipRate": 0.23,
"forcedCount": 15,
"paramDrivenCount": 174,
"lastInvalidation": "searchQuery",
"parent": "",
"paramStates": "items=DIFFERENT,query=SAME",
"depth": 0,
"paramTypes": "unstable,stable"
}
}
}

This is the same data the IDE plugin receives on each polling cycle. Useful for scripting, logging, or piping into other tools.

Returns a condensed view of the top 10 composables by recomposition rate, plus overall violation statistics.

Terminal window
./rebound-cli.sh summary

Response:

{
"topByRate": [
{"name": "HomeScreen", "rate": 8, "budget": 3, "class": "SCREEN", "status": "VIOLATION"},
{"name": "ProfileHeader", "rate": 11, "budget": 5, "class": "LEAF", "status": "VIOLATION"},
{"name": "SearchBar", "rate": 6, "budget": 10, "class": "CONTAINER", "status": "OK"}
],
"totalViolations": 2,
"totalComposables": 45,
"interactionState": "IDLE"
}

This is the quickest way to check whether any composables are currently over budget.

Live-updating display that refreshes every 1 second. Clears the terminal on each update.

Terminal window
./rebound-cli.sh watch

Press Ctrl+C to stop.

The watch command repeatedly calls summary and displays the results. Useful for monitoring recomposition behavior while interacting with the app — scroll a list, type in a field, or trigger a navigation and watch the rates change in real time.

Returns anonymized aggregate statistics. No function names or identifiers are included.

Terminal window
./rebound-cli.sh telemetry

Response:

{
"budgetClassDistribution": {
"SCREEN": 5,
"CONTAINER": 18,
"LEAF": 15,
"ANIMATED": 3,
"INTERACTIVE": 2,
"LIST_ITEM": 1,
"UNKNOWN": 1
},
"averageRates": {
"SCREEN": 1.2,
"CONTAINER": 3.5,
"LEAF": 2.1,
"ANIMATED": 45.0
},
"peakRates": {
"SCREEN": 8,
"ANIMATED": 95
},
"averageSkipRate": 0.72,
"totalViolations": 2
}

This data is useful for empirical calibration of budget thresholds. If you find that the default budgets are consistently too low or too high for your app’s composition patterns, this data helps inform adjustments.

Telemetry is opt-in at runtime:

ReboundTelemetry.enabled = true // disabled by default