Skip to content
rootnativePublic

About

Layout checks for iOS and Android, built for AI agents. loupe drives simulators and emulators, and measures each screen in dp: safe areas, cutouts, and edges.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

loupe

Layout checks for iOS and Android, built for AI agents.

loupe drives a simulator, an emulator or a device, opens each screen of your app, and gives your agent exact numbers: element frames, safe areas, cutouts, and edges, in dp (pt on iOS). Your agent can then say "pass" or "fail" with evidence, not with a guess from a screenshot.

loupe is in alpha. On an iOS simulator, each command works but pinch and drag --shot. A new version can change the commands, their options, and their JSON.

The packages

Package What it is
@rootnative/loupe The CLI, the MCP server, and the skill for your agent.
@rootnative/loupe-probe A tiny helper in your app. It gives loupe the app's own safe area, in development only.

Start

Add the MCP server to your agent. In Claude Code:

claude mcp add loupe -- npx -y @rootnative/loupe mcp

Then ask your agent to check your screens, for example: "Sweep the settings and the profile screens of my app in portrait and landscape, and tell me each layout failure." The package README has the setup for other clients, the skill, the CLI, and each command.

loupe needs Node.js 22.13 or later. For Android, it needs adb from the Android SDK platform tools, and an emulator or a device with Android 11 (API level 30) or later. For iOS, it needs a Mac with Xcode 16.4 or later, and a simulator with iOS 18.5 or later.

loupe works with React Native apps: in Expo Go, in a development build, and React Native CLI apps. The package README says what each kind of app needs.

What loupe finds

  • An element under a system bar or the cutout, or outside the safe area.
  • An element that a screen edge cuts.
  • A title off the centre of its bar.
  • An element too small to touch.
  • In RTL, an element on the side where LTR puts it.

Each finding gives the element and its numbers in dp.

Development

The repository is a pnpm workspace. Use the Node.js version in .nvmrc.

pnpm install
pnpm test
pnpm build

CI also runs the built CLI and the MCP server on Android emulators with API levels 30 and 36.

License

MIT

About

Layout checks for iOS and Android, built for AI agents. loupe drives simulators and emulators, and measures each screen in dp: safe areas, cutouts, and edges.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages