rn-logs-cli
v0.3.0
Published
Fast CLI to read React Native Metro logs via CDP. Built for agent-friendly output with optional TTY niceties.
Readme
rn-logs 🔧
Fast CLI to read React Native Metro logs via CDP. Built for agent-friendly output with optional TTY niceties.
Why
- Lightweight alternative to MCP for log access
- Plain text output for low context usage
- Works with Metro + React Native DevTools
Install
npm install -g rn-logs-clibun add -g rn-logs-cliSee
skills/rn-logs-usage.md
for the agent usage guide.
Package
Published as rn-logs-cli on npm.
Quickstart
rn-logs apps
rn-logs logs --app "MyApp"Usage
rn-logs apps
rn-logs logs --app "MyApp"
rn-logs logs --app "MyApp" --limit 50Commands
apps
List apps connected to Metro.
Options:
--host <host>Metro host (default: localhost)--port <port>Metro port (default: 8081)
logs
Stream or snapshot logs from an app.
Options:
--app <id|name>target app id or name--host <host>Metro host (default: localhost)--port <port>Metro port (default: 8081)--limit <n>capture last n logs then exit--followstream logs (default unless --limit)--verboseinclude full stack traces
Notes
- Requires Metro running and app running on a simulator or device.
- When multiple apps connected, use
--appor select interactively in TTY. - Non-interactive mode stays plain text.
Known Limitations
- CDP attach and React Native DevTools cannot run at the same time; they compete for the inspector channel. Use one per session.
