@limrun/cli 0.2.0 → 0.2.1

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.
Files changed (2) hide show
  1. package/README.md +297 -280
  2. package/package.json +28 -10
package/README.md CHANGED
@@ -19,11 +19,11 @@ npx @limrun/cli <command>
19
19
  lim login
20
20
 
21
21
  # Or provide an API key directly
22
- lim --api-key <YOUR_KEY> get android
22
+ lim --api-key <YOUR_KEY> android list
23
23
 
24
24
  # Or use an environment variable
25
25
  export LIM_API_KEY=<YOUR_KEY>
26
- lim get android
26
+ lim android list
27
27
 
28
28
  # Log out (removes stored API key)
29
29
  lim logout
@@ -41,49 +41,73 @@ Every command supports these flags:
41
41
  | `--json` | Output as JSON instead of human-readable tables |
42
42
  | `--help` | Show help for any command |
43
43
 
44
+ ## Command Structure
45
+
46
+ Commands are organized by resource (noun-first), so you can discover everything available for a platform with `--help`:
47
+
48
+ ```bash
49
+ lim ios --help # All iOS commands
50
+ lim android --help # All Android commands
51
+ lim xcode --help # All Xcode commands
52
+ lim asset --help # All asset commands
53
+ ```
54
+
55
+ **Top-level shortcuts** are available for common actions — the platform is auto-detected from the instance ID prefix:
56
+
57
+ ```bash
58
+ lim screenshot <id> # Works for both iOS and Android
59
+ lim tap <id> 100 200 # Auto-detects platform from ID prefix
60
+ lim delete <id> # Auto-detects resource type from ID prefix
61
+ lim sync <id> ./path # Works for iOS and Xcode instances
62
+ lim build <id> # Works for iOS and Xcode instances
63
+ ```
64
+
44
65
  ## Commands
45
66
 
46
- - [Instance Management](#instance-management) — Create, list, and delete Android/iOS/Xcode instances
47
- - [Asset Management](#asset-management) — Upload and download files (APKs, IPAs, etc.)
67
+ - [iOS](#ios) — Create, manage, and interact with iOS instances
68
+ - [Android](#android) — Create, manage, and interact with Android instances
69
+ - [Xcode](#xcode) — Create and manage Xcode sandbox instances
70
+ - [Assets](#assets) — Upload and download files (APKs, IPAs, etc.)
48
71
  - [Sessions](#sessions) — Persistent connections for fast, interactive device control
49
- - [Device Interaction](#device-interaction) — Screenshots, tapping, typing, scrolling, and more
50
72
  - [Xcode Build Pipeline](#xcode-build-pipeline) — Sync code and run xcodebuild remotely
51
- - [Connectivity](#connectivity) — ADB tunnel for Android debugging
52
73
 
53
74
  ---
54
75
 
55
- ### Instance Management
56
-
57
- #### Create Instances
76
+ ### iOS
58
77
 
59
78
  ```bash
60
- # Android instance with ADB tunnel and scrcpy streaming
61
- lim run android
79
+ lim ios create # Create a new iOS instance
80
+ lim ios list # List all ready iOS instances
81
+ lim ios list <ID> # Get details of a specific instance
82
+ lim ios delete <ID> # Delete an instance
83
+ ```
62
84
 
63
- # Android with apps pre-installed
64
- lim run android --install ./my-app.apk --install ./another.apk
85
+ #### Create Options
65
86
 
66
- # Android with custom settings
67
- lim run android --region us-west --display-name "CI Test" --label env=ci --rm
87
+ ```bash
88
+ # Basic
89
+ lim ios create
68
90
 
69
- # iOS instance
70
- lim run ios
91
+ # With specific device model
92
+ lim ios create --model ipad --rm
71
93
 
72
- # iOS with specific device model
73
- lim run ios --model ipad --rm
94
+ # With pre-installed app from asset storage
95
+ lim ios create --install-asset my-app.ipa
74
96
 
75
- # iOS with pre-installed app from asset storage
76
- lim run ios --install-asset my-app.ipa
97
+ # With Xcode sandbox enabled
98
+ lim ios create --xcode
77
99
 
78
- # Xcode build sandbox
79
- lim run xcode --rm --hard-timeout 1h
100
+ # Full options
101
+ lim ios create --region us-west --display-name "CI Test" --label env=ci --rm
80
102
  ```
81
103
 
82
- **Common flags for `run` commands:**
104
+ **Flags for `ios create`:**
83
105
 
84
106
  | Flag | Description |
85
107
  |------|-------------|
86
108
  | `--rm` | Auto-delete the instance on exit (Ctrl+C) |
109
+ | `--model <iphone\|ipad\|watch>` | Simulator device model |
110
+ | `--xcode` | Attach a Xcode build sandbox to the iOS instance |
87
111
  | `--region <value>` | Region for the instance (e.g. `us-west`) |
88
112
  | `--display-name <value>` | Human-readable name |
89
113
  | `--label <key=value>` | Labels (repeatable). Used for filtering and reuse |
@@ -93,6 +117,116 @@ lim run xcode --rm --hard-timeout 1h
93
117
  | `--install <file>` | Local file to install (auto-uploads, repeatable) |
94
118
  | `--install-asset <name>` | Asset name to install (repeatable) |
95
119
 
120
+ #### List and Filter
121
+
122
+ ```bash
123
+ lim ios list # Ready instances
124
+ lim ios list --all # All states
125
+ lim ios list --state creating # Filter by state
126
+ lim ios list --region us-west # Filter by region
127
+ lim ios list --label-selector env=prod # Filter by labels
128
+ lim ios list --json # JSON output
129
+ ```
130
+
131
+ #### Device Interaction
132
+
133
+ ```bash
134
+ # Screenshots
135
+ lim ios screenshot <ID> -o screenshot.png
136
+ lim ios screenshot <ID> # Output base64 to stdout
137
+
138
+ # Tapping
139
+ lim ios tap <ID> 100 200
140
+ lim ios tap-element <ID> --label "Submit"
141
+ lim ios tap-element <ID> --accessibility-id btn_ok
142
+
143
+ # Text input
144
+ lim ios type <ID> "Hello World"
145
+ lim ios type <ID> "search query" --press-enter
146
+ lim ios press-key <ID> enter
147
+ lim ios press-key <ID> a --modifier shift
148
+
149
+ # Scrolling
150
+ lim ios scroll <ID> down --amount 500
151
+
152
+ # UI inspection
153
+ lim ios element-tree <ID>
154
+ lim ios element-tree <ID> | jq '.'
155
+
156
+ # Open URLs / deep links
157
+ lim ios open-url <ID> https://example.com
158
+ lim ios open-url <ID> myapp://settings
159
+ ```
160
+
161
+ #### App Management (iOS only)
162
+
163
+ ```bash
164
+ # Install an app (local file auto-uploads, or use URL)
165
+ lim ios install-app <ID> ./MyApp.ipa
166
+ lim ios install-app <ID> https://example.com/app.ipa
167
+
168
+ # Launch / terminate
169
+ lim ios launch-app <ID> com.example.myapp
170
+ lim ios launch-app <ID> com.example.myapp --mode RelaunchIfRunning
171
+ lim ios terminate-app <ID> com.example.myapp
172
+
173
+ # List installed apps
174
+ lim ios list-apps <ID>
175
+ ```
176
+
177
+ #### Log Streaming (iOS only)
178
+
179
+ ```bash
180
+ # Tail recent logs
181
+ lim ios log <ID> com.example.myapp --lines 50
182
+
183
+ # Stream logs continuously (Ctrl+C to stop)
184
+ lim ios log <ID> com.example.myapp -f
185
+ ```
186
+
187
+ #### Video Recording
188
+
189
+ ```bash
190
+ lim ios record <ID> start
191
+ lim ios record <ID> start --quality 8
192
+ lim ios record <ID> stop -o recording.mp4
193
+ ```
194
+
195
+ #### Xcode Integration
196
+
197
+ ```bash
198
+ # Sync and build (requires --xcode on create)
199
+ lim ios sync <ID> ./MyProject
200
+ lim ios build <ID> --scheme MyApp --workspace MyApp.xcworkspace
201
+ ```
202
+
203
+ ---
204
+
205
+ ### Android
206
+
207
+ ```bash
208
+ lim android create # Create a new Android instance
209
+ lim android list # List all ready Android instances
210
+ lim android list <ID> # Get details of a specific instance
211
+ lim android delete <ID> # Delete an instance
212
+ ```
213
+
214
+ #### Create Options
215
+
216
+ ```bash
217
+ # Basic (with ADB tunnel and scrcpy streaming)
218
+ lim android create
219
+
220
+ # With apps pre-installed
221
+ lim android create --install ./my-app.apk --install ./another.apk
222
+
223
+ # Without streaming
224
+ lim android create --no-stream
225
+
226
+ # Full options
227
+ lim android create --region us-west --display-name "CI Test" --label env=ci --rm
228
+ ```
229
+
96
230
  **Android-specific flags:**
97
231
 
98
232
  | Flag | Description |
@@ -101,100 +235,116 @@ lim run xcode --rm --hard-timeout 1h
101
235
  | `--[no-]stream` | Launch scrcpy for visual control (default: true) |
102
236
  | `--adb-path <path>` | Path to `adb` binary (default: `adb`) |
103
237
 
104
- **iOS-specific flags:**
238
+ #### Device Interaction
105
239
 
106
- | Flag | Description |
107
- |------|-------------|
108
- | `--model <iphone\|ipad\|watch>` | Simulator device model |
109
- | `--xcode` | Attach a Xcode build sandbox to the iOS instance |
240
+ ```bash
241
+ # Screenshots
242
+ lim android screenshot <ID> -o screenshot.png
110
243
 
111
- #### List Instances
244
+ # Tapping
245
+ lim android tap <ID> 100 200
246
+ lim android tap-element <ID> --resource-id com.example:id/button
247
+ lim android tap-element <ID> --text "Sign In"
112
248
 
113
- ```bash
114
- # List ready instances
115
- lim get android
116
- lim get ios
117
- lim get xcode
249
+ # Text input
250
+ lim android type <ID> "Hello World"
251
+ lim android press-key <ID> enter
252
+
253
+ # Scrolling
254
+ lim android scroll <ID> down --amount 500
118
255
 
119
- # Get a specific instance by ID
120
- lim get android android_abc123
256
+ # UI inspection
257
+ lim android element-tree <ID>
121
258
 
122
- # Show all states (not just ready)
123
- lim get ios --all
259
+ # Install app
260
+ lim android install-app <ID> ./app.apk
124
261
 
125
- # Filter by state, region, or labels
126
- lim get android --state creating
127
- lim get ios --region us-west
128
- lim get android --label-selector env=prod,team=mobile
262
+ # Open URL
263
+ lim android open-url <ID> https://example.com
129
264
 
130
- # JSON output for scripting
131
- lim get android --json
265
+ # Video recording
266
+ lim android record <ID> start
267
+ lim android record <ID> stop -o recording.mp4
132
268
  ```
133
269
 
134
- **Filtering flags:**
270
+ #### ADB Tunnel
135
271
 
136
- | Flag | Description |
137
- |------|-------------|
138
- | `--all` | Show instances in all states |
139
- | `--state <value>` | Filter by state (`unknown`, `creating`, `ready`, `terminated`) |
140
- | `--region <value>` | Filter by region |
141
- | `--label-selector <value>` | Filter by labels (e.g. `env=prod,team=mobile`) |
272
+ Connect to a running Android instance for direct `adb` access:
273
+
274
+ ```bash
275
+ lim android connect <ID>
276
+ lim android connect <ID> --adb-path /usr/local/bin/adb
277
+ ```
278
+
279
+ The tunnel stays open until you press Ctrl+C. While connected, you can use `adb` commands in another terminal.
280
+
281
+ ---
282
+
283
+ ### Xcode
284
+
285
+ Standalone Xcode build sandboxes for remote compilation.
142
286
 
143
- #### Delete Instances
287
+ ```bash
288
+ lim xcode create # Create a new Xcode sandbox
289
+ lim xcode list # List all ready Xcode instances
290
+ lim xcode list <ID> # Get details of a specific instance
291
+ lim xcode delete <ID> # Delete an instance
292
+ ```
144
293
 
145
294
  ```bash
146
- # Delete by type
147
- lim delete android android_abc123
148
- lim delete ios ios_abc123
149
- lim delete xcode xcode_abc123
295
+ # Create with options
296
+ lim xcode create --rm --region us-west --hard-timeout 1h
297
+
298
+ # Sync and build
299
+ lim xcode sync <ID> ./MyProject
300
+ lim xcode build <ID> --scheme MyApp --workspace MyApp.xcworkspace
150
301
 
151
- # Auto-detect type from ID prefix
152
- lim delete android_abc123
153
- lim delete ios_abc123
302
+ # Build and upload artifact
303
+ lim xcode build <ID> --scheme MyApp --upload my-app-build
154
304
  ```
155
305
 
156
306
  ---
157
307
 
158
- ### Asset Management
308
+ ### Assets
159
309
 
160
310
  Assets are files (APKs, IPAs, configs, etc.) stored in Limrun's cloud storage for use with instances.
161
311
 
162
312
  ```bash
163
313
  # Upload a file
164
- lim push ./my-app.apk
165
- lim push ./my-app.ipa -n custom-name
314
+ lim asset push ./my-app.apk
315
+ lim asset push ./my-app.ipa -n custom-name
166
316
 
167
317
  # Download a file
168
- lim pull asset_abc123
169
- lim pull my-app.apk
170
- lim pull asset_abc123 -o ./downloads
318
+ lim asset pull asset_abc123
319
+ lim asset pull my-app.apk
320
+ lim asset pull asset_abc123 -o ./downloads
171
321
 
172
322
  # List assets
173
- lim get asset
174
- lim get asset --name my-app
175
- lim get asset --download-url
323
+ lim asset list
324
+ lim asset list --name my-app
325
+ lim asset list --download-url
176
326
 
177
327
  # Get a specific asset
178
- lim get asset asset_abc123
328
+ lim asset list asset_abc123
179
329
 
180
330
  # Delete an asset
181
- lim delete asset asset_abc123
331
+ lim asset delete asset_abc123
182
332
  ```
183
333
 
184
334
  ---
185
335
 
186
336
  ### Sessions
187
337
 
188
- Sessions keep a persistent WebSocket connection to an instance in the background, making all `exec` commands near-instant (~50ms instead of ~2s per command).
338
+ Sessions keep a persistent WebSocket connection to an instance in the background, making all interaction commands near-instant (~50ms instead of ~2s per command).
189
339
 
190
340
  #### Why Sessions?
191
341
 
192
- Without a session, every `exec` command creates a new connection:
342
+ Without a session, every command creates a new connection:
193
343
 
194
344
  ```
195
- lim exec screenshot ios_abc123 # ~2s (connect + auth + screenshot + disconnect)
196
- lim exec tap ios_abc123 100 200 # ~2s (connect + auth + tap + disconnect)
197
- lim exec element-tree ios_abc123 # ~2s (connect + auth + fetch + disconnect)
345
+ lim ios screenshot ios_abc123 # ~2s (connect + auth + screenshot + disconnect)
346
+ lim ios tap ios_abc123 100 200 # ~2s (connect + auth + tap + disconnect)
347
+ lim ios element-tree ios_abc123 # ~2s (connect + auth + fetch + disconnect)
198
348
  # Total: ~6s for 3 commands
199
349
  ```
200
350
 
@@ -202,14 +352,14 @@ With a session, the connection is created once and reused:
202
352
 
203
353
  ```
204
354
  lim session start ios_abc123 # ~2s (one-time connection setup)
205
- lim exec screenshot ios_abc123 # ~50ms (reuses connection)
206
- lim exec tap ios_abc123 100 200 # ~50ms (reuses connection)
207
- lim exec element-tree ios_abc123 # ~50ms (reuses connection)
355
+ lim ios screenshot ios_abc123 # ~50ms (reuses connection)
356
+ lim ios tap ios_abc123 100 200 # ~50ms (reuses connection)
357
+ lim ios element-tree ios_abc123 # ~50ms (reuses connection)
208
358
  lim session stop # instant cleanup
209
359
  # Total: ~2.15s for 3 commands
210
360
  ```
211
361
 
212
- This makes sessions essential for interactive workflows, AI agent loops, and any scenario where you run multiple `exec` commands against the same instance.
362
+ This makes sessions essential for interactive workflows, AI agent loops, and any scenario where you run multiple commands against the same instance.
213
363
 
214
364
  #### Session Commands
215
365
 
@@ -237,50 +387,50 @@ If only one session is active, `lim session stop` (no ID) stops it automatically
237
387
  Each `lim session start <ID>` spawns an independent background daemon that:
238
388
  - Holds a persistent WebSocket connection to that specific instance
239
389
  - Listens on its own Unix socket at `/tmp/lim-sessions/<instance-id>/`
240
- - All `exec` commands automatically detect the matching session and route through it
390
+ - All interaction commands automatically detect the matching session and route through it
241
391
  - Multiple sessions run in parallel with no shared state
242
392
 
243
393
  #### Example: Interactive Testing
244
394
 
245
395
  ```bash
246
- lim run ios --model iphone
396
+ lim ios create --model iphone
247
397
  lim session start ios_abc123
248
398
 
249
399
  # Fast interaction loop — each command takes ~50ms
250
- lim exec launch-app ios_abc123 com.example.myapp
251
- lim exec element-tree ios_abc123 | jq '.tree'
252
- lim exec tap-element ios_abc123 --label "Login"
253
- lim exec type ios_abc123 "user@example.com"
254
- lim exec tap-element ios_abc123 --label "Submit"
255
- lim exec screenshot ios_abc123 -o after-login.png
400
+ lim ios launch-app ios_abc123 com.example.myapp
401
+ lim ios element-tree ios_abc123 | jq '.tree'
402
+ lim ios tap-element ios_abc123 --label "Login"
403
+ lim ios type ios_abc123 "user@example.com"
404
+ lim ios tap-element ios_abc123 --label "Submit"
405
+ lim ios screenshot ios_abc123 -o after-login.png
256
406
 
257
407
  lim session stop ios_abc123
258
- lim delete ios_abc123
408
+ lim ios delete ios_abc123
259
409
  ```
260
410
 
261
411
  #### Example: Multi-Device AI Agent
262
412
 
263
413
  ```bash
264
414
  # Create two instances and start sessions for both
265
- lim run ios --model iphone
266
- lim run ios --model ipad
415
+ lim ios create --model iphone
416
+ lim ios create --model ipad
267
417
  lim session start ios_phone_123
268
418
  lim session start ios_tablet_456
269
419
 
270
420
  # Agent controls both devices in parallel — ~50ms per command
271
- lim exec launch-app ios_phone_123 com.example.myapp
272
- lim exec launch-app ios_tablet_456 com.example.myapp
421
+ lim ios launch-app ios_phone_123 com.example.myapp
422
+ lim ios launch-app ios_tablet_456 com.example.myapp
273
423
 
274
- lim exec screenshot ios_phone_123 -o phone.png
275
- lim exec screenshot ios_tablet_456 -o tablet.png
424
+ lim ios screenshot ios_phone_123 -o phone.png
425
+ lim ios screenshot ios_tablet_456 -o tablet.png
276
426
 
277
- lim exec tap ios_phone_123 200 400
278
- lim exec element-tree ios_tablet_456 --json > tablet-tree.json
427
+ lim ios tap ios_phone_123 200 400
428
+ lim ios element-tree ios_tablet_456 --json > tablet-tree.json
279
429
 
280
430
  # Clean up all sessions
281
431
  lim session stop --all
282
- lim delete ios_phone_123
283
- lim delete ios_tablet_456
432
+ lim ios delete ios_phone_123
433
+ lim ios delete ios_tablet_456
284
434
  ```
285
435
 
286
436
  #### Example: Automated Test Matrix
@@ -291,15 +441,15 @@ DEVICES=("iphone" "ipad")
291
441
  IDS=()
292
442
 
293
443
  for model in "${DEVICES[@]}"; do
294
- ID=$(lim run ios --model $model --json | jq -r '.metadata.id')
444
+ ID=$(lim ios create --model $model --json | jq -r '.metadata.id')
295
445
  lim session start $ID
296
446
  IDS+=($ID)
297
447
  done
298
448
 
299
449
  # Run tests against all devices
300
450
  for ID in "${IDS[@]}"; do
301
- lim exec launch-app $ID com.example.myapp
302
- lim exec screenshot $ID -o "test_${ID}.png"
451
+ lim ios launch-app $ID com.example.myapp
452
+ lim ios screenshot $ID -o "test_${ID}.png"
303
453
  done
304
454
 
305
455
  # Tear down
@@ -311,121 +461,6 @@ done
311
461
 
312
462
  ---
313
463
 
314
- ### Device Interaction
315
-
316
- The `exec` commands let you interact with running Android and iOS instances directly from the command line. These commands auto-detect the platform from the instance ID prefix. When a [session](#sessions) is active, commands route through it automatically for near-instant execution.
317
-
318
- #### Screenshots
319
-
320
- ```bash
321
- # Save to file
322
- lim exec screenshot ios_abc123 -o screenshot.png
323
-
324
- # Output base64 to stdout (for piping)
325
- lim exec screenshot ios_abc123
326
-
327
- # JSON output with metadata
328
- lim exec screenshot ios_abc123 --json
329
- ```
330
-
331
- #### Tapping
332
-
333
- ```bash
334
- # Tap at coordinates
335
- lim exec tap ios_abc123 100 200
336
-
337
- # Tap an element by accessibility selector
338
- lim exec tap-element ios_abc123 --label "Submit"
339
- lim exec tap-element ios_abc123 --accessibility-id btn_ok
340
-
341
- # Android: tap by resource ID or text
342
- lim exec tap-element android_abc123 --resource-id com.example:id/button
343
- lim exec tap-element android_abc123 --text "Sign In"
344
- ```
345
-
346
- #### Text Input
347
-
348
- ```bash
349
- # Type text into the focused field
350
- lim exec type ios_abc123 "Hello World"
351
-
352
- # Type and press Enter (iOS)
353
- lim exec type ios_abc123 "search query" --press-enter
354
-
355
- # Press a key
356
- lim exec press-key ios_abc123 enter
357
- lim exec press-key ios_abc123 a --modifier shift
358
- ```
359
-
360
- #### Scrolling
361
-
362
- ```bash
363
- lim exec scroll ios_abc123 down --amount 500
364
- lim exec scroll android_abc123 up --amount 300
365
- ```
366
-
367
- #### UI Inspection
368
-
369
- ```bash
370
- # Get the element/accessibility tree
371
- lim exec element-tree ios_abc123
372
- lim exec element-tree android_abc123
373
-
374
- # Pipe to jq for filtering
375
- lim exec element-tree ios_abc123 | jq '.'
376
- ```
377
-
378
- #### App Management (iOS)
379
-
380
- ```bash
381
- # Install an app from local file (auto-uploads)
382
- lim exec install-app ios_abc123 ./MyApp.ipa
383
-
384
- # Install from URL
385
- lim exec install-app ios_abc123 https://example.com/app.ipa
386
-
387
- # Launch / terminate
388
- lim exec launch-app ios_abc123 com.example.myapp
389
- lim exec launch-app ios_abc123 com.example.myapp --mode RelaunchIfRunning
390
- lim exec terminate-app ios_abc123 com.example.myapp
391
-
392
- # List installed apps
393
- lim exec list-apps ios_abc123
394
- ```
395
-
396
- #### Open URLs
397
-
398
- ```bash
399
- # Open web URL (opens in browser on the device)
400
- lim exec open-url ios_abc123 https://example.com
401
-
402
- # Open deep link
403
- lim exec open-url ios_abc123 myapp://settings
404
- ```
405
-
406
- #### Log Streaming (iOS)
407
-
408
- ```bash
409
- # Tail recent logs
410
- lim exec log ios_abc123 com.example.myapp --lines 50
411
-
412
- # Stream logs continuously (Ctrl+C to stop)
413
- lim exec log ios_abc123 com.example.myapp -f
414
- ```
415
-
416
- #### Video Recording
417
-
418
- ```bash
419
- # Start recording
420
- lim exec record ios_abc123 start
421
- lim exec record ios_abc123 start --quality 8
422
-
423
- # Stop and save
424
- lim exec record ios_abc123 stop -o recording.mp4
425
- ```
426
-
427
- ---
428
-
429
464
  ### Xcode Build Pipeline
430
465
 
431
466
  Build and test iOS apps remotely using cloud Xcode sandboxes. The `sync` and `build` commands work with both standalone Xcode instances and iOS instances that have Xcode sandbox enabled.
@@ -436,32 +471,32 @@ This gives you a simulator **and** a build environment in one instance — the b
436
471
 
437
472
  ```bash
438
473
  # 1. Create iOS instance with Xcode sandbox
439
- lim run ios --xcode
474
+ lim ios create --xcode
440
475
  # Output:
441
476
  # Instance ID: ios_abc123
442
477
  # Xcode Sandbox: https://...limrun.net/v1/sandbox_.../xcode
443
478
  # (sandbox URL is cached locally for sync/build to use)
444
479
 
445
480
  # 2. Sync your project code to the Xcode sandbox
446
- lim sync ios_abc123 ./MyProject
481
+ lim ios sync ios_abc123 ./MyProject
447
482
 
448
483
  # 3. Build — the app is auto-installed on the simulator
449
- lim build ios_abc123 --scheme MyApp --workspace MyApp.xcworkspace
484
+ lim ios build ios_abc123 --scheme MyApp --workspace MyApp.xcworkspace
450
485
 
451
486
  # 4. Start a session for fast device interaction
452
487
  lim session start ios_abc123
453
488
 
454
489
  # 5. Test the built app on the simulator (~50ms per command)
455
- lim exec launch-app ios_abc123 com.example.myapp
456
- lim exec element-tree ios_abc123 | jq '.'
457
- lim exec screenshot ios_abc123 -o built-app.png
490
+ lim ios launch-app ios_abc123 com.example.myapp
491
+ lim ios element-tree ios_abc123 | jq '.'
492
+ lim ios screenshot ios_abc123 -o built-app.png
458
493
 
459
494
  # 6. Clean up
460
495
  lim session stop ios_abc123
461
- lim delete ios_abc123
496
+ lim ios delete ios_abc123
462
497
  ```
463
498
 
464
- > **Note:** The Xcode sandbox URL is only returned when the instance is created — not on subsequent `get` calls. The CLI caches it locally at `~/.lim/instances/` so that `sync` and `build` can find it. This means `sync`/`build` must run on the same machine where `run ios --xcode` was executed.
499
+ > **Note:** The Xcode sandbox URL is only returned when the instance is created — not on subsequent `list` calls. The CLI caches it locally at `~/.lim/instances/` so that `sync` and `build` can find it. This means `sync`/`build` must run on the same machine where `ios create --xcode` was executed.
465
500
 
466
501
  #### Option B: Standalone Xcode Instance
467
502
 
@@ -469,54 +504,36 @@ Use this when you only need to build (no simulator needed), or when you want to
469
504
 
470
505
  ```bash
471
506
  # 1. Create a standalone Xcode instance
472
- lim run xcode --rm
507
+ lim xcode create --rm
473
508
 
474
509
  # 2. Sync and build
475
- lim sync xcode_abc123 ./MyProject
476
- lim build xcode_abc123 --scheme MyApp --workspace MyApp.xcworkspace
510
+ lim xcode sync xcode_abc123 ./MyProject
511
+ lim xcode build xcode_abc123 --scheme MyApp --workspace MyApp.xcworkspace
477
512
 
478
513
  # 3. Upload build artifact
479
- lim build xcode_abc123 --scheme MyApp --upload my-app-build
514
+ lim xcode build xcode_abc123 --scheme MyApp --upload my-app-build
480
515
 
481
516
  # 4. Download the artifact
482
- lim pull my-app-build -o ./build-output
517
+ lim asset pull my-app-build -o ./build-output
483
518
  ```
484
519
 
485
520
  #### Sync Options
486
521
 
487
522
  ```bash
488
523
  # Watch mode (re-syncs on file changes, default)
489
- lim sync ios_abc123 ./MyProject --watch
524
+ lim ios sync ios_abc123 ./MyProject --watch
490
525
 
491
526
  # One-shot sync (no watch)
492
- lim sync ios_abc123 ./MyProject --no-watch
527
+ lim ios sync ios_abc123 ./MyProject --no-watch
493
528
 
494
529
  # Sync without installing
495
- lim sync ios_abc123 ./MyProject --no-install
530
+ lim ios sync ios_abc123 ./MyProject --no-install
496
531
  ```
497
532
 
498
533
  The sync automatically ignores build artifacts (`build/`, `DerivedData/`, `.build/`), dependency folders (`Pods/`, `Carthage/Build/`, `.swiftpm/`), and user-specific files (`xcuserdata/`, `.dSYM/`).
499
534
 
500
535
  ---
501
536
 
502
- ### Connectivity
503
-
504
- #### Android ADB Tunnel
505
-
506
- Connect to a running Android instance for `adb` access:
507
-
508
- ```bash
509
- # Connect to an existing instance
510
- lim connect android android_abc123
511
-
512
- # With custom adb path
513
- lim connect android android_abc123 --adb-path /usr/local/bin/adb
514
- ```
515
-
516
- The tunnel stays open until you press Ctrl+C. While connected, you can use `adb` commands in another terminal.
517
-
518
- ---
519
-
520
537
  ## Configuration
521
538
 
522
539
  The CLI reads configuration from multiple sources (in order of precedence):
@@ -541,14 +558,14 @@ All commands support `--json` for machine-readable output, making the CLI suitab
541
558
 
542
559
  ```bash
543
560
  # Get instance details as JSON
544
- lim get ios ios_abc123 --json
561
+ lim ios list ios_abc123 --json
545
562
 
546
563
  # Parse with jq
547
- lim get android --json | jq '.[].metadata.id'
564
+ lim android list --json | jq '.[].metadata.id'
548
565
 
549
566
  # Use in scripts
550
- INSTANCE_ID=$(lim run ios --json | jq -r '.metadata.id')
551
- lim exec screenshot $INSTANCE_ID -o test.png
567
+ INSTANCE_ID=$(lim ios create --json | jq -r '.metadata.id')
568
+ lim ios screenshot $INSTANCE_ID -o test.png
552
569
  lim delete $INSTANCE_ID
553
570
  ```
554
571
 
@@ -562,14 +579,14 @@ lim delete $INSTANCE_ID
562
579
  INSTANCE_ID="ios_..."
563
580
 
564
581
  # Create instance and start session for fast commands
565
- lim run ios --install ./build/MyApp.ipa
582
+ lim ios create --install ./build/MyApp.ipa
566
583
  lim session start $INSTANCE_ID
567
584
 
568
585
  # Verify — each command takes ~50ms with session
569
- lim exec launch-app $INSTANCE_ID com.example.myapp
586
+ lim ios launch-app $INSTANCE_ID com.example.myapp
570
587
  sleep 2
571
- lim exec element-tree $INSTANCE_ID | grep "Welcome"
572
- lim exec screenshot $INSTANCE_ID -o test-result.png
588
+ lim ios element-tree $INSTANCE_ID | grep "Welcome"
589
+ lim ios screenshot $INSTANCE_ID -o test-result.png
573
590
 
574
591
  # Clean up
575
592
  lim session stop $INSTANCE_ID
@@ -580,21 +597,21 @@ lim delete $INSTANCE_ID
580
597
 
581
598
  ```bash
582
599
  # Create instance
583
- INSTANCE=$(lim run ios --model iphone --json)
600
+ INSTANCE=$(lim ios create --model iphone --json)
584
601
  ID=$(echo $INSTANCE | jq -r '.metadata.id')
585
602
 
586
- # Start session — all exec commands now run in ~50ms
603
+ # Start session — all commands now run in ~50ms
587
604
  lim session start $ID
588
605
 
589
606
  # Agent can interact at high speed
590
- lim exec tap $ID 200 400
591
- lim exec type $ID "test@example.com"
592
- lim exec tap-element $ID --label "Sign In"
593
- lim exec screenshot $ID -o result.png
594
- lim exec element-tree $ID --json > ui-state.json
607
+ lim ios tap $ID 200 400
608
+ lim ios type $ID "test@example.com"
609
+ lim ios tap-element $ID --label "Sign In"
610
+ lim ios screenshot $ID -o result.png
611
+ lim ios element-tree $ID --json > ui-state.json
595
612
 
596
613
  # Tail logs (non-streaming works through session too)
597
- lim exec log $ID com.example.myapp --lines 20
614
+ lim ios log $ID com.example.myapp --lines 20
598
615
 
599
616
  # Clean up
600
617
  lim session stop $ID
@@ -605,18 +622,18 @@ lim delete $ID
605
622
 
606
623
  ```bash
607
624
  # Single instance: Xcode sandbox + iOS simulator
608
- ID=$(lim run ios --xcode --json | jq -r '.metadata.id')
625
+ ID=$(lim ios create --xcode --json | jq -r '.metadata.id')
609
626
 
610
627
  # Sync, build, and test
611
- lim sync $ID ./MyiOSProject --no-watch
612
- lim build $ID --scheme MyApp --workspace MyApp.xcworkspace
628
+ lim ios sync $ID ./MyiOSProject --no-watch
629
+ lim ios build $ID --scheme MyApp --workspace MyApp.xcworkspace
613
630
 
614
631
  # Verify the built app on the simulator
615
632
  lim session start $ID
616
- lim exec launch-app $ID com.example.myapp
633
+ lim ios launch-app $ID com.example.myapp
617
634
  sleep 2
618
- lim exec element-tree $ID | grep "Welcome"
619
- lim exec screenshot $ID -o test-result.png
635
+ lim ios element-tree $ID | grep "Welcome"
636
+ lim ios screenshot $ID -o test-result.png
620
637
  lim session stop
621
638
 
622
639
  lim delete $ID
@@ -625,12 +642,12 @@ lim delete $ID
625
642
  ### Build-Only with Artifact Upload
626
643
 
627
644
  ```bash
628
- lim run xcode --rm --reuse-if-exists --label project=myapp
645
+ lim xcode create --rm --reuse-if-exists --label project=myapp
629
646
  XCODE_ID="xcode_..."
630
647
 
631
- lim sync $XCODE_ID ./MyiOSProject --no-watch
632
- lim build $XCODE_ID --scheme MyApp --workspace MyApp.xcworkspace --upload myapp-latest
633
- lim pull myapp-latest -o ./build-output
648
+ lim xcode sync $XCODE_ID ./MyiOSProject --no-watch
649
+ lim xcode build $XCODE_ID --scheme MyApp --workspace MyApp.xcworkspace --upload myapp-latest
650
+ lim asset pull myapp-latest -o ./build-output
634
651
  ```
635
652
 
636
653
  ---
@@ -652,8 +669,8 @@ npm run build
652
669
  npm run build && node bin/run.js <command>
653
670
 
654
671
  # Or use watch mode in one terminal, run in another
655
- npx tsc --watch # Terminal 1
656
- node bin/run.js get ios # Terminal 2
672
+ npx tsc --watch # Terminal 1
673
+ node bin/run.js ios list # Terminal 2
657
674
  ```
658
675
 
659
676
  ### Link globally
@@ -663,7 +680,7 @@ npm link
663
680
 
664
681
  # Now `lim` works anywhere on your machine
665
682
  lim --help
666
- lim get android
683
+ lim android list
667
684
 
668
685
  # Unlink when done
669
686
  npm unlink -g @limrun/cli
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@limrun/cli",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "The official CLI for Limrun — create and control cloud mobile sandboxes",
5
5
  "bin": {
6
6
  "lim": "./bin/run.js"
@@ -44,15 +44,33 @@
44
44
  "commands": "./dist/commands",
45
45
  "topicSeparator": " ",
46
46
  "topics": {
47
- "ios": { "description": "Create, manage, and interact with iOS instances" },
48
- "android": { "description": "Create, manage, and interact with Android instances" },
49
- "xcode": { "description": "Create and manage Xcode sandbox instances" },
50
- "asset": { "description": "Upload, download, and manage assets" },
51
- "session": { "description": "Manage persistent sessions for fast device interaction" },
52
- "exec": { "hidden": true },
53
- "run": { "hidden": true },
54
- "get": { "hidden": true },
55
- "connect": { "hidden": true }
47
+ "ios": {
48
+ "description": "Create, manage, and interact with iOS instances"
49
+ },
50
+ "android": {
51
+ "description": "Create, manage, and interact with Android instances"
52
+ },
53
+ "xcode": {
54
+ "description": "Create and manage Xcode sandbox instances"
55
+ },
56
+ "asset": {
57
+ "description": "Upload, download, and manage assets"
58
+ },
59
+ "session": {
60
+ "description": "Manage persistent sessions for fast device interaction"
61
+ },
62
+ "exec": {
63
+ "hidden": true
64
+ },
65
+ "run": {
66
+ "hidden": true
67
+ },
68
+ "get": {
69
+ "hidden": true
70
+ },
71
+ "connect": {
72
+ "hidden": true
73
+ }
56
74
  }
57
75
  },
58
76
  "engines": {