@buoy-gg/tv-remote

中文文档
7.0.87发布于 2026/11/07TypeScriptESM + CJS零依赖近 30 天下载 4450

TV remote capture for React Native TV apps — records the D-pad/select/menu events the app actually receives, so Buoy Desktop can drive and replay real remote presses. Part of Buoy devtools.

原始使用文档
文档目录6 节
  1. Install
  2. Account setup
  3. Connect a TV app
  4. Capture and replay
  5. Desktop and MCP
  6. Web support (unreleased)

@buoy-gg/tv-remote

Record remote events received by a React Native TV app and inspect them in Buoy Desktop. Desktop can send supported host-side input and replay recorded sequences. The device package observes events; it does not inject hardware presses itself.

Install

npm install @buoy-gg/core @buoy-gg/external-sync @buoy-gg/tv-remote

Account setup

Start in a development build. You need a Free or Pro Buoy account. Sign in from your app's folder:

npx --package=@buoy-gg/core buoy login

Your browser opens buoy.gg. Click Allow. The CLI then writes a dev token. It works in dev builds for 30 days.

On Expo, the token goes in .env.development.local. Buoy reads it by itself in dev builds. You can also pass it in yourself:

import { Buoy } from "@buoy-gg/core";

Buoy.init({ licenseKey: process.env.EXPO_PUBLIC_BUOY_KEY });

On React Native CLI, the token goes in .env.local as BUOY_KEY. React Native does not load that file by itself. Pass the token in with your app's own env setup. Keep the menu inside the providers used by your app. Restart the development server after installing packages. See the Quick Start for the complete root component.

Connect a TV app

Use a compatible react-native-tvos app and follow the TV installation guide. Mount the core integration after account initialization:

import { FloatingDevTools } from "@buoy-gg/core";

<FloatingDevTools headless />;

Keep the TV app headless so a focusable developer overlay does not interfere with its navigation. Open Desktop, sign in, select the device, and open the tool's panel. A phone build is not a substitute for testing TV behavior.

Capture and replay

Arm recording in Desktop, press a short sequence on the physical or simulated remote, and compare the received events with the app's behavior. Disarm when done. Menu capture on tvOS is opt-in and is released on disarm.

TargetHost input support
Android TV emulator or authorized deviceadb input key events; the host must be able to reach the target.
Apple TV simulatoridb arrows, select, and menu; play/pause is unsupported in this path.
Physical Apple TVRecord received events; host replay is unsupported.

The Apple TV simulator lane requires idb separately from Xcode. Follow Desktop diagnostics and the TV guide for host setup. Capture depends on supported TV event APIs and account access; it does not guarantee every OS-level remote event reaches JavaScript.

For custom integrations, exports include arm, disarm, clear, setMenuCapture, getEventsSince, getState, subscribe, and tvRemoteSyncAdapter. Check getState().supported before treating a platform as available.

Full TV Remote guide

Desktop and MCP

React Native connections require @buoy-gg/external-sync. Follow the Desktop connection guide, sign in to Desktop separately, and confirm the selected device. MCP uses the sign-in from buoy login on your computer. Free has the basic MCP. Reading this tool from the MCP needs Pro.

Device data can travel over your LAN to the configured broker. Account validation makes network requests. See Telemetry for data-flow details.

Web support (unreleased)

Browser capture observes keyboard events without consuming them. It does not reproduce a TV’s native focus behavior. The browser build is available in this checkout and has not been published yet. See the web setup guide for registration, dependencies, and browser boundaries.

版本与发布记录

@buoy-gg/tv-remote 共发布 56 个版本,首次发布于 2026/08/30;过去 12 个月发布了 56 个版本。

版本发布日期距今
7.0.87latest2026/11/071 天前
7.0.862026/11/062 天前
7.0.852026/11/053 天前
7.0.842026/11/035 天前
7.0.832026/11/035 天前
7.0.822026/11/036 天前

关于 @buoy-gg/tv-remote 的常见问题

@buoy-gg/tv-remote 是什么?

TV remote capture for React Native TV apps — records the D-pad/select/menu events the app actually receives, so Buoy Desktop can drive and replay real remote presses. Part of Buoy devtools.

如何安装 @buoy-gg/tv-remote?

在项目目录运行 npm install @buoy-gg/tv-remote,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(*)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@buoy-gg/tv-remote 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@buoy-gg/tv-remote 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@buoy-gg/tv-remote 可以商用吗?

@buoy-gg/tv-remote 使用 未声明 许可。package.json 没有声明许可证。没有许可证的代码默认保留全部权利,商用前请联系作者或查看仓库中的 LICENSE 文件。以上为概括,不构成法律意见,请以许可原文为准。

@buoy-gg/tv-remote 的下载量有多少?

根据 npm 官方下载统计,@buoy-gg/tv-remote 在 2026/10/09 – 2026/11/07 这 30 天内被下载 4,450 次,日均约 148 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@buoy-gg/tv-remote 还在维护吗?

最新版本 7.0.87 发布于 2026/11/07(1 天前);至今共发布 56 个版本,其中过去 12 个月发布了 56 个;首次发布于 2026/08/30。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。