Llim.run

CLI reference

The lim CLI drives every Limrun instance type from Linux, Windows, or macOS. This page lists every command in lim 0.35.1 and the behavior they share. For a command's full flag list, run it with --help:

lim ios create --help

Install and update

Install the lim package globally with npm, pnpm, or bun. The CLI needs Node.js 20 LTS or newer:

npm install --global lim

Run the same command again to update, and lim version to print the installed version.

Authenticate

Every command that talks to Limrun resolves an API key in this order:

  1. The --api-key flag.
  2. The LIM_API_KEY environment variable. The CLI also reads it from a .env file in the working directory.
  3. The key stored in ~/.lim/config.yaml by lim login (browser sign-in) or lim set-api-key.

lim logout removes the stored key. Headless hosts such as CI runners and cloud agents should set LIM_API_KEY from a secret. A command pinned to a single instance through set-instance or the LIM_<TYPE>_INSTANCE_* variables needs no API key at all; see Sandboxed agents.

Target an instance

Device and build commands accept --id <instance-id>; get and delete take the ID as a positional argument instead (lim ios delete <instance-id>). Without an ID, they use the instance of that type you created last in the current workspace. The CLI records these per workspace in ~/.lim/last-instances.json; a workspace is the current git repository or worktree unless you assign one with lim set-workspace-dir, --workspace, or LIM_WORKSPACE. See The CLI's default instance.

Pass --id explicitly in scripts, CI, and agents that create more than one instance.

When the targeted instance no longer exists, device and build commands create a replacement automatically; pass --no-create to fail instead. create, delete, list, get, logs, tools, and version never create a replacement; they fail with not-found instead.

Shared flags

Commands that act on instances share these flags. Account commands such as lim login and lim skills install take only some of them.

FlagWhat it does
--api-key <value>API key for this command. Overrides the stored login and LIM_API_KEY.
--jsonPrint structured JSON instead of tables or plain text, where the command supports it.
--quietSuppress intermediate logs and print only the final result.
--workspace <value>Workspace used to find the most recent instance when no ID is given. Defaults to the current git repository or worktree. On lim xcode build and lim xcode test, --workspace is the .xcworkspace passed to xcodebuild; use LIM_WORKSPACE there.
--[no-]createCreate a replacement instance when the target is not found. On by default.
--[no-]daemonRoute device commands through a background WebSocket daemon that starts on first use, so repeated commands reuse one connection. On by default; disable with --no-daemon or LIM_DAEMON=false.

lim session start starts the same background connection explicitly for one instance, lim session status lists running sessions, and lim session stop stops one or all of them.

Environment variables

VariableRead byMeaning
LIM_API_KEYEvery commandOrganization API key.
LIM_WORKSPACEEvery commandWorkspace for resolving the default instance.
LIM_DAEMONEvery commandSet to false to disable the background connection daemon.
LIM_DISABLE_TELEMETRYEvery commandSet to any value, such as 1, to disable CLI usage telemetry.
LIM_IOS_INSTANCE_URL, LIM_IOS_INSTANCE_TOKENlim iosDrive one simulator by its API URL and instance token, without an API key.
LIM_ANDROID_INSTANCE_URL, LIM_ANDROID_INSTANCE_TOKEN, LIM_ANDROID_INSTANCE_ADB_URLlim androidThe same for an emulator; the ADB URL enables lim android connect.
LIM_XCODE_INSTANCE_URL, LIM_XCODE_INSTANCE_TOKENlim xcodeThe same for an Xcode sandbox.
LIM_GRADLE_INSTANCE_URL, LIM_GRADLE_INSTANCE_TOKENlim gradleThe same for a Gradle sandbox.
LIM_WEBHOOK_URL, LIM_WEBHOOK_HEADERS, LIM_WEBHOOK_LABELSlim xcode build, lim gradle buildDefaults for --webhook-url, --webhook-header, and --webhook-label. See Build logs and webhooks.
LIM_SIGNED_UPLOAD_URLlim xcode build, lim gradle buildDefault for --signed-upload-url when --upload is not set.
LIM_KEYSTORE_PASSWORD, LIM_KEY_PASSWORDlim gradle buildPasswords for --keystore. See Sign and publish.
LIM_PLAYSTORE_ACCESS_TOKENlim gradle buildGoogle access token for --upload-to-playstore.

Commands

The Guide column links to the page that explains a command in context. Commands without a guide are covered by their --help output.

iOS simulators

CommandWhat it doesGuide
lim ios app-logStream or tail app logs from a running iOS instanceRun a simulator
lim ios app-logsList persisted app log captures of an iOS instanceRun a simulator
lim ios attach-xcodeAttach an Xcode instance to an iOS simulator
lim ios cameraControl the simulated camera of a running iOS instanceRun a simulator
lim ios createCreate a new iOS instanceRun a simulator
lim ios deleteDelete an iOS instanceRun a simulator
lim ios delete-fileDelete a file or folder on the iOS simulatorRun a simulator
lim ios element-treeGet the UI element tree from a running iOS instanceRun a simulator
lim ios eventsList persisted event log captures of an iOS instanceRun a simulator
lim ios foldRead or change the native iPhone Duo fold stateRun a simulator
lim ios getGet details for a specific iOS instancePer-instance MCP server
lim ios infoGet device information from a running iOS instance
lim ios install-appInstall an app on a running iOS instanceRun a simulator
lim ios keychain generate-keyGenerate an iOS keychain encryption keyRun a simulator
lim ios keychain restoreRestore iOS keychain state from asset storageRun a simulator
lim ios keychain saveSave iOS keychain state to asset storageRun a simulator
lim ios launch-appLaunch an app on a running iOS instanceRun a simulator
lim ios listList iOS instancesRun a simulator
lim ios list-appsList installed apps on a running iOS instanceRun a simulator
lim ios lsList files in the iOS simulator or an app containerRun a simulator
lim ios lsofList open files on a running iOS instanceRun a simulator
lim ios maestroRun Maestro flows against a running iOS instanceMaestro
lim ios microphoneControl the simulated microphone of a running iOS instanceRun a simulator
lim ios open-urlOpen a URL on a running iOS instanceRun a simulator
lim ios performPerform multiple iOS actions in a single batchRun a simulator
lim ios press-keyPress a key on a running iOS instanceRun a simulator
lim ios pull-filePull a file from the iOS simulatorRun a simulator
lim ios push-filePush a local file to the iOS simulatorRun a simulator
lim ios recordStart or stop video recording on a running iOS instanceRun a simulator
lim ios recordingsList persisted session recordings of an iOS instanceRun a simulator
lim ios reverseExpose a local client-first service to the simulatorConnect to local services
lim ios screenshotCapture a screenshot from a running iOS instanceRun a simulator
lim ios scrollScroll on a running iOS instanceRun a simulator
lim ios set-instanceSet the iOS instance targeted by subsequent commandsSandboxed agents
lim ios set-textSet text on an iOS element directly via accessibilityRun a simulator
lim ios simctlRun simctl on a running iOS instanceRun a simulator
lim ios swipeSwipe between two points on a running iOS instanceRun a simulator
lim ios syncSync a built app bundle to a running iOS instance
lim ios syslogStream syslog from a running iOS instanceRun a simulator
lim ios tapTap at coordinates on a running iOS instanceRun a simulator
lim ios tap-elementTap an iOS element by accessibility selectorRun a simulator
lim ios terminate-appTerminate an app on a running iOS instanceRun a simulator
lim ios toggle-keyboardToggle the iOS software keyboardRun a simulator
lim ios tunnelExpose declared local TCP destinations to the simulatorConnect to local services
lim ios tunnel statusShow the active destination tunnelConnect to local services
lim ios tunnel stopStop the active destination tunnelConnect to local services
lim ios typeType text into the focused iOS input fieldRun a simulator
lim ios xcodebuildRun xcodebuild on a running iOS instanceRun a simulator
lim ios xcrunRun xcrun on a running iOS instanceRun a simulator

Android emulators

CommandWhat it doesGuide
lim android adb-shellRun a shell command on a running Android instance (like adb shell)Run an emulator
lim android app-logStream or tail app logs from a running Android instanceRun an emulator
lim android app-logsList persisted app log captures of an Android instanceRun an emulator
lim android cameraControl the virtual camera of a running Android instanceRun an emulator
lim android connectConnect to an existing Android instance via ADB tunnelRun an emulator
lim android createCreate a new Android instanceRun an emulator
lim android deleteDelete an Android instanceRun an emulator
lim android element-treeGet the UI element tree from a running Android instanceRun an emulator
lim android eventsList persisted event log captures of an Android instanceRun an emulator
lim android find-elementFind Android elements by selectorRun an emulator
lim android getGet details for a specific Android instance
lim android install-appInstall an app on a running Android instanceRun an emulator
lim android launch-appLaunch an app on a running Android instanceRun an emulator
lim android listList Android instancesRun an emulator
lim android logcatRun logcat on a running Android instanceRun an emulator
lim android open-urlOpen a URL on a running Android instanceRun an emulator
lim android play-on-microphonePlay a local audio file as microphone input on a running Android instanceRun an emulator
lim android press-keyPress a key on a running Android instanceRun an emulator
lim android pull-filePull a file from a running Android instanceRun an emulator
lim android push-filePush a local file to a running Android instanceRun an emulator
lim android recordStart or stop video recording on a running Android instanceRun an emulator
lim android recordingsList persisted session recordings of an Android instanceRun an emulator
lim android screenshotCapture a screenshot from a running Android instanceRun an emulator
lim android scrollScroll on a running Android instanceRun an emulator
lim android set-instanceSet the Android instance targeted by subsequent commandsSandboxed agents
lim android set-wifi-bandwidthSet Wi-Fi bandwidth limits on a running Android instanceRun an emulator
lim android syncSync an APK to a running Android instanceRun an emulator
lim android tapTap at coordinates on a running Android instanceRun an emulator
lim android tap-elementTap an Android element by selectorRun an emulator
lim android terminate-appTerminate an app on a running Android instanceRun an emulator
lim android tunnelSend selected Android TCP destinations through this machineConnect to local services
lim android tunnel statusShow the active destination tunnelConnect to local services
lim android tunnel stopStop the active destination tunnelConnect to local services
lim android typeType text into an Android input fieldRun an emulator

Xcode sandboxes

CommandWhat it doesGuide
lim xcode attach-simulatorAttach an iOS simulator to an Xcode instanceBuild with Xcode
lim xcode buildRun xcodebuild on an Xcode sandboxBuild with Xcode
lim xcode createCreate a new Xcode instanceBuild with Xcode
lim xcode deleteDelete an Xcode instanceGitHub Actions recipes
lim xcode getGet details for a specific Xcode instance
lim xcode listList Xcode instancesPR previews
lim xcode logsFetch logs for an active, recent, or specific Xcode buildBuild logs and webhooks
lim xcode rbeServe a local Bazel remote-execution endpoint backed by a Limrun Xcode instanceBuild with Bazel
lim xcode rbe uploadUpload the latest successful remote build as an assetBuild with Bazel
lim xcode runRun a command on a xcode sandboxBuild with Xcode
lim xcode set-instanceSet the Xcode instance targeted by subsequent commandsSandboxed agents
lim xcode syncContinuously sync local source code to an Xcode sandboxBuild with Xcode
lim xcode testBuild a scheme's test targets on an Xcode sandbox and run them on an attached iOS simulator, streaming per-case results. Exits non-zero when tests fail. Creates and attaches the instances it needs unless --id points at an existing targetXCTest
lim xcode toolsShow the selected developer tools in a xcode sandboxXcode and tool versions
lim xcode tools installInstall selected tools in a xcode sandboxXcode and tool versions
lim xcode useSelect developer tool versions for a xcode sandboxXcode and tool versions
lim xcode versionShow the Xcode version the sandbox builds withXcode and tool versions
lim xcode version listList the Xcode versions the sandbox can build withXcode and tool versions
lim xcode version setPick the Xcode version this workspace builds withXcode and tool versions
lim xcode version unsetForget the Xcode version preference of this workspaceXcode and tool versions

Gradle sandboxes

CommandWhat it doesGuide
lim gradle buildBuild an Android project on a gradle instanceBuild with Gradle
lim gradle createCreate a new gradle instanceBuild with Gradle
lim gradle deleteDelete a gradle instanceGitHub Actions recipes
lim gradle getGet a gradle instance
lim gradle listList gradle instances
lim gradle logsFetch logs for an active, recent, or specific Gradle buildBuild logs and webhooks
lim gradle runRun a command on a gradle sandboxBuild with Gradle
lim gradle set-instanceSet the gradle instance targeted by subsequent commandsSandboxed agents
lim gradle syncSync local source code to a Gradle sandbox
lim gradle toolsShow the selected developer tools in a gradle sandboxBuild with Gradle
lim gradle tools installInstall selected tools in a gradle sandboxBuild with Gradle
lim gradle useSelect developer tool versions for a gradle sandboxBuild with Gradle

Assets

CommandWhat it doesGuide
lim asset deleteDelete an assetAsset Storage
lim asset getList assets or get a specific one
lim asset listList assets or get a specific oneAsset Storage
lim asset pullDownload an asset fileAsset Storage
lim asset pushUpload an asset fileAsset Storage

Skills, sessions, and account

CommandWhat it doesGuide
lim loginLog in to Limrun
lim logoutLog out of Limrun
lim runGet started with Limrun
lim session startStart a persistent session that keeps one connection open to an instance
lim session statusShow active sessions
lim session stopStop one or all active sessions
lim set-api-keySet the stored Limrun API key
lim set-workspace-dirAssign a directory to an isolated lim workspace
lim skills installInstall Limrun skills for AI coding agentsSet up a coding agent
lim versionPrint the installed CLI version