Keyframer Inspector

dev.keyframer由 keyframer.dev 发布v0.4.0更新于 Oct 30, 2026

Give your agent eyes for motion: record, slow down and test animations in mobile apps

发布方自己的服务:Keyframer

概览

AI 生成的概览

录制、逐帧回放并诊断运行中应用的 React Native Reanimated 动画,向助手提供掉帧、时间线与修复循环。

可以做什么
  • 查看已连接应用:状态、已注册场景、会话与共享值
  • 录制会话、开始与停止录制、运行已注册场景、回放并对比两次会话
  • 以时间线读取会话、定位到某一时刻、播放、截取画面与截图、导出 GIF 或 MP4
  • 在设备上控制动画时间:减速、暂停、逐帧步进
  • 用 check 与 recheck 执行修复循环,并静态检查源码中的 worklet 与动效错误
  • 列出、打开与保存录制,并读取 Motion Vitals 的线上问题与版本对比
适用场景
适用于调试已接入 Keyframer SDK 的 React Native 应用中的卡顿、掉帧或动画异常,尤其是希望由助手测量、改代码并验证修复的场景;也适合查看 Motion Vitals 的线上动效问题。
运行要求
以本地 npm 包通过 stdio 运行;应用需在开发环境接入 Keyframer inspector SDK 与 Babel 插件,并连接到 macOS 上的 Keyframer Inspector 桌面应用。屏幕捕获与 MP4 导出需要应用支持,MP4 还需 PATH 中有 ffmpeg。可选的 KEYFRAMER_VITALS_READ_KEY 用于启用线上问题相关工具。
安装前请注意
可选的 KEYFRAMER_VITALS_READ_KEY 是 Motion Vitals 的工作区读取密钥,应妥善保管。这些工具会驱动应用并改变其状态:录制、定位、播放、重放与时间控制都会改变屏幕显示,录制文件会写入项目的 .keyframer/recordings 目录。除非创建分享链接,数据保留在本机。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Keyframer Inspector,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Keyframer Inspector

A motion debugger for apps. Every animation, with the line of code that started it, what it cost, and why frames dropped, recorded on the device and scrubbed like a video. Tune a duration or a spring and write the numbers back to your source. Hand the recording to a coding agent over MCP, or gate pull requests on it in CI.

https://github.com/user-attachments/assets/81d909d3-64fb-431b-a06f-1d20da5d5952

This repository holds the SDKs that go into your app, for every platform, under MIT.

PlatformFolderInstall
React Native (Reanimated)react-native/npm i -D @keyframerdev/inspector
iOS (UIKit)ios/Swift Package Manager: https://github.com/keyframer-dev/inspector
Android (Views)android/debugImplementation("dev.keyframer:keyframer-inspector:<version>")
Flutterflutter/flutter pub add keyframer_inspector

The apps connect to Keyframer Inspector, the desktop app (below). React Native apps can also use the panel inside Expo's dev tools, no desktop app needed.

Quick start

React Native. Add the Babel plugin in development (before react-native-worklets/plugin), connect, then press shift+m in Metro and open @keyframerdev/inspector. The npm README has the details, bare React Native included, and react-native/example is an Expo app with it all set up.

js
// babel.config.js (Expo)plugins: process.env.NODE_ENV !== 'production' ? ['@keyframerdev/inspector/babel'] : []
ts
// your root layoutif (__DEV__) require('@keyframerdev/inspector/devtools').connectDevTools({ app: 'MyApp' })

iOS.

swift
import KeyframerInspector
#if DEBUGKeyframerInspector.start()                              // simulator: ws://127.0.0.1:8790KeyframerInspector.start(.init(host: "192.168.1.20"))   // a device: the Mac's LAN address#endif

Android.

kotlin
// Application.onCreate (debuggable builds only)Keyframer.start(this)ObjectAnimator.ofFloat(title, View.ALPHA, 0f, 1f).kfTrack("title").start()

Flutter.

dart
void main() => runApp(const KeyframerInspector(app: 'My app', appPackage: 'my_app', child: MyApp()));

Each folder's README covers the API, what is reported and how, and its tests.

The desktop app

Keyframer Inspector for macOS (Apple silicon and Intel) is where every SDK connects. Download it from Releases. It is free, signed and notarized, and keeps itself up to date.

  • Every platform, one place. iOS, Android, Flutter and React Native apps connect to it on ws://<your Mac>:8790: simulators and emulators on their own, devices on the same network with the address the status bar shows. Several apps at once, with a switcher.

  • The panel. Record, then drag to scrub: the app follows, back to the screen it was on. Tracks show every animation as segments you can click to tune (duration, delay, spring) live, then apply the numbers to your source. Problems come ranked by the frames they cost, each with where it is, what was running and the fix. Compare two sessions, before and after a change. Open any step in Cursor, VS Code, Zed or Xcode.

  • An MCP server for coding agents. Built in, one switch in Settings, and nothing else to install. Claude Code, Codex, Cursor, VS Code, Windsurf, Zed and Claude Desktop can record your app, run its scenarios, read the trace and the problems, and take screenshots. With check and recheck an agent runs the fix loop: measure, change the code, measure again, until the problems are gone and the motion still works. Settings shows the setup for each client; for Claude Code:

    sh
    claude mcp add --transport http keyframer-inspector http://127.0.0.1:8789/mcp
  • A recordings library. Recordings (.kfrec.json) from the panel, from testers' devices or from share links land in one folder. Double-click one to open it; share links open in the app.

  • In the menu bar. Closing the window keeps the relay running. The menu shows the connected apps and the MCP server, with switches for the server and for launching at login.

  • Updates on its own. It checks after launch and every six hours, downloads in the background and installs when you restart or quit. Every update is signed, and the app installs nothing else.

  • Local. Recordings, the relay and the MCP server stay on your Mac. Nothing leaves it unless you make a share link.

Protocol

Every SDK speaks one wire protocol, protocol/inspector.ts: hello, the signals an app exposes, animation events with their call sites, frames, screens, recordings, and what an editor sends back (record, scrub, overrides, scenarios). A new platform needs only to speak it.

Issues and contributions

Issues for any platform, the desktop app and the npm package go here. This repository is published from Keyframer's own; pull requests are welcome, and land here once merged there.

License

MIT for everything in this repository (LICENSE). The desktop app is free and closed source. In the npm package, what runs in your app is MIT (its source is react-native/), and the tools (the CLI, the MCP server and the panel) are under the Functional Source License; see its LICENSE.md.

来源:README.md,提交 90fd922

工具

22

inspector_status

Which app is connected through Metro, the scenarios it registered, the recorded sessions, the shared values (useSharedValue) it has rendered, the worklet mistakes in its code that crash it (with the fix), and what animates now as the app counts it: animated styles and shared values mounted on the screen, what each value drives (fan-out), animation starts per frame by call site, rows that remount, and the cost per list cell.

无需输入参数。

record

Record the app for a while: every shared value (also ones that mount mid-recording), both threads' frame rates and long frames, animations with call sites and stacks, React commits with why components rendered, JS tasks (handlers, effects, timers) and UI-thread worklet time. A person interacts with the app meanwhile (or pass replay: true). Returns the problems found, ranked, each with where it is written and how to fix it. It blocks for durationMs: when you drive the app yourself with another tool (Argent, agent-device, a Maestro flow), use start_recording and stop_recording instead. Prefer run_scenario when the app registered one for the interaction: it is reproducible, so a fix can be checked with compare.

输入参数replaysignalsdurationMs

start_recording

Start recording the app and return at once, so you can drive it with another tool between this call and stop_recording: taps, swipes and flows from a simulator agent (Argent, agent-device, Maestro) or anything else. Records what record does (every shared value, both threads' frame rates and long frames, animations with call sites, React commits, JS tasks, UI-thread worklet time). One recording at a time; it stops by itself after 5 minutes. Use record instead for a fixed stretch while a person uses the app, and run_scenario when the app registered the interaction.

输入参数signals

stop_recording

Stop the recording start_recording began and report the problems found, ranked, each with where it is written and how to fix it: the same report as record. The session is kept for get_trace, compare, save_recording and export_recording. Says so when the recording stopped early: the app disconnected or restarted, or the cap was reached.

无需输入参数。

run_scenario

Run one of the app's registered scenarios (registerScenario: a reproducible interaction, like opening a sheet or scrolling a feed) while recording, and report the problems. Run it before and after a change, then compare the two sessions to check the fix.

输入参数name必填settleMs

compare

Compare two recorded sessions (ids from record / stop_recording / run_scenario, default the last two): frame rates, frames lost, longest frames, rendering, JS task and worklet time, and which problems were fixed, remain or are new.

输入参数afterbefore

get_trace

A session as a timeline: frame drops, JS tasks with where they are written, UI worklets over 2 ms a frame, React commits with the components that rendered and why, animations with symbolicated stacks, logs.

输入参数toMsfromMssessionlibraryFrames

scrub

Set every recorded shared value to its value at a moment of the last recording, so the app shows that frame.

输入参数atMs必填

play

Play the last recording back into the app in real time, from a moment (default the start).

输入参数fromMs

capture_frame

A screenshot of the app. With atMs, first shows that moment of the last recording. Needs an app that can capture its screen (inspector_status says how to set it up).

输入参数atMswidth

export_recording

Render the last recording to a GIF or MP4 file, frame by frame from the app (needs captureScreen). MP4 needs ffmpeg on the PATH; GIF does not.

输入参数fpspathtoMswidthformat必填fromMstouches

list_recordings

The recordings in this project's library (.keyframer/recordings), newest first: ones made on a device, saved in the panel or with save_recording, and the ones kept automatically when a recording stops (the panel's, record's, stop_recording's and run_scenario's; marked automatic, only the newest are kept), with the titles they were renamed to.

无需输入参数。

open_recording

Open a recording file (.kfrec.json) made on a device (Motion Scan record button) or saved from the panel. It becomes the recording every other tool reads; returns its report. A recording from a build without Metro (an internal preview build) has raw stacks: pass that build's source map to map them to source lines.

输入参数path必填sourceMap

save_recording

Keep the last recording for good in the library, as a .kfrec.json file the dev tools panel can open. record, stop_recording and run_scenario keep each recording automatically (only the newest automatic ones stay): saving one of those keeps that copy instead of writing a second one.

输入参数path

get_screenshot

A screenshot the recording took on the device (recordings made on the device carry a few): the one shown at atMs.

输入参数atMs必填

replay

Run the app's registered replay (registerReplay): re-mount the screen, re-run its entrance.

无需输入参数。

set_time

Slow down, pause or step the app's animations on the device, to watch a fast animation or a glitch frame by frame (capture_frame shows the screen). scale: 1 is normal speed, 0.5 half, 0.25 a quarter, 0.1 a tenth, 0 paused. step, with scale 0: advance that many frames at the display's refresh rate, then hold again. Returns the speed the app says it runs at now; every panel shows the same. Recordings made while slowed carry time markers and their durations are stretched by 1 / scale: set scale 1 again before measuring. Needs an app that lists the time capability (inspector_status says).

输入参数stepscale必填

check

Start a fix loop: measure the app and keep the result as the baseline recheck compares with. Scenarios (default all the app registered) run the median of several runs after a warm-up, each from a clean start (the app's reload). Or a recording: a .kfrec.json file (with sourceMap for a preview build), or "current" for the last recording; each of its problems is then verified by a scenario that reproduces it, by playing the recording back (UI-thread, rendering and layout problems only), or marked Not verifiable. Returns the problems ranked, each with a short ref (P1…), where it is, evidence, the fix, how it will be verified, and the motion that must keep working. With field (a Motion Vitals problem id from field_problems, like SHOP-12), it also says whether that call site dropped frames here: reproduced or not reproduced. Takes minutes on a big app.

输入参数runsfieldreloadwarmupsettleMsrecordingscenariossourceMapscenarioStub

recheck

Measure what check measured again, the same way, and compare with check's baseline. Returns Fixed (gone, and its animations still start and its values still move), Still there, New, Removed (gone because its animation or value stopped: not a fix), Not verifiable, the numbers before and after, and done: true or false with the reason. Call it after a change has reloaded in the app (Fast Refresh, hot reload or a rebuild).

无需输入参数。

field_problems

The top field problems of a Motion Vitals project (slow frames from production, keyframer.dev/app/vitals), most frames lost first, in the dashboard's words: where each is (call site and screen), how many frames it drops while it runs against its screen's baseline, the devices and OS where it is worst, the causes of its slow frames, its status (New, Came back, Worse, Ongoing, Resolving, Fixed, Ignored), the check command and the dashboard's agent prompt. Then check with field: "<id>" measures it here. Needs KEYFRAMER_VITALS_READ_KEY: a workspace read key (kfw_) or a kf_ API key.

输入参数oslimitstatusproject必填version

field_compare

Compare two versions of a Motion Vitals project, the way its Versions page does: hitch time, slow and frozen frames, janky sessions, and every problem call site as Worse, Came back, New, Still there, Better, Fixed or Ignored, with its drop rate in each version. Default: the latest version against the one before it with enough sessions. After a fix ships, it says whether the field problem is Fixed. Needs KEYFRAMER_VITALS_READ_KEY.

输入参数tofromproject必填

lint_project

Read the project's source for the mistakes the inspector's Babel plugin finds while Metro builds it, without running the app (keyframer-inspect lint): worklet crashes (a worklet using a value declared after it, or calling a JS function on the UI thread; severity crash, always listed) and motion mistakes that do not crash (a descending interpolate range, scheduleOnRN on every frame, a spring config without mass, a shared value read while rendering, deprecated APIs…; severity error, warning or info). Over the project root this server was started with, or files and folders inside it; node_modules, build output and native folders are skipped. Returns each finding as file:line, severity, rule, message and its fix, most severe first. No app needs to be connected. React Native (Reanimated, worklets, Gesture Handler) only.

输入参数limitpathsseverity

版本历史

2
  1. v0.4.0最新Oct 23, 2026
  2. v0.3.0Oct 21, 2026

评分

已满足适用检查项的 90%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分
  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

其他 Keyframer 集成