Skip to content

Commit 43d7d97

Browse files
committed
update wording
1 parent 4195995 commit 43d7d97

6 files changed

Lines changed: 150 additions & 18 deletions

File tree

CONTRIBUTING.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Thanks for your interest in contributing to agent-device.
55
## Development
66

77
Requirements:
8+
89
- Node.js 22+
910
- pnpm
1011
- Android SDK tools (`adb`) for Android support
@@ -16,25 +17,35 @@ Setup:
1617
pnpm install
1718
```
1819

20+
Build all CLIs and Xcode projects:
21+
22+
```bash
23+
pnpm build:all
24+
```
25+
1926
Run tests:
2027

2128
```bash
2229
pnpm test
2330
```
2431

2532
Optional device selectors for tests:
33+
2634
- `ANDROID_DEVICE=Pixel_9_Pro_XL` or `ANDROID_SERIAL=emulator-5554`
2735
- `IOS_DEVICE="iPhone 17 Pro"` or `IOS_UDID=<udid>`
2836

2937
## Guidelines
38+
3039
- Keep dependencies minimal.
3140
- Preserve the CLI’s agent-friendly JSON output.
3241
- Ensure tests open and close sessions explicitly.
3342
- Add/adjust integration tests when introducing new commands.
3443
- Prefer built-in Node APIs over new packages.
3544

3645
## Reporting issues
46+
3747
Please include:
48+
3849
- OS and Node version
3950
- Xcode/Android SDK versions (if relevant)
4051
- Exact command and output

website/docs/docs/introduction.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,29 @@ If you know `agent-browser`, this is the mobile-native counterpart focused on si
2424
2. The daemon manages sessions and dispatches to platform drivers.
2525
3. iOS uses XCTest runner for snapshots and input; AX is optional fallback.
2626
4. Android uses ADB-based tooling.
27+
28+
## Example
29+
30+
```bash
31+
# Navigate and get snapshot
32+
agent-device open Settings --platform ios
33+
agent-device snapshot -i
34+
# Output
35+
# Page: Contacts
36+
# App: com.apple.MobileAddressBook
37+
# Snapshot: 44 nodes
38+
# @e1 [application] "Contacts"
39+
# @e2 [window]
40+
# @e3 [other]
41+
# @e4 [other] "Lists"
42+
# @e5 [navigation-bar] "Lists"
43+
# @e6 [button] "Lists"
44+
# @e7 [text] "Contacts"
45+
# @e8 [other] "John Doe"
46+
47+
# Click and fill
48+
agent-device click @e8
49+
agent-device snapshot -i
50+
agent-device fill @e5 "Doe 2"
51+
agent-device close
52+
```

website/docs/docs/quick-start.md

Lines changed: 64 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,73 @@ title: Quick Start
44

55
# Quick Start
66

7+
Every device automation follows this pattern:
8+
79
```bash
8-
agent-device open Contacts --platform ios
10+
# 1. Navigate
11+
agent-device open SampleApp --platform ios # or android
12+
13+
# 2. Snapshot to get element refs
914
agent-device snapshot -i
10-
agent-device click @e5
11-
agent-device fill @e6 "John"
15+
# Output:
16+
# @e1 [heading] "Sample App"
17+
# @e2 [button] "Settings"
18+
19+
# 3. Interact using refs
20+
agent-device click @e2
21+
22+
# 4. Re-snapshot before next interactions
23+
agent-device snapshot -i
24+
```
25+
26+
## Common commands
27+
28+
```bash
29+
agent-device open SampleApp
30+
agent-device snapshot -i # Get interactive elements with refs
31+
agent-device click @e2 # Click by ref
32+
agent-device fill @e3 "test@example.com" # Fill input by ref
33+
agent-device get text @e1 # Get text content
34+
agent-device screenshot --out page.png # Save to specific path
1235
agent-device close
1336
```
1437

15-
Tips:
38+
## Semantic selectors
39+
40+
Use `find` for human-readable targeting without refs:
41+
42+
```bash
43+
agent-device find "Sign In" click
44+
agent-device find label "Email" fill "user@example.com"
45+
agent-device find role button click
46+
```
47+
48+
## Scrolling
49+
50+
Navigate content that extends beyond the viewport:
51+
52+
```bash
53+
agent-device scroll down 0.5 # Scroll down half screen
54+
agent-device scroll up 0.3 # Scroll up 30%
55+
```
56+
57+
## Settings helpers
58+
59+
Toggle device settings directly:
60+
61+
```bash
62+
agent-device settings wifi on
63+
agent-device settings airplane on
64+
agent-device settings location off
65+
```
66+
67+
## JSON output
68+
69+
For programmatic parsing in scripts:
70+
71+
```bash
72+
agent-device snapshot --json
73+
agent-device get text @e1 --json
74+
```
1675

17-
- Re-snapshot after navigation.
18-
- Use `find` when you want semantic targeting instead of raw refs.
76+
Note: The default text output is more compact and preferred for AI agents.

website/docs/docs/sessions.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,18 @@ Sessions keep device state and snapshots consistent across commands.
99
```bash
1010
agent-device open Settings --platform ios
1111
agent-device session list
12-
agent-device open Contacts --session default
12+
agent-device open Contacts # change app while reusing the default session
1313
agent-device close
1414
```
1515

16+
Open another session independently (for parallel work):
17+
18+
```bash
19+
agent-device open Contacts --platform ios --session my-session
20+
agent-device snapshot -i
21+
agent-device close --session my-session
22+
```
23+
1624
Notes:
1725

1826
- `open <app>` within an existing session switches the active app and updates the session bundle id.

website/docs/docs/snapshots.md

Lines changed: 33 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,41 @@ title: Snapshots
77
Snapshots provide a structured view of the UI and generate stable refs.
88

99
```bash
10-
agent-device snapshot -i
11-
agent-device snapshot --backend xctest
12-
agent-device snapshot --backend ax
10+
agent-device snapshot # Full accessibility tree
11+
agent-device snapshot -i # Interactive elements only (recommended)
12+
agent-device snapshot -c # Compact (remove empty elements)
13+
agent-device snapshot -d 3 # Limit depth to 3 levels
14+
agent-device snapshot -s "Contacts" # Scope to label/identifier
15+
agent-device snapshot -i -c -d 5 # Combine options
1316
```
1417

15-
Backends:
18+
| Option | Description |
19+
| ------------ | ------------------------- |
20+
| `-i` | Interactive-only output |
21+
| `-c` | Compact structural noise |
22+
| `-d <depth>` | Limit tree depth |
23+
| `-s <scope>` | Scope to label/identifier |
24+
25+
Note: If XCTest returns 0 nodes (foreground app changed), agent-device falls back to AX when available.
26+
27+
## Example output:
1628

17-
- `xctest` (default): full fidelity, no Accessibility permission required.
18-
- `ax`: fast accessibility tree, may miss details.
29+
```bash
30+
agent-device snapshot -i
31+
# Output:
32+
# Snapshot: 44 nodes
33+
# @e1 [application] "Contacts"
34+
# @e2 [window]
35+
# @e3 [other]
36+
# @e4 [other] "Lists"
37+
# @e5 [navigation-bar] "Lists"
38+
# @e6 [button] "Lists"
39+
# @e7 [text] "Contacts"
40+
# @e8 [other] "John Doe"
41+
# @e9 [other] "John Doe"
42+
```
1943

20-
Tips:
44+
## Backends (iOS):
2145

22-
- Use `-i` for interactive-only output.
23-
- Use `-c` to compact structural noise.
24-
- Use `-d <depth>` to limit depth.
25-
- If XCTest returns 0 nodes (foreground app changed), agent-device falls back to AX when available.
46+
- `xctest` (default): full fidelity, fast, no Accessibility permission required.
47+
- `ax`: fast accessibility tree, may miss details, requires Accessibility permission.

website/rspress.config.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@ export default withCallstackPreset(
1919
discord: 'https://discord.gg/eYapw6F3',
2020
},
2121
},
22+
theme: {
23+
content: {
24+
outlineCTAHeadline: 'Curious about developing mobile apps with AI agents?',
25+
outlineCTADescription: 'We can help you take your agentic workflows to the next level and ship faster.',
26+
outlineCTAButtonText: "Book a call",
27+
},
28+
},
2229
},
2330
defineConfig({
2431
base: process.env.RSPRESS_BASE || '/agent-device',

0 commit comments

Comments
 (0)