@houwert/conductor 0.19.1 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,56 @@
1
+ ---
2
+ name: conductor-create-flow
3
+ description: Author and run Maestro-compatible YAML flows and command sequences with the conductor CLI, including recording flows from live interactions and sharding them across devices. Use when scripting a repeatable multi-step app journey, running an existing Maestro flow, recording a flow by interacting with the app, or running flows in parallel across booted devices.
4
+ ---
5
+
6
+ # Conductor — flows
7
+
8
+ A **flow** is a YAML file describing a sequence of conductor commands.
9
+ Conductor's format is a subset of [Maestro](https://maestro.mobile.dev)'s — most
10
+ existing Maestro flows run unchanged. Use flows for repeatable journeys; use
11
+ `conductor-device-interact` for one-off ad-hoc steps.
12
+
13
+ ## Run flows
14
+
15
+ | Command | Purpose |
16
+ |---|---|
17
+ | `conductor run-flow <file> [--env K=V] [--benchmark]` | Run a Maestro YAML flow file |
18
+ | `conductor run-flow-inline '<yaml>' [--benchmark]` | Run inline YAML from the command line |
19
+ | `conductor run-sequence [--file path.json]` | Run a JSON sequence of conductor commands serially; reads stdin if no `--file` |
20
+ | `conductor run-parallel --flows-dir <path>` | Shard a directory of flows across all booted devices |
21
+
22
+ `--benchmark` prints elapsed time per command and total flow time.
23
+
24
+ ## Flow YAML
25
+
26
+ ```yaml
27
+ appId: com.example.myapp
28
+ ---
29
+ - launchApp
30
+ - tapOn: "Sign In"
31
+ - inputText: "user@example.com"
32
+ - assertVisible: "Dashboard"
33
+ ```
34
+
35
+ `run-sequence` JSON shape (stops on first non-zero exit):
36
+
37
+ ```json
38
+ { "steps": [ { "cmd": "tap-on", "args": ["Login"] }, { "cmd": "input-text", "args": ["user@example.com"] } ] }
39
+ ```
40
+
41
+ ## Record a flow from your interactions
42
+
43
+ | Command | Purpose |
44
+ |---|---|
45
+ | `conductor flow record start [--out path]` | Start recording this session's interactions to a YAML file |
46
+ | `conductor flow record echo <text>` | Insert a `console.log` step |
47
+ | `conductor flow record status` | Show the active recording path |
48
+ | `conductor flow record finish` | Close the recording, print the file path |
49
+
50
+ Record, then interact via `conductor-device-interact`; each action is appended
51
+ to the flow. `finish` gives you a runnable `.yaml`.
52
+
53
+ ## Tips
54
+
55
+ - Add `--json` for machine-readable output; a failed step exits non-zero.
56
+ - `conductor run-flow --help` (and friends) for exact flags.
@@ -0,0 +1,96 @@
1
+ ---
2
+ name: conductor-device-interact
3
+ description: Drive a running iOS simulator, Android emulator, tvOS simulator, or Playwright web app with the conductor CLI. Use when launching apps, tapping UI elements, typing text, scrolling/swiping, performing gestures, pressing hardware/keyboard keys, opening URLs or deep links, navigating back, or verifying an app change in the real running app.
4
+ ---
5
+
6
+ # Conductor — device interaction
7
+
8
+ `conductor` drives a real running app the way a user would: launch it, tap,
9
+ type, scroll, and assert. It bundles its own native drivers — no second CLI to
10
+ install. Use it to verify a change in the actual app, not just in tests.
11
+
12
+ To **observe** the screen (inspect the hierarchy, screenshot, read element
13
+ state), use the `conductor-inspect` skill — it pairs with this one.
14
+
15
+ ## The core loop: act → observe → act
16
+
17
+ Never tap blind, never assume the result. After every action, observe before
18
+ the next one.
19
+
20
+ 1. **Observe** with `conductor capture-ui` (see `conductor-inspect`) to see the
21
+ screen and get short element refs (`@e1`, `@e2`, …).
22
+ 2. **Act** — `tap-on`, `input-text`, `scroll`, etc.
23
+ 3. **Confirm** with `assert-visible` / another `capture-ui`.
24
+
25
+ ```bash
26
+ conductor launch-app com.example.myapp
27
+ conductor capture-ui # observe; get @eN refs
28
+ conductor tap-on "Sign In" # or: conductor tap-on @e3
29
+ conductor input-text "user@example.com"
30
+ conductor assert-visible "Dashboard"
31
+ ```
32
+
33
+ ## Interaction commands
34
+
35
+ | Command | Purpose |
36
+ |---|---|
37
+ | `conductor launch-app <appId>` | Launch app (saved to session). `--no-stop-app` resumes; `--argument key=value` passes launch args |
38
+ | `conductor stop-app [<appId>]` | Stop the app |
39
+ | `conductor tap-on <element>` | Tap by text, id, or `@eN`. `--long-press`, `--double-tap`, `--optional`, `--index <n>` |
40
+ | `conductor input-text <text>` | Type into the focused field |
41
+ | `conductor erase-text [n]` | Erase n characters (default 50) |
42
+ | `conductor press-key <key>` | Press a key (Enter, Backspace, Home, …) |
43
+ | `conductor hide-keyboard` | Dismiss the on-screen keyboard |
44
+ | `conductor back` | Press back |
45
+ | `conductor scroll [--direction down\|up\|left\|right]` | Scroll |
46
+ | `conductor scroll-until-visible <element> [--direction] [--timeout ms]` | Scroll until element appears |
47
+ | `conductor swipe --direction <dir>` / `--start <x,y> --end <x,y> [--duration ms]` | Swipe |
48
+ | `conductor open-link <url>` | Open a URL / deep link |
49
+ | `conductor pinch [--scale N] [--center x,y]` | Two-finger pinch (scale<1 out, >1 in) |
50
+ | `conductor rotate-gesture [--degrees N] [--center x,y]` | Two-finger rotate |
51
+ | `conductor gesture <json\|--file path>` | Play a multi-touch path |
52
+ | `conductor clipboard read` / `clipboard write <text>` / `paste` | Clipboard (iOS) |
53
+ | `conductor list-options [command]` | List valid values for enumerated params |
54
+
55
+ ## Discovering valid values
56
+
57
+ Several commands only accept a fixed set of values (`press-key <key>`,
58
+ `--direction`, `set-orientation`, `set-viewport --preset`/`--color-scheme`,
59
+ `logs --level`/`--source`, `--platform`). Don't guess — list them:
60
+
61
+ - `conductor <command> --options` — valid values for that command, e.g.
62
+ `conductor press-key --options`, `conductor swipe --options`.
63
+ - `conductor list-options [command|param]` — same data; with no argument it
64
+ lists every enumerated parameter, or filter by name (`list-options direction`).
65
+ - Add `--json` for machine-readable output.
66
+
67
+ ## Selecting elements
68
+
69
+ Positional `<element>` matches **accessibility id first, then visible text**.
70
+ Disambiguate when multiple match:
71
+
72
+ - `--id <id>` / `--text <text>` — id-only / text-only matching
73
+ - `--index <n>` — nth match (0-based)
74
+ - `--below` / `--above` / `--left-of` / `--right-of <text>` — relative position
75
+ - `--focused`, `--enabled`, `--checked`, `--selected` — state filters
76
+ - `--timeout <ms>` — wait for the element to appear
77
+ - `--optional` — missing element is a no-op, not an error
78
+ - `@eN` — exact element from the **last `capture-ui`** (cached coords, ephemeral
79
+ ~60s; re-capture after navigating)
80
+
81
+ If you can't find an element, run `conductor inspect` or `capture-ui` to see the
82
+ real ids and texts rather than guessing.
83
+
84
+ ## ⚠️ Don't reset state to "fix" navigation
85
+
86
+ Never use `launch-app --clear-state`, `clear-state`, or `--clear-keychain` to
87
+ clear focus or navigation — they **wipe user data and sign the user out**, and
88
+ can't be undone without their credentials. Navigate out with `back` / Menu, or
89
+ relaunch without the flag. (See `conductor-device-setup`.)
90
+
91
+ ## Tips
92
+
93
+ - `--device <id>` / `--device-name <name>` targets a device; `--platform <ios|android|tvos|web>` scopes by platform.
94
+ - Add `--json` for machine-readable output; failed assertions exit non-zero.
95
+ - Run a per-session daemon for many commands (see `conductor-device-setup`).
96
+ - `conductor <command> --help` for exact flags.
@@ -0,0 +1,73 @@
1
+ ---
2
+ name: conductor-device-setup
3
+ description: Boot, list, and manage devices and app installs for the conductor CLI — iOS simulators, Android emulators, tvOS simulators, and Playwright web browsers — plus sessions, the warm-driver daemon, and the parallel device pool. Use when starting or stopping a simulator/emulator/browser, installing or launching an app, setting up the web driver, keeping the driver warm, or coordinating multiple devices for parallel agents.
4
+ ---
5
+
6
+ # Conductor — device & app setup
7
+
8
+ Get a device running and an app installed before you drive it. Start here when
9
+ nothing is booted yet.
10
+
11
+ ## Orient first
12
+
13
+ ```bash
14
+ conductor workspace info # detected project type, bundle IDs, devices, Metro port — best first call
15
+ conductor list-devices # booted + available devices
16
+ conductor foreground-app # bundle id of the app currently in front
17
+ conductor list-apps # installed app ids / package names
18
+ ```
19
+
20
+ ## Devices
21
+
22
+ | Command | Purpose |
23
+ |---|---|
24
+ | `conductor start-device --platform <ios\|android\|tvos\|web>` | Boot a simulator/emulator or start the web driver |
25
+ | `conductor start-device --os-version <n> --device-type <name>` | Pick OS version + device type (creates if needed) |
26
+ | `conductor stop-device [<name-or-id>] [--all]` | Shut down device(s) |
27
+ | `conductor delete-device <name-or-id> [--all]` | Delete simulator(s)/AVD(s)/web session(s) |
28
+ | `conductor set-location --lat <n> --lng <n>` | Set GPS coordinates |
29
+ | `conductor set-orientation <portrait\|landscape>` | Set orientation |
30
+ | `conductor set-viewport [<w> <h>] [--preset mobile\|tablet\|desktop]` | Resize web viewport (web only) |
31
+ | `conductor install-web [--check] [browser]` | Install a Playwright browser (chromium/firefox/webkit); `--check` = status |
32
+
33
+ ## App lifecycle
34
+
35
+ | Command | Purpose |
36
+ |---|---|
37
+ | `conductor install-app <path>` | Install .app / .ipa / .apk |
38
+ | `conductor launch-app <appId>` | Launch app (saved to session); `--no-stop-app`, `--argument key=value` |
39
+ | `conductor stop-app [<appId>]` | Stop app |
40
+ | `conductor uninstall-app <appId>` | Uninstall app |
41
+ | `conductor copy-app <bundleId> --from <id> --to <id>` | Copy an installed app between iOS simulators |
42
+ | `conductor download-app <appId> --output <path>` | Download installed app binary |
43
+
44
+ ### ⚠️ Destructive flags — ask the user first
45
+
46
+ `conductor clear-state [<appId>]`, `launch-app --clear-state`, and
47
+ `launch-app --clear-keychain` **wipe app data and sign the user out**, and can't
48
+ be undone without their credentials. Never use them to "reset focus" or clear
49
+ navigation — relaunch without the flag, or navigate out with `back` / Menu. If
50
+ you genuinely need one, ask the human first.
51
+
52
+ ## Sessions, daemon & device pool
53
+
54
+ A **session** remembers the last device + app so you don't re-specify them.
55
+ Parallel agents each get their own `--session <name>` so they don't collide.
56
+
57
+ | Command | Purpose |
58
+ |---|---|
59
+ | `conductor session [--clear] [--list]` | Show, clear, or list sessions |
60
+ | `conductor daemon-start` | Start the per-session background daemon (keeps the driver warm — do this for any multi-step session) |
61
+ | `conductor daemon-status` | Show daemon status |
62
+ | `conductor daemon-stop [--all]` | Stop this session's daemon (`--all` = every session) |
63
+ | `conductor device-pool --list` | List devices + pool status |
64
+ | `conductor device-pool --acquire` | Claim a free device (prints id) |
65
+ | `conductor device-pool --release <id>` | Release a device back to the pool |
66
+
67
+ Don't leave a daemon running when you're done — `daemon-stop` it.
68
+
69
+ ## Tips
70
+
71
+ - `--device <id>` / `--device-name <name>` targets a device; `--platform` scopes by platform.
72
+ - Add `--json` for machine-readable output.
73
+ - `conductor <command> --help` for exact flags.
@@ -0,0 +1,48 @@
1
+ ---
2
+ name: conductor-inspect
3
+ description: Read the live UI state of a running app with the conductor CLI — view hierarchy, accessibility snapshot, screenshots, focused element, and element refs. Use when you need to see what's on screen, find an element's id/text/coordinates, take a screenshot, check focus, or assert that something is (or isn't) visible before or after acting.
4
+ ---
5
+
6
+ # Conductor — inspection & assertions
7
+
8
+ These commands let you **observe** a running app's screen so you know what to do
9
+ next. Pair them with `conductor-device-interact`, which acts on what you find
10
+ here. Always observe before you act, and confirm after.
11
+
12
+ ## Observe the screen
13
+
14
+ | Command | Purpose |
15
+ |---|---|
16
+ | `conductor capture-ui [--output <path.json>]` | Screenshot + hierarchy + a11y snapshot in one JSON bundle; assigns short `@eN` refs. **Preferred way to observe.** |
17
+ | `conductor inspect [--dump]` | Print the UI hierarchy (`--dump` = raw driver output) |
18
+ | `conductor inspect --at <x,y> [--tappable]` | Topmost view at a screen point |
19
+ | `conductor focused [--poll [ms]]` | Metadata of the focused element. `--poll` watches changes — only with a bounded use, then stop it |
20
+ | `conductor take-screenshot [<element>] [--output <path>] [--full-page]` | Screenshot; crop to a matched element; `--full-page` (web) |
21
+
22
+ `capture-ui` is the workhorse: it returns the screen as structured data **and**
23
+ gives each element a ref like `@e3` that `conductor tap-on @e3` taps by cached
24
+ coordinates. Refs are ephemeral (~60s) — re-capture after navigating or waiting.
25
+
26
+ ```bash
27
+ conductor capture-ui --output /tmp/screen.json
28
+ # read it: element texts, ids, frames, and @eN refs
29
+ conductor tap-on @e5
30
+ ```
31
+
32
+ ## Assertions
33
+
34
+ | Command | Purpose |
35
+ |---|---|
36
+ | `conductor assert-visible <element> [--timeout ms]` | Assert element is visible (non-zero exit on failure) |
37
+ | `conductor assert-not-visible <element> [--timeout ms]` | Assert element is absent |
38
+
39
+ Both take the same selectors as `tap-on`: `--id`, `--text`, `--index`,
40
+ `--below` / `--above` / `--left-of` / `--right-of`, `--focused`, `--enabled`,
41
+ `--checked`, `--selected`, `--optional`.
42
+
43
+ ## Tips
44
+
45
+ - Add `--json` to parse output programmatically (pipe through `jq`).
46
+ - When an interaction can't find an element, `inspect` / `capture-ui` shows the
47
+ real ids and texts on screen — don't guess selectors.
48
+ - `conductor <command> --help` for exact flags.
@@ -0,0 +1,51 @@
1
+ ---
2
+ name: conductor-metro-debugger
3
+ description: Inspect a running app's JS runtime, logs, and network with the conductor CLI — evaluate JS in React Native (Hermes) or the web page, dump the React component tree, read console/Metro/device logs, and inspect or issue HTTP requests. Use when debugging app behavior, reading logs, evaluating expressions in the live runtime, inspecting React components, or examining network traffic.
4
+ ---
5
+
6
+ # Conductor — runtime debugging, logs & network
7
+
8
+ Inspect what a running app is doing under the UI — its JS runtime, console
9
+ output, and HTTP traffic. Works against React Native (Hermes/Fusebox) and
10
+ Playwright web.
11
+
12
+ ## Runtime (React Native / web)
13
+
14
+ | Command | Purpose |
15
+ |---|---|
16
+ | `conductor debug status [--port N]` | RN debugger connection info |
17
+ | `conductor debug evaluate <expr> [--port N]` | Run JS in the app runtime (Hermes or web page) |
18
+ | `conductor debug component-tree [--port N]` | On-screen React component tree |
19
+ | `conductor debug inspect-element <x,y>` | React component at a screen point |
20
+ | `conductor debug log-registry [--source metro]` | Summarize recent Metro/Hermes console logs |
21
+
22
+ ## Logs
23
+
24
+ | Command | Purpose |
25
+ |---|---|
26
+ | `conductor logs --recent <n>` | Last N buffered log lines — **agent-friendly, exits immediately** |
27
+ | `conductor logs [--source metro\|device] [--level …] [--json] [--duration s]` | Stream logs (bound it with `--duration`) |
28
+ | `conductor logs --list` | List Metro debugger targets for this device |
29
+
30
+ Prefer `logs --recent N` over a bare `logs` stream — don't leave a stream
31
+ running indefinitely.
32
+
33
+ ## Network
34
+
35
+ | Command | Purpose |
36
+ |---|---|
37
+ | `conductor network logs [--limit N]` | Recent HTTP traffic (RN fetch/XHR shim; web via Playwright) |
38
+ | `conductor network request <url> [--method M] [--body STR] [--header K=V]` | Issue an HTTP request from the app's context |
39
+
40
+ ## Metro bundler
41
+
42
+ | Command | Purpose |
43
+ |---|---|
44
+ | `conductor metro reload [--port N] [--target N]` | Reload the JS bundle without restarting native |
45
+ | `conductor metro stop [--port N]` | Stop the Metro bundler on a port (default 8081) |
46
+
47
+ ## Tips
48
+
49
+ - `--port N` targets a specific Metro/debugger port when auto-detection isn't enough.
50
+ - Add `--json` for machine-readable output.
51
+ - For crashes and performance, see `conductor-profiler`.
@@ -0,0 +1,42 @@
1
+ ---
2
+ name: conductor-profiler
3
+ description: Profile a running app's CPU, memory, and React render performance with the conductor CLI, and read crash reports. Use when investigating slowness, jank, memory growth or leaks, excessive React re-renders, or when an app has crashed and you need the crash report.
4
+ ---
5
+
6
+ # Conductor — profiling & crashes
7
+
8
+ Measure a running app's performance and inspect crashes.
9
+
10
+ ## Profiling
11
+
12
+ | Command | Purpose |
13
+ |---|---|
14
+ | `conductor profile cpu --duration <s> [--out <path>]` | Record a CPU trace (iOS: xctrace, Android: simpleperf) |
15
+ | `conductor profile memory --track <s> [--interval ms] [<appId>]` | Sample memory for N seconds, report deltas |
16
+ | `conductor profile react start` / `profile react stop [--top N]` | Install a React commit-profiler hook, then summarize captured commits |
17
+
18
+ ## Memory
19
+
20
+ | Command | Purpose |
21
+ |---|---|
22
+ | `conductor memory [<appId>]` | Device + app memory usage |
23
+ | `conductor memory --objects` | Include per-class object counts (iOS heap; slower) |
24
+ | `conductor memory --leaks` | Run leak detection (iOS only; slow, can pause the app) |
25
+ | `conductor memory --save <name>` / `--diff <name>` / `--diff <name> --vs <other>` | Snapshot and diff memory reports |
26
+ | `conductor memory --filter <regex>` / `--growth-only` / `--top <n>` | Narrow object/class tables (great for leak-hunting) |
27
+
28
+ Typical leak hunt: `memory --save before`, exercise the screen, then
29
+ `memory --diff before --growth-only`.
30
+
31
+ ## Crashes
32
+
33
+ | Command | Purpose |
34
+ |---|---|
35
+ | `conductor crashes list [--app <bundleId>] [--since <duration>]` | List recent crash reports (iOS host + Android logcat) |
36
+ | `conductor crashes show <id>` | Print a specific crash report |
37
+ | `conductor crashes tail` | Stream new crash reports as they appear |
38
+
39
+ ## Tips
40
+
41
+ - Add `--json` to parse reports programmatically.
42
+ - These commands can be slow or pause the app — scope them with `--duration` / `--track` and avoid leaving `crashes tail` running.