跳到正文
TakoAPI
返回技能列表

react-native-logs-cli

由 okwasniewski 提供

Web & Frontend Development
278下载量由 clawskills.sh 提供
2星标
0浏览量
0 个赞登录后即可为这个技能点赞
—暂无评分
你的评分

简介

Use rn-logs to read React Native Metro logs via CDP without MCP overhead.

描述

该技能的功能

rn-logs is a CLI tool that reads React Native Metro logs via the Chrome DevTools Protocol (CDP). It lists connected apps and streams or snapshots log output in plain text, making it usable in non-interactive agent runs.

Reads Metro logs via CDP directly rather than wrapping an MCP server, keeping context overhead low and output format predictable for automated tooling.

何时使用

  • Streaming live Metro logs from a simulator during development
  • Capturing a snapshot of the last 50 log lines for debugging
  • Listing all connected RN apps across multiple running instances
  • Feeding plain-text logs into an AI agent without MCP overhead
  • Checking Metro output on a specific host/port in CI or remote setups

示例工作流

输入

User asks: show me the last 50 log lines from the running RN app

智能体
  1. 1

    Run rn-logs apps to list connected React Native apps

  2. 2

    Identify the target app by id or name from the output

  3. 3

    Run rn-logs logs --app "<id>" --limit 50 to capture a snapshot

  4. 4

    Return the plain-text log output to the user

输出

50 most recent Metro log lines printed as plain text

前置要求

  • rn-logs CLI installed globally via npm or bun

安装

clawhub install okwasniewski/react-native-logs-cli

运行 CLI 命令,或把这段提示词粘贴到 Claude Code、Cursor、Codex 或你在用的任意编程智能体里。

链接