For AI agents and LLMs: a machine-readable index is available at llms.txt. A plain-Markdown version of any documentation page is available by appending .md to its URL.
Skip to main content

CLI Reference

Commands​

kane-cli --tui​

Launch the interactive TUI.

kane-cli --tui

kane-cli run​

Run a browser automation test.

kane-cli run "<objective>" [options]
FlagDescriptionDefault
--url <url>Starting URL for the browserLast used or configured URL
--headlessRun Chrome without a visible windowOff
--max-steps <n>Maximum agent reasoning steps30
--timeout <s>Abort after N secondsNo limit
--cdp-endpoint <url>Connect to an existing Chrome via CDPAuto-launch Chrome
--ws-endpoint <url>Connect via WebSocket (e.g. TestMu AI remote grid wss://)Local Chrome
--variables <json>Inline variable JSONNone
--variables-file <path>Load variables from a JSON fileNone
--global-context <file>Override global context markdown~/.testmuai/kaneai/global-memory.md
--local-context <file>Override local context markdown.testmuai/context.md
--session-context <json>Prior runs context JSONNone
--agentOutput structured NDJSON (for AI coding agents)Off
--mode <name>Run mode: action (strict) or testing (lenient)Config value, otherwise testing
--code-exportGenerate code export after run uploadsOff
--code-language <lang>Code export language: python or javascriptpython
--skip-code-validationSkip post-codegen worker-side validationOn
--no-skip-code-validationForce post-codegen worker-side validationOff
--username <user>Basic auth username (overrides stored profile)N/A
--access-key <key>Basic auth access key (overrides stored profile)N/A
--env <name>Environment (prod)Active profile's env

Mobile run flags (macOS Apple Silicon only):

FlagDescriptionDefault
--target <name>Which target to run against: desktop, emulator, or simulatorSaved session target, otherwise desktop
--device-name <name>Pick a device as kane-cli devices list --target emulator|simulator prints it. A name needs a versionConfig value. When unset, a TTY run opens a one-time picker and saves the choice. Non-interactive runs require a device
--os-version <version>The device's OS version, for example 14 or 17.5. On its own, it matches any device running that versionConfig value
--app <path|APPid>The app under test. A build (emulator .apk, simulator .zip) or an uploaded app idConfig value. Required for every mobile run

On the desktop target, the device flags and --app are ignored. See Mobile Testing for setup.


kane-cli doctor​

Check the mobile tooling this machine needs for one target, emulator or simulator, and install the tooling Kane CLI manages for it. --target is required.

kane-cli doctor --target emulator              # required checks, each with a fix if it fails
kane-cli doctor --target simulator --install # install the test tooling Kane CLI manages

doctor prints one line per required check, each with a fix. Run kane-cli login before --install. See Mobile Testing.


kane-cli devices list​

List the emulators or simulators Kane CLI can run against. --target is required. Address a device on a run with --device-name and --os-version, as the list prints them.

Verified
kane-cli devices list --target emulator             # the emulators on this machine
kane-cli devices list --target simulator --remote # the simulators the cloud grid can provision

See Remote Runs for the grid catalog.


kane-cli apps list​

List the uploaded builds your account can use for a target. The APP ID column is what --app and kane-cli config set-app accept.

Verified
kane-cli apps list --target emulator

kane-cli login​

Authenticate with TestMu AI. Opens a browser for OAuth, or accepts credentials for basic auth.

# OAuth (interactive)
kane-cli login [--profile <name>]

# Basic auth (non-interactive)
kane-cli login --username <user> --access-key <key> [--profile <name>]

See Authentication for details on profiles and auth methods.


kane-cli logout​

Revoke tokens and remove stored credentials for the active profile.

kane-cli logout

kane-cli whoami​

Show the active profile and authentication status.

kane-cli whoami [--profile <name>]

Prints profile, environment, auth method, username, and token state (for OAuth).


kane-cli balance​

Show credit balance for the active profile.

kane-cli balance [--profile <name>]

kane-cli profiles​

Manage named authentication profiles.

kane-cli profiles list           # List all profiles
kane-cli profiles switch <name> # Switch the active profile
kane-cli profiles delete <name> # Delete a profile

See Authentication: Profiles for details.


kane-cli config​

View and modify persistent settings.

kane-cli config show                       # Show all settings
kane-cli config set-window <W>x<H> # Set browser window size
kane-cli config set-mode <action|testing> # Set run mode
kane-cli config chrome-profile [path] # Set Chrome profile (interactive picker if no path)
kane-cli config project [id] # Set Test Manager project (interactive picker if no id)
kane-cli config folder [id] # Set Test Manager folder (interactive picker if no id)
kane-cli config set-target <target> # Set run target: desktop | emulator | simulator
kane-cli config set-device-name <name> # Set default mobile device, as kane-cli devices list prints it
kane-cli config set-os-version <version> # Set the default mobile device's OS version
kane-cli config set-app <path|APPid> # Set default app under test for mobile runs
note

Commands without arguments (chrome-profile, project, folder) launch an interactive picker UI. AI agents cannot run these. Ask the user to run them directly.

See Configuration for the full settings reference.


kane-cli feedback​

Submit feedback on a completed test run.

kane-cli feedback \
--test-id <id> \
--feedback-type <positive|negative> \
--details "optional message"

Exit Codes​

CodeMeaning
0Test passed
1Test failed (assertion not met)
2Error (auth failure, Chrome crash, infra issue)
3Timeout or cancelled

TUI Slash Commands​

CommandArgsDescription
/run"objective"Execute a test run
/login[--profile name]OAuth login
/logout[--profile name]Logout and revoke tokens
/whoami[--profile name]Show profile info
/balanceShow credit balance
/profileslist|switch|deleteManage profiles
/configshow|set-window|set-mode|chrome-profile|project|folderManage configuration
/mobileSwitch the session to an emulator or simulator
/desktopSwitch the session back to desktop (Chrome)
/doctorCheck mobile tooling and devices
/newStart a fresh session (uploads current session first)
/summary[index]View detailed run summaries
/cancelAbort the current run
/helpShow the command reference
/clearClear chat history
/exitQuit Kane CLI

Keyboard Shortcuts​

ShortcutAction
EnterSubmit objective
Ctrl+CCancel current run
Ctrl+C (twice)Exit TUI
Ctrl+RReverse history search
EscGo back / close picker
Up / DownNavigate menu or input history
TabAccept autocomplete

Settings Reference​

SettingDefaultCommand
window_size1920x1080config set-window
default_urlhttps://kaneai-playground.lambdatest.ioInternal default
modelv16-alphaInternal default
modetestingconfig set-mode
chrome_profile_pathEmpty (temporary per run)config chrome-profile
project_id / project_nameNoneconfig project
folder_id / folder_nameNoneconfig folder
code_export.enabledfalseTUI menu or --code-export flag
code_export.languagepython--code-language flag
code_export.skip_validationtrueTUI menu or --skip-code-validation flag

Settings are stored at ~/.testmuai/kaneai/tui-config.json. See Configuration for details.


Directory Structure​

~/.testmuai/kaneai/
├── tui-config.json # Persistent settings
├── global-memory.md # Global agent context
├── chrome-profiles/ # Named Chrome user profiles
│ └── <name>/
├── profiles/ # Stored credentials
│ └── <profile>/
│ └── <environment>/
│ └── credentials # OAuth tokens or basic auth (mode 0600)
├── sessions/ # All session history
│ └── <session-id>/
│ ├── session.json # Session metadata and run list
│ ├── tui.log # Session event log
│ ├── runs/
│ │ └── <n>/ # Per-run directory
│ │ └── run-test/
│ │ ├── actions.ndjson
│ │ └── screenshots/
│ └── code-export/ # Generated code (when enabled)
└── variables/ # Global variable files
└── *.json

.testmuai/ # Project-local (in cwd)
├── context.md # Project-specific agent context
└── variables/
└── *.json # Project-specific variables

Terminal First Testing With Kane CLI

Natural language browser & mobile app tests right from terminal.

×
Schedule Your Personal Demo
Kane CLI terminal

Help and Support

Related Articles