bellatrix CLI Reference
Generated from the CLI's own help output (bellatrix 3.1.1). Run bellatrix help, or bellatrix <domain> help --json, for the same data locally.
Conventions
Usage: bellatrix <init|sessions|version|help> [--flag value] | bellatrix <desktop|web|mobile> <verb> [--flag value] | bellatrix <domain> help
Output is always one line of JSON on stdout. The success JSON of each command is its contract.
Each command is declared once in the CLI source (src/Bellatrix.Cli/Commands); this page, bellatrix help and the router are generated from those declarations.
| Exit code | Meaning |
|---|---|
0 | Success; the success JSON on stdout is the contract. |
1 | Error; stdout is {"error":{"code","message"}} (e.g. usage, unknown_verb, session_not_found, driver_unreachable). |
2 | Usage error in agent or language selection (init: unknown/ambiguous --agent or --language). |
Every command also accepts --json and --no-interaction (Accepted for compatibility; output is always JSON. Accepted and ignored; the CLI never prompts.)
Top-level commands
bellatrix init (alias: update-skills)
Scaffold the BELLATRIX skills, subagents and instruction fragment for your AI agent(s) into this repo.
| Flag | Meaning | Notes |
|---|---|---|
--agent <a[,b,...]> | AI agent(s) to scaffold for, comma-separated (windsurf = devin, agy = antigravity).Default: the agents already scaffolded, else the one detected from repo markers. | one of: claude | copilot | cursor | devin | codex | gemini | antigravity | kiro | opencode |
--target <a[,b,...]> | Legacy spelling of --agent. | legacy spelling of --agent |
--language <language> | BELLATRIX flavor. Default: the recorded language, else detected from build files, else csharp. | one of: csharp | java | typescript |
--domains <d[,d,...]> | Domains to scaffold. | default: desktop,web,mobile; one of: desktop | web | mobile |
--out <dir> | Repository root to scaffold into. | default: current directory |
--regenerate | Overwrite files you edited (otherwise they are skipped and reported). | |
--force | Legacy spelling of --regenerate. | legacy spelling of --regenerate |
--dry-run | Report what would be written; change nothing. | |
--template-source <dir> | Render your own template folder (same layout as the built-in templates) instead of the BELLATRIX templates. | |
--prefix <prefix> | Namespace for --template-source output (skills, agents, fragment, manifests). Default: inferred from the folder. |
Output: {agents[], language, domains[], emitted[], skipped[], removed[], registered, mcpRemoved[], perAgent{}, decisions[], unsupported[], warnings[], dryRun, ...}
bellatrix sessions
List the persisted sessions of every domain, or prune stale ones.
| Flag | Meaning | Notes |
|---|---|---|
--list | Report the sessions (the default). | |
--prune | Delete sessions idle longer than the keep-alive TTL and stop their local web drivers. |
Output: {sessions[{domain, logicalName, sessionId, driverType, serverUrl, lastActivityUtc}], count} | --prune: {pruned[], count}
bellatrix version
Print the CLI version (also: bellatrix --version).
Output: {version}
bellatrix help
Describe the commands (bellatrix help, or bellatrix <domain> help). --json for machine-readable output.
Output: {version, usage, exitCodes, globalFlags[], domains[], commands[]}
Desktop verbs
bellatrix desktop start-session
Launch a configured app (or --app-path) on the driver and persist the session.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
--app <name> | A configured app name (see list-apps). Default: the default configured app. | |
--app-path <path|AUMID> | Ad-hoc app path or AppUserModelId instead of a configured app. |
Output: {sessionId, appName, appPath, driverType}
bellatrix desktop list-apps
List the configured apps (McpSettings__Apps__N__Name/Path).
Output: {apps[{name, path, workingDirectory, arguments, isDefault}], count}
bellatrix desktop attach-window
Attach a new session to an already-running top-level window by title.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
--window-title <title> | Exact window title to attach to. | required |
Output: {sessionId, windowTitle, driverType}
bellatrix desktop reattach-session
Re-point an existing session at another window (e.g. the main window after a splash screen).
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
--window-title <title> | Exact window title to attach to. | required |
Output: {success, sessionId, windowTitle, driverType}
bellatrix desktop close-session
Close the app session and forget it.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
Output: {success, sessionId}
bellatrix desktop list-sessions
List the live desktop sessions (stale rows of this domain are pruned).
Output: {sessions[], count}
bellatrix desktop get-title
Get the current window title.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
Output: {title}
bellatrix desktop maximize
Maximize the current window.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
Output: {success}
bellatrix desktop get-page-source
Return the raw UIA page source XML (context-heavy; prefer snapshot + find).
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
Output: {pageSource}
bellatrix desktop snapshot (alias: get-view-snapshot)
Capture the UI tree to a file and return only a compact reference.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
--inline | Return the full node array instead of the saved-file reference (context-heavy; avoid in agents). | |
--grep <regex> | Return only nodes whose attributes match the regex (filtered in-process). | |
--interactive-only | Return only interactive nodes (filtered in-process). |
Output: {path, elementCount, summary} (saved file reference) | --inline: [nodes] | --grep/--interactive-only: {nodes[], count, query}
bellatrix desktop find (alias: query-snapshot)
Query a saved snapshot (--snapshot) or the live view for a handful of matching nodes.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
--snapshot <path> | Query a saved snapshot file instead of the live session (no driver needed). From `bellatrix desktop snapshot`. | |
--name <name> | Nodes whose Name matches. | |
--automation-id <id> | Nodes whose AutomationId matches. | |
--control-type <type> | Nodes whose ControlType matches (e.g. Button). | |
--text <text> | Nodes whose text contains the value. | |
--grep <regex> | Nodes whose attributes match the regex. | |
--interactive-only | Only interactive nodes. |
Output: {nodes[], count, query{mode, value}}
bellatrix desktop take-screenshot
Screenshot the current window.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
--out <file.png> | Write the PNG to this file instead of .bellatrix/screenshots/. | |
--inline | Return the base64 PNG inline instead of saving a file (context-heavy; avoid in agents). |
Output: {path, width, height} (saved PNG, default .bellatrix/screenshots/) | --inline: {screenshot (base64 PNG)}
bellatrix desktop click
Click an element.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
--locator <xpath> | Element XPath (desktop locators are XPath only). | required |
--xpath <xpath> | Legacy spelling of --locator. | legacy spelling of --locator |
--strategy xpath | Accepted for uniformity; only xpath is valid on desktop. | one of: xpath |
Output: {success}
bellatrix desktop type-text
Type text into an element.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
--locator <xpath> | Element XPath (desktop locators are XPath only). | required |
--xpath <xpath> | Legacy spelling of --locator. | legacy spelling of --locator |
--strategy xpath | Accepted for uniformity; only xpath is valid on desktop. | one of: xpath |
--text <text> | Text to type. | required |
Output: {success}
bellatrix desktop clear
Clear an element's text.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
--locator <xpath> | Element XPath (desktop locators are XPath only). | required |
--xpath <xpath> | Legacy spelling of --locator. | legacy spelling of --locator |
--strategy xpath | Accepted for uniformity; only xpath is valid on desktop. | one of: xpath |
Output: {success}
bellatrix desktop get-text
Get an element's text.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
--locator <xpath> | Element XPath (desktop locators are XPath only). | required |
--xpath <xpath> | Legacy spelling of --locator. | legacy spelling of --locator |
--strategy xpath | Accepted for uniformity; only xpath is valid on desktop. | one of: xpath |
Output: {text}
bellatrix desktop get-attribute
Get an element attribute.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
--locator <xpath> | Element XPath (desktop locators are XPath only). | required |
--xpath <xpath> | Legacy spelling of --locator. | legacy spelling of --locator |
--strategy xpath | Accepted for uniformity; only xpath is valid on desktop. | one of: xpath |
--attribute <name> | Attribute name (e.g. Name, AutomationId, IsOffscreen). | required |
Output: {attribute, value}
bellatrix desktop is-visible
Whether an element is displayed.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
--locator <xpath> | Element XPath (desktop locators are XPath only). | required |
--xpath <xpath> | Legacy spelling of --locator. | legacy spelling of --locator |
--strategy xpath | Accepted for uniformity; only xpath is valid on desktop. | one of: xpath |
Output: {visible}
bellatrix desktop is-enabled
Whether an element is enabled.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
--locator <xpath> | Element XPath (desktop locators are XPath only). | required |
--xpath <xpath> | Legacy spelling of --locator. | legacy spelling of --locator |
--strategy xpath | Accepted for uniformity; only xpath is valid on desktop. | one of: xpath |
Output: {enabled}
bellatrix desktop scaffold — deprecated, use bellatrix init
Former name of bellatrix init (desktop only).
| Flag | Meaning | Notes |
|---|---|---|
--agent <a[,b,...]> | AI agent(s) to scaffold for, comma-separated (windsurf = devin, agy = antigravity).Default: the agents already scaffolded, else the one detected from repo markers. | one of: claude | copilot | cursor | devin | codex | gemini | antigravity | kiro | opencode |
--target <a[,b,...]> | Legacy spelling of --agent. | legacy spelling of --agent |
--language <language> | BELLATRIX flavor. Default: the recorded language, else detected from build files, else csharp. | one of: csharp | java | typescript |
--domains <d[,d,...]> | Domains to scaffold. | default: desktop,web,mobile; one of: desktop | web | mobile |
--out <dir> | Repository root to scaffold into. | default: current directory |
--regenerate | Overwrite files you edited (otherwise they are skipped and reported). | |
--force | Legacy spelling of --regenerate. | legacy spelling of --regenerate |
--dry-run | Report what would be written; change nothing. | |
--template-source <dir> | Render your own template folder (same layout as the built-in templates) instead of the BELLATRIX templates. | |
--prefix <prefix> | Namespace for --template-source output (skills, agents, fragment, manifests). Default: inferred from the folder. |
Output: same as init
Web verbs
bellatrix web start-session
Start a browser session (the CLI starts a local driver, or uses --remote-url) and persist it.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
--browser <browser> | Browser to start. | default: chrome; one of: chrome | firefox | edge |
--headless | Run the browser headless. | |
--width <px> | Window width. | default: 1920 |
--height <px> | Window height. | default: 1080 |
--remote-url <url> | A Selenium server you run (e.g. http://localhost:4444); default: a local driver the CLI starts. |
Output: {sessionId, browser, serverUrl, driverServer: local|remote}
bellatrix web close-session
Close the browser; a local driver started by start-session is stopped too.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
Output: {success, sessionId, driverStopped}
bellatrix web list-sessions
List the live web sessions (stale rows of this domain are pruned).
Output: {sessions[], count}
bellatrix web back
Browser back.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
Output: {success, url}
bellatrix web forward
Browser forward.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
Output: {success, url}
bellatrix web refresh
Reload the page.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
Output: {success, url}
bellatrix web get-title
Get the page title.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
Output: {title}
bellatrix web get-url
Get the current URL.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
Output: {url}
bellatrix web get-page-source
Return the raw HTML (context-heavy; prefer snapshot + find).
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
Output: {pageSource}
bellatrix web snapshot (alias: get-view-snapshot)
Capture the page's element tree to a file and return only a compact reference.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
--inline | Return the full node array instead of the saved-file reference (context-heavy; avoid in agents). | |
--grep <regex> | Return only nodes whose attributes match the regex (filtered in-process). | |
--interactive-only | Return only interactive nodes (filtered in-process). |
Output: {path, elementCount, summary} (saved file reference) | --inline: [nodes] | --grep/--interactive-only: {nodes[], count, query}
bellatrix web find (alias: query-snapshot)
Query a saved snapshot (--snapshot) or the live page for a handful of matching nodes.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
--snapshot <path> | Query a saved snapshot file instead of the live session (no driver needed). From `bellatrix web snapshot`. | |
--data-testid <value> | Nodes whose data-testid matches. | |
--id <id> | Nodes whose id matches. | |
--role <role> | Nodes whose ARIA role matches. | |
--name <name> | Nodes whose accessible name / name attribute matches. | |
--text <text> | Nodes whose text contains the value. | |
--grep <regex> | Nodes whose attributes match the regex. | |
--interactive-only | Only interactive nodes. |
Output: {nodes[], count, query{mode, value}}
bellatrix web click
Click an element.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
--locator <selector> | Element locator: a CSS selector or an XPath. | required |
--selector <selector> | Legacy spelling of --locator. | legacy spelling of --locator |
--strategy <strategy> | Locator strategy; default xpath when the locator starts with / or (/, else css. | one of: css | xpath | id | class | name | tag | linktext | partiallinktext |
Output: {success}
bellatrix web type-text
Type text into an element.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
--locator <selector> | Element locator: a CSS selector or an XPath. | required |
--selector <selector> | Legacy spelling of --locator. | legacy spelling of --locator |
--strategy <strategy> | Locator strategy; default xpath when the locator starts with / or (/, else css. | one of: css | xpath | id | class | name | tag | linktext | partiallinktext |
--text <text> | Text to type. | required |
Output: {success}
bellatrix web clear
Clear an input.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
--locator <selector> | Element locator: a CSS selector or an XPath. | required |
--selector <selector> | Legacy spelling of --locator. | legacy spelling of --locator |
--strategy <strategy> | Locator strategy; default xpath when the locator starts with / or (/, else css. | one of: css | xpath | id | class | name | tag | linktext | partiallinktext |
Output: {success}
bellatrix web select
Choose an option of a <select> by value.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
--locator <selector> | Element locator: a CSS selector or an XPath. | required |
--selector <selector> | Legacy spelling of --locator. | legacy spelling of --locator |
--strategy <strategy> | Locator strategy; default xpath when the locator starts with / or (/, else css. | one of: css | xpath | id | class | name | tag | linktext | partiallinktext |
--value <value> | Option value. | required |
Output: {success}
bellatrix web get-text
Get an element's text.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
--locator <selector> | Element locator: a CSS selector or an XPath. | required |
--selector <selector> | Legacy spelling of --locator. | legacy spelling of --locator |
--strategy <strategy> | Locator strategy; default xpath when the locator starts with / or (/, else css. | one of: css | xpath | id | class | name | tag | linktext | partiallinktext |
Output: {text}
bellatrix web get-attribute
Get an element attribute.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
--locator <selector> | Element locator: a CSS selector or an XPath. | required |
--selector <selector> | Legacy spelling of --locator. | legacy spelling of --locator |
--strategy <strategy> | Locator strategy; default xpath when the locator starts with / or (/, else css. | one of: css | xpath | id | class | name | tag | linktext | partiallinktext |
--attribute <name> | Attribute name. | required |
Output: {attribute, value}
bellatrix web is-visible
Whether an element is displayed.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
--locator <selector> | Element locator: a CSS selector or an XPath. | required |
--selector <selector> | Legacy spelling of --locator. | legacy spelling of --locator |
--strategy <strategy> | Locator strategy; default xpath when the locator starts with / or (/, else css. | one of: css | xpath | id | class | name | tag | linktext | partiallinktext |
Output: {visible}
bellatrix web is-enabled
Whether an element is enabled.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
--locator <selector> | Element locator: a CSS selector or an XPath. | required |
--selector <selector> | Legacy spelling of --locator. | legacy spelling of --locator |
--strategy <strategy> | Locator strategy; default xpath when the locator starts with / or (/, else css. | one of: css | xpath | id | class | name | tag | linktext | partiallinktext |
Output: {enabled}
bellatrix web wait-for-element
Wait until an element exists.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
--locator <selector> | Element locator: a CSS selector or an XPath. | required |
--selector <selector> | Legacy spelling of --locator. | legacy spelling of --locator |
--strategy <strategy> | Locator strategy; default xpath when the locator starts with / or (/, else css. | one of: css | xpath | id | class | name | tag | linktext | partiallinktext |
--timeout-ms <ms> | Maximum wait. | default: 30000 |
Output: {success, found[, error]}
bellatrix web wait-for-page-ready
Wait until document.readyState is complete.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
Output: {success}
bellatrix web execute-js
Run JavaScript in the page and return its result.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
--script <js> | Script body (use return to produce a value). | required |
Output: {result}
bellatrix web take-screenshot
Screenshot the viewport.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
--out <file.png> | Write the PNG to this file instead of .bellatrix/screenshots/. | |
--inline | Return the base64 PNG inline instead of saving a file (context-heavy; avoid in agents). |
Output: {path, width, height} (saved PNG, default .bellatrix/screenshots/) | --inline: {screenshot (base64 PNG)}
Mobile verbs
bellatrix mobile start-session
Start an app session on your Appium server and persist it.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
--platform <platform> | Target platform. | required; one of: android | ios |
--app <path> | App file (.apk/.app/.ipa) to install and launch. | required |
--device-name <name> | Device or emulator name. | |
--appium-url <url> | Your Appium server. | default: http://127.0.0.1:4723 |
Output: {sessionId, platform, appPath}
bellatrix mobile close-session
Close the app session and forget it.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
Output: {success, sessionId}
bellatrix mobile list-sessions
List the live mobile sessions (stale rows of this domain are pruned).
Output: {sessions[], count}
bellatrix mobile get-context
Get the current context (NATIVE_APP or a WEBVIEW).
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
Output: {context}
bellatrix mobile set-context
Switch context.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
--context <name> | Context name from get-contexts. | required |
Output: {success, context}
bellatrix mobile get-contexts
List the available contexts.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
Output: {contexts[]}
bellatrix mobile background-app
Send the app to the background for N seconds.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
--seconds <n> | Seconds in the background. | required |
Output: {success}
bellatrix mobile close-app
Terminate an app.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
--app-id <id> | Package name / bundle id. | required |
Output: {success}
bellatrix mobile launch-app
Activate an installed app.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
--app-id <id> | Package name / bundle id. | required |
Output: {success}
bellatrix mobile install-app
Install an app file.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
--app-path <path> | App file to install. | required |
Output: {success}
bellatrix mobile remove-app
Uninstall an app from the device.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
--app-id <id> | Package name / bundle id. | required |
Output: {success}
bellatrix mobile is-app-installed
Whether an app is installed.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
--bundle-id <id> | Package name / bundle id. | required |
Output: {installed}
bellatrix mobile get-page-source
Return the raw page source XML (context-heavy; prefer snapshot + find).
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
Output: {pageSource}
bellatrix mobile snapshot (alias: get-view-snapshot)
Capture the screen's element tree to a file and return only a compact reference.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
--inline | Return the full node array instead of the saved-file reference (context-heavy; avoid in agents). | |
--grep <regex> | Return only nodes whose attributes match the regex (filtered in-process). | |
--interactive-only | Return only interactive nodes (filtered in-process). |
Output: {path, elementCount, summary} (saved file reference) | --inline: [nodes] | --grep/--interactive-only: {nodes[], count, query}
bellatrix mobile find (alias: query-snapshot)
Query a saved snapshot (--snapshot) or the live screen for a handful of matching nodes.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
--snapshot <path> | Query a saved snapshot file instead of the live session (no driver needed). From `bellatrix mobile snapshot`. | |
--resource-id <id> | Nodes whose resource-id matches. | |
--content-desc <text> | Nodes whose content-desc (accessibility id) matches. | |
--class <class> | Nodes whose class matches (e.g. android.widget.TextView). | |
--text <text> | Nodes whose text contains the value. | |
--grep <regex> | Nodes whose attributes match the regex. | |
--interactive-only | Only interactive nodes. |
Output: {nodes[], count, query{mode, value}}
bellatrix mobile take-screenshot
Screenshot the device screen.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
--out <file.png> | Write the PNG to this file instead of .bellatrix/screenshots/. | |
--inline | Return the base64 PNG inline instead of saving a file (context-heavy; avoid in agents). |
Output: {path, width, height} (saved PNG, default .bellatrix/screenshots/) | --inline: {screenshot (base64 PNG)}
bellatrix mobile click (alias: tap)
Tap an element.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
--locator <value> | Element locator value for --strategy. | required |
--locator-value <value> | Legacy spelling of --locator. | legacy spelling of --locator |
--strategy <strategy> | Locator strategy; default xpath when the value starts with / or (/, else accessibilityid. | one of: accessibilityid | id | xpath | classname | androiduiautomator | iospredicate | iosclasschain |
--locator-type <strategy> | Legacy spelling of --strategy. | one of: accessibilityid | id | xpath | classname | androiduiautomator | iospredicate | iosclasschain; legacy spelling of --strategy |
Output: {success}
bellatrix mobile type-text
Type text into an element.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
--locator <value> | Element locator value for --strategy. | required |
--locator-value <value> | Legacy spelling of --locator. | legacy spelling of --locator |
--strategy <strategy> | Locator strategy; default xpath when the value starts with / or (/, else accessibilityid. | one of: accessibilityid | id | xpath | classname | androiduiautomator | iospredicate | iosclasschain |
--locator-type <strategy> | Legacy spelling of --strategy. | one of: accessibilityid | id | xpath | classname | androiduiautomator | iospredicate | iosclasschain; legacy spelling of --strategy |
--text <text> | Text to type. | required |
Output: {success}
bellatrix mobile clear
Clear an element's text.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
--locator <value> | Element locator value for --strategy. | required |
--locator-value <value> | Legacy spelling of --locator. | legacy spelling of --locator |
--strategy <strategy> | Locator strategy; default xpath when the value starts with / or (/, else accessibilityid. | one of: accessibilityid | id | xpath | classname | androiduiautomator | iospredicate | iosclasschain |
--locator-type <strategy> | Legacy spelling of --strategy. | one of: accessibilityid | id | xpath | classname | androiduiautomator | iospredicate | iosclasschain; legacy spelling of --strategy |
Output: {success}
bellatrix mobile get-text
Get an element's text.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
--locator <value> | Element locator value for --strategy. | required |
--locator-value <value> | Legacy spelling of --locator. | legacy spelling of --locator |
--strategy <strategy> | Locator strategy; default xpath when the value starts with / or (/, else accessibilityid. | one of: accessibilityid | id | xpath | classname | androiduiautomator | iospredicate | iosclasschain |
--locator-type <strategy> | Legacy spelling of --strategy. | one of: accessibilityid | id | xpath | classname | androiduiautomator | iospredicate | iosclasschain; legacy spelling of --strategy |
Output: {text}
bellatrix mobile get-attribute
Get an element attribute.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
--locator <value> | Element locator value for --strategy. | required |
--locator-value <value> | Legacy spelling of --locator. | legacy spelling of --locator |
--strategy <strategy> | Locator strategy; default xpath when the value starts with / or (/, else accessibilityid. | one of: accessibilityid | id | xpath | classname | androiduiautomator | iospredicate | iosclasschain |
--locator-type <strategy> | Legacy spelling of --strategy. | one of: accessibilityid | id | xpath | classname | androiduiautomator | iospredicate | iosclasschain; legacy spelling of --strategy |
--attribute <name> | Attribute name. | required |
Output: {attribute, value}
bellatrix mobile is-visible
Whether an element is displayed.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
--locator <value> | Element locator value for --strategy. | required |
--locator-value <value> | Legacy spelling of --locator. | legacy spelling of --locator |
--strategy <strategy> | Locator strategy; default xpath when the value starts with / or (/, else accessibilityid. | one of: accessibilityid | id | xpath | classname | androiduiautomator | iospredicate | iosclasschain |
--locator-type <strategy> | Legacy spelling of --strategy. | one of: accessibilityid | id | xpath | classname | androiduiautomator | iospredicate | iosclasschain; legacy spelling of --strategy |
Output: {visible}
bellatrix mobile is-enabled
Whether an element is enabled.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
--locator <value> | Element locator value for --strategy. | required |
--locator-value <value> | Legacy spelling of --locator. | legacy spelling of --locator |
--strategy <strategy> | Locator strategy; default xpath when the value starts with / or (/, else accessibilityid. | one of: accessibilityid | id | xpath | classname | androiduiautomator | iospredicate | iosclasschain |
--locator-type <strategy> | Legacy spelling of --strategy. | one of: accessibilityid | id | xpath | classname | androiduiautomator | iospredicate | iosclasschain; legacy spelling of --strategy |
Output: {enabled}
bellatrix mobile get-orientation
Get the screen orientation.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
Output: {orientation}
bellatrix mobile set-orientation
Set the screen orientation.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
--orientation <orientation> | New orientation. | required; one of: portrait | landscape |
Output: {success, orientation}
bellatrix mobile swipe
Swipe between two screen points.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
--start-x <px> | Start X. | required |
--start-y <px> | Start Y. | required |
--end-x <px> | End X. | required |
--end-y <px> | End Y. | required |
--duration <ms> | Swipe duration. | default: 1000 |
Output: {success}
bellatrix mobile scroll-to-element
Scroll until an element is visible.
| Flag | Meaning | Notes |
|---|---|---|
--session <name> | Logical session name, persisted per domain in .bellatrix/sessions.db so later invocations reattach by id. | default: default |
--locator <value> | Element locator value for --strategy. | required |
--locator-value <value> | Legacy spelling of --locator. | legacy spelling of --locator |
--strategy <strategy> | Locator strategy; default xpath when the value starts with / or (/, else accessibilityid. | one of: accessibilityid | id | xpath | classname | androiduiautomator | iospredicate | iosclasschain |
--locator-type <strategy> | Legacy spelling of --strategy. | one of: accessibilityid | id | xpath | classname | androiduiautomator | iospredicate | iosclasschain; legacy spelling of --strategy |
Output: {success}