Cockpit
AI-first control and verification for real Flutter apps.
Inspect the live tree · Act on the real UI · Capture proof
简体中文 · AI host setup · Install Cockpit
Cockpit gives an AI agent a reliable control plane for the application that is
actually running—not a screenshot guesser. Flutter gets first-class inspection
and interaction; native, desktop, and web targets stay available as black-box
targets.
What you get
- Flutter-native control. Inspect mounted
Element and RenderObject
structure, derive stable structural selectors, operate custom widgets, and
reveal lazy content without adding business-screen Semantics labels.
- A short development session. Start once, reuse a short lowercase base-36 handle,
then inspect, tap, type, scroll, open links, reload, diagnose, and
capture evidence in the same loop.
- Recorded interaction. The in-app interaction recorder captures real user
interaction and exports replayable
cockpit.test/v2 cases from the CLI,
Console, or MCP.
- Real boundary coverage. Cross system dialogs, native screens, platform
views, WebViews, deep links, logs, runtime errors, and network evidence on
Android, iOS, macOS, Linux, Windows, and Web black-box targets.
- Agent-first output. Brief canonical LON is the default; use JSON or YAML
when a parser needs it. Large trees and evidence return verified paths, so
context stays small and actionable.
- One control surface. CLI, MCP, REST/SSE, Cockpit Console, and Flutter
integration tests share the same typed resources and operation contracts.
60-second Flutter loop
From the Flutter project (after the Dart-only bridge entrypoint or optional
development module is wired):
cockpit dev start
cockpit dev inspect "Save"
cockpit dev tap "Save"
cockpit dev type "hello" --into "Message"
cockpit dev scroll "Activity"
cockpit dev reload
cockpit dev diagnose
cockpit dev screenshot
dev owns project discovery, process, port, bridge, and session isolation.
Commands fail clearly on ambiguity instead of guessing. Unexpected overlays or
system prompts expose a bounded recovery path so the agent can continue.
When the project has multiple checkouts, cockpit dev keeps separate workspaces for routine cockpit dev;
use cockpit session list and cockpit session show HANDLE to see what is running.
--session HANDLE targets only that command. A returned recovery next remains scoped to the
same development session.
Flutter integration tests
Keep Flutter's normal integration_test runner and add Cockpit's real locator,
native evidence, and host actions:
flutter pub add --dev flutter_cockpit_test
import 'package:flutter_cockpit_test/flutter_cockpit_test.dart';
void main() {
cockpitTestWidgets(
'creates a task',
app: buildDevelopmentApp,
body: (cockpit) async {
await cockpit.tap('New task');
await cockpit.type('Buy milk', into: 'Task title');
await cockpit.tap('Save');
await cockpit.expectText('Task created', 'Task created');
},
);
}
The facade supports structural and multi-condition selectors, hit-tested
gestures, lazy and nested scrolling, assertions, snapshots, native screenshots,
recording, viewport control, system actions, and per-call timeouts. To reuse
the same scenario on release builds and native black-box targets, author it
against the platform-neutral cockpit_test contract.
Choose a package