CLI Command Reference

Complete reference for Ansight CLI commands, subcommands, aliases, global options, identifier discovery, and process exit codes.

CLI v0.23.1

This page lists every command currently published by the Ansight CLI. The installed executable remains authoritative for version-specific details:

ansight help
ansight <command> --help

Canonical interface. Use this reference for command discovery and confirm version-specific details against the help shipped with the installed CLI.

Syntax and global options

ansight <command> [subcommand] [arguments] [options]
OptionMeaning
--help, -h, -?Show help for the selected command family.
--jsonEmit a versioned machine-readable result.
--silentSuppress stdout and stderr, overriding JSON output.
--verboseInclude debug, telemetry, and app-event diagnostics.
--data-dir <path>Select host state; also supported through ANSIGHT_DATA_DIR.
--adb-path <path>Select an ADB executable or Android SDK directory.
--xcode-path <path>Select an Xcode app or Developer directory.
--secret-store-file <path>Use an encrypted file instead of the OS credential vault.
--secret-key-file <path>Read the encrypted store’s AES key from a protected file.
--discovery-port <port>Override the UDP SDK discovery port.
--websocket-port <port>Override the SDK WebSocket port.
--node-path <path>Select the Node.js runtime used for repository modules.

Command index

Command familyCommands and argumentsAliases
versionversion--version
updateupdate check [options]
update [options]
upgrade
analyticsstatus
detailed enable
detailed disable
accountaccount
open
login [options]
refresh
status
logout [--local]
portal for open; authentication actions delegate to auth
serveserve [--session <id>] [--port <port>] [--path <path>] [--open]
hostrun [options]
status
stop
doctordoctor [options]capabilities
devicelist [filters]
start <ios|android> <device-id>
shutdown <ios|android> <device-id>
apps <ios|android> <device-id>
install <ios|android> <device-id> <app-path>
launch <ios|android> <device-id> <app-id>
terminate <ios|android> <device-id> <app-id>
location set <platform> <device-id>
location clear <platform> <device-id>
location play <platform> <device-id> <route>
location status
location stop
screenshot <platform> <device-id>
devices
inputtap <platform> <device-id> --x <px> --y <px>
swipe <platform> <device-id> [options]
text <platform> <device-id> --value <text>
button <platform> <device-id> <button>
applist
get <app-id>
register <app-id> [options]
remove <app-id>
tools <session-id>
call <session-id> <tool-id> [options]
push-file <session-id> <local-path> <remote-directory> [options]
audit [--limit <count>]
pairingissue [app-id] [options]
list [options]
get <invite-id>
revoke <invite-id>
enrollment
companionaccess status
access enable [--mode session|always]
access disable
machines list
machines get <machine-id>
machines rename <machine-id> <name>
machines revoke <machine-id>
machines restore <machine-id>
machines delete <machine-id> --force
connections list
connections disconnect <session-id>
connections disconnect-all
remote, remote-simulator
profiledotnet tools
dotnet start <app-path> [options]
dotnet status <capture-id>
dotnet cancel <capture-id>
dotnet list
dotnet manifest <capture-id>
dotnet import <trace.nettrace>
dotnet speedscope <capture-id>
dotnet overview <capture-id>
dotnet startup <capture-id>
dotnet cpu <capture-id>
dotnet call-tree <capture-id>
dotnet threads <capture-id>
dotnet gc <capture-id>
dotnet jit <capture-id>
dotnet exceptions <capture-id>
profiling
tasklist --app-id <app-id> [options]
run <task-id> --app-id <app-id> [options]
extract <session-id> --start <value> --end <value> [options]
tasks
replayansight <session-id> [options]
sentry <export.json|replay-id> [options]
posthog <export.json|recording-id> [options]
repotasks <app-id> <repository-path>
task run <app-id> <repository-path> <task-id>
automation inspect <app-id> <repository-path>
automation connect <app-id> <repository-path>
automation disconnect <app-id>
automation list
automation runs <app-id>
repository
workspaceinit <path> [options]
add task <path> <id>
add test <path> <id> --app-id <id>
add trigger <path> <id>
add sanitizer <path> <id>
workspaces
authlogin [options]
refresh
status
logout [--local]
Authentication actions are also available below account
secretlist <app-id>
set <app-id> <alias> [input option]
remove <app-id> <alias>
openai status
openai set [input option]
openai remove
secrets
testlist <workspace-path>
validate <workspace-path>
run <workspace-path> <test-id> [options]
run-inline --session-id <id> --instruction <text> [options]
run-all <workspace-path> [options]
history [options]
inspect <run-id>
quality-history [options]
quality-history rebuild [options]
tests
sessionlist [options]
show <session-id>
logs <session-id> [options]
metrics <session-id> [options]
telemetry analyze <session-id> [options]
images <session-id>
touches <session-id>
trees <session-id>
artifacts <session-id>
annotations <session-id>
analyses <session-id>
extract <session-id> [options]
trim <session-id> [options]
annotation upsert <session-id> [options]
annotation delete <session-id> <annotation-id>
analysis delete <session-id> <analysis-id>
screenshot export <session-id> [options]
artifact export <session-id> [options]
metadata <session-id> [options]
cache status
cache plan
cache prune [--apply]
disconnect <session-id>
delete <session-id>
serve <session-id> [options]
serve stop <session-id>
share <session-id> [options]
url <session-id>
export <session-id> <output.zip>
sanitize <session-id> <output.zip>
import <archive.zip>
sessions
cloudteam list [options]
app list|register|remove
trend upload|sync <app-id>
test upload <run-id>
test sync <app-id>
session list [options]
session download <id> [options]
session archive|restore|delete <id>
attachment list <session-id>
attachment upload <session-id> <file> [options]
attachment download <session-id> <attachment-id> [options]
attachment delete <session-id> <attachment-id>
analysis list <session-id>
analysis run <session-id> [options]
analysis archive|restore <run-id>
plural resource aliases are accepted
licenseslist
export <output.md|output.json> [options]
license, licence, licences, notice, notices, attribution, attributions

Version and updates

ansight version [--json]
ansight update check [--channel public|preview] [--json]
ansight update [--channel public|preview] [--json]
ansight update --version <version> --build-number <YYYYMMDDNN>

The build identity combines the human version string with the monotonically increasing daily integer build number. The public or preview update channel is stored in the installation receipt, so promoting an identical preview archive does not alter its embedded build identity. update check is read-only; update downloads the platform installer and changes the active version only after its archive checksum and executable are validated.

OptionApplies toMeaning
--jsonversion, update check, updateEmit the complete versioned build or update result.
--channel <public|preview>update check, updateCheck or select a release channel. Without this flag, the installed channel is used.
--version <version>update check, updateSelect an exact human-readable release version. It must be supplied with --build-number.
--build-number <YYYYMMDDNN>update check, updateSelect the exact positive daily build number. It must be supplied with --version.

analytics

CommandPurpose
analytics statusShow the always-on daily-use setting, detailed-tracking setting, and local settings path.
analytics detailed enable|disableEnable detailed normalized command analytics, or disable it and remove unsent detailed events.

Daily active-use analytics records one pseudonymous event per installation and UTC date after a successful, meaningful product command outside CI. Help, version, update, authentication, diagnostics, analytics, and failed commands do not count as active use. The installer separately records successful installs and updates. Detailed analytics adds only normalized command, action, category, feature scope, outcome, duration bucket, and interactive-use fields; it does not include raw arguments, paths, identifiers, prompts, logs, or captured content.

OptionMeaning
--data-dir <path>Read or change analytics settings in a non-default Ansight data directory.
--jsonEmit the versioned analytics status result.

account

ansight account, ansight account open, and the portal alias open app.ansight.ai in the default browser. If the browser cannot be opened, the command prints the portal URL and the browser warning and returns exit code 1.

account login, refresh, status, and logout delegate to the corresponding auth commands, so scripts can manage authentication from either family.

OptionMeaning
--jsonFor account or account open, emit the portal URL, whether it opened, and any browser warning. Authentication actions use the authentication options.

serve

Starts a transient loopback web explorer and SDK host until interrupted.

ansight serve [--session <id>] [--port <port>] [--path <path>] [--open]
OptionMeaning
--session <id>Select the session shown when the explorer opens.
--port <port>Bind the explorer to this HTTP port. The default, 0, selects an available port.
--path <path>Use / or a fixed URL-safe segment instead of the default random capability path. Fixed paths are easier to discover.
--openOpen the explorer in the default browser after it starts.
--enable-repository-automationsPermit trusted repository trigger execution in this host.
--automation-repository <path>Load a trusted trigger repository at startup. Repeat the flag to load more than one repository.

host

CommandPurpose
ansight host runStart the resident SDK, explorer, and CLI control host.
ansight host statusReport host state, ports, data directory, and explorer link.
ansight host stopStop the resident host and release its ports and data lock.

host run options

OptionMeaning
--pair <app-id>Start the host and create a one-use phone enrollment code and terminal QR for the supplied app ID.
--name <name>Set a human-readable name on the invitation created by --pair.
--duration <duration>Set the pairing lifetime using mo, w, d, h, or m, such as 15m or 1h. The default is one month.
--host-address <LAN-IP>Put an address reachable by the phone into the pairing payload instead of relying on automatic host-address selection.
--serve-port <port>Bind the local explorer to this port. The default, 0, selects an available port.
--serve-path <path>Use / or a fixed URL-safe explorer path instead of the default random capability path.
--openOpen the local explorer in the default browser after the host starts.
--no-serveRun without the local explorer. It cannot be combined with --open, --serve-port, or --serve-path.
--companion-access [session|always]Publish simulators to the signed-in macOS companion app. Omitting the value selects session; always keeps access enabled for CLI management.
--enable-repository-automationsPermit trusted repository trigger execution in this host.
--automation-repository <path>Connect a trusted trigger repository when the host starts. Repeat the flag to connect more than one.

The global options select the data directory, SDK ports, platform tool locations, Node.js runtime, output format, and diagnostic verbosity for run, status, and stop.

doctor

ansight doctor [options]

Checks the data directory, credential vault, encrypted secret store, .NET profiling tools, Node.js, image/OCR runtimes, Android and Apple device backends, Android video, and physical-iOS input.

OptionMeaning
--data-dir <path>Inspect a non-default host state directory.
--secret-store-file <path>Inspect an encrypted file store instead of the operating-system credential vault.
--secret-key-file <path>Validate the externally protected AES key used by the encrypted file store.
--adb-path <path>Check an explicit ADB executable or Android SDK directory.
--xcode-path <path>Check an explicit Xcode app or Developer directory.
--jsonReturn every check, whether it is required, and its status as versioned structured output.

See System Requirements and Dependencies for what each check enables and how green, amber, and red results behave.

device

CommandPurpose
device listList virtual and physical devices, state, kind, and capability warnings.
device start <ios|android> <device-id>Boot a virtual target or verify a physical iOS target; alias boot.
device shutdown <ios|android> <device-id>Shut down a virtual target; alias stop.
device apps <ios|android> <device-id>List user-installed apps.
device install <ios|android> <device-id> <app-path>Install a supported .app or .apk.
device launch <ios|android> <device-id> <app-id>Launch an installed app.
device terminate <ios|android> <device-id> <app-id>Stop an app.
device location set <platform> <device-id>Set a simulated GPS coordinate.
device location clear <platform> <device-id>Clear simulated GPS.
device location play <platform> <device-id> <route.gpx|route.kml>Replay a GPX or KML route; alias replay.
device location statusShow the active resident-host route playback.
device location stopStop the active resident-host route playback.
device screenshot <platform> <device-id>Capture the target display.

Device options

OptionApplies toMeaning
--iosdevice listReturn only iOS targets.
--androiddevice listReturn only Android targets.
--simulatordevice listReturn only iOS simulators. --simulators is an alias.
--emulatordevice listReturn only Android emulators. --emulators is an alias.
--physicaldevice listReturn only physical devices. --physical-devices is an alias.
--offlinedevice listInclude offline, shut-down, unauthorized, and unavailable targets.
--latitude <number>device location setSet the latitude. This flag and --longitude are both required.
--longitude <number>device location setSet the longitude. This flag and --latitude are both required.
--mode <recorded|fixed-speed>device location playUse the route timestamps, or replay at a fixed speed. The default is recorded; recorded-timing and fixed are accepted aliases.
--speed <number>device location playSet a positive recorded-timing multiplier. The default is 1.
--fixed-speed-kph <number>device location playSet a positive fixed replay speed in kilometres per hour. The default is 30; --speed-kph is an alias.
--loopdevice location playRepeat the route until it is stopped.
--waitdevice location playKeep the command attached until resident-host playback finishes. Transient playback waits automatically.
--output <path>device screenshotWrite the screenshot to this path instead of a timestamped default path.

Use the global --adb-path and --xcode-path options to override platform-tool discovery.

input

CommandPurpose
input tap <platform> <device-id> --x <px> --y <px>Tap an absolute coordinate.
input swipe <platform> <device-id> ...Swipe between two absolute coordinates.
input text <platform> <device-id> --value <text>Type through the device bridge; alias type.
input button <platform> <device-id> <button>Send a platform button such as back, home, enter, or menu.

Android uses ADB. iOS support depends on the packaged macOS simulator input bridge; check it with ansight doctor.

Input options

OptionApplies toMeaning
--x <px>input tapRequired horizontal screen coordinate from 0 to 100000.
--y <px>input tapRequired vertical screen coordinate from 0 to 100000.
--start-x <px>input swipeRequired horizontal coordinate where the swipe begins.
--start-y <px>input swipeRequired vertical coordinate where the swipe begins.
--end-x <px>input swipeRequired horizontal coordinate where the swipe ends.
--end-y <px>input swipeRequired vertical coordinate where the swipe ends.
--duration-ms <ms>input swipeSet the swipe duration from 1 to 60000 milliseconds. The default is 300.
--value <text>input textRequired text to send through the platform input bridge.

app

CommandPurpose
app listList registered apps and apps discovered from sessions.
app get <app-id>Show app metadata and session counts.
app register <app-id>Add or update app metadata and its trusted codebase; alias add.
app remove <app-id>Remove linked app metadata; alias delete.
app tools <session-id>Read the authenticated live app-tool catalog.
app call <session-id> <tool-id>Invoke one tool using its published JSON argument schema.
app push-file <session-id> <local-path> <remote-directory>Upload through app file tools.
app auditShow recent app-tool outcomes and durations.

App options

OptionApplies toMeaning
--name <name>app registerSet the app’s human-readable name.
--codebase <path>app registerLink a trusted repository root for automatic monitoring and repository definitions.
--arguments <JSON>app callPass an inline JSON object to the tool. It cannot be combined with --arguments-file.
--arguments-file <path>app callRead the tool’s JSON object from a file. Comments and trailing commas are accepted. It cannot be combined with --arguments.
--sandbox-root <root>app push-fileSelect one of the sandbox roots published by the connected app.
--file-name <name>app push-fileOverride the destination filename; otherwise the local filename is used.
--overwriteapp push-fileReplace an existing destination file.
--no-create-directoryapp push-fileFail unless the remote directory already exists.
--limit <count>app auditReturn at most this many recent app-tool outcomes, from 1 to 1000. The default is 100.

pairing

CommandPurpose
pairing issue [app-id]Create an invitation; alias create.
pairing listList enrollment invitations.
pairing get <invite-id>Inspect one invitation without exposing its secret.
pairing revoke <invite-id>Revoke an invitation; aliases remove, delete.

Pairing options

OptionApplies toMeaning
--codepairing issuePrint the one-use pairing code for manual entry.
--qrpairing issueRender a scannable QR in the terminal. A resident host must be running.
--qr-output <path>pairing issueWrite the QR as a PNG at this path. A resident host must be running.
--host-address <LAN-IP>pairing issuePut an address reachable by the phone into the pairing payload instead of relying on automatic selection.
--overwritepairing issueReplace an existing file selected by --qr-output.
--name <name>pairing issueSet a human-readable invitation name.
--duration <duration>pairing issueSet the invitation lifetime using mo, w, d, h, or m. The default is one month.
--app-id <app-id>pairing listReturn invitations for one application ID.
--active-onlypairing listHide consumed, revoked, and expired invitations.

The pairing code is a one-use credential. Request it with --code, --qr, or --qr-output; when one of those flags is present, --json returns the credential in the structured issue result instead of rendering terminal QR artwork.

companion

CommandPurpose
companion access statusInspect companion access.
companion access enableEnable companion access.
companion access disableDisable access.
companion machines listList developer-machine registrations.
companion machines get <machine-id>Show one machine.
companion machines rename <machine-id> <name>Rename a machine.
companion machines revoke <machine-id>Revoke a machine.
companion machines restore <machine-id>Restore a machine.
companion machines delete <machine-id> --forcePermanently delete a machine.
companion connections listList live remote sessions.
companion connections disconnect <session-id>Disconnect one remote session.
companion connections disconnect-allDisconnect every remote session.

Companion options

OptionApplies toMeaning
--mode <session|always>companion access enableUse session to publish only for the current host lifetime, or always to keep access enabled for later CLI management. The default is session.
--include-revokedcompanion machines listInclude revoked developer-machine registrations.
--forcecompanion machines deleteConfirm permanent deletion. Without it, use revoke for the recoverable operation.

Start a CLI companion host with ansight host run --companion-access session. Use the same global --data-dir on management commands when the resident host uses a custom state directory.

profile

The first argument selects the profiler technology. The currently available technology is dotnet; additional profilers use the same profile <technology> ... hierarchy.

CommandPurpose
profile dotnet toolsReport profiling requirements; alias requirements.
profile dotnet start <app-path>Install and profile a supplied .app, .apk, or .ipa.
profile dotnet status <capture-id>Show capture state; alias get.
profile dotnet cancel <capture-id>Cancel an active capture.
profile dotnet listList captures.
profile dotnet manifest <capture-id>Show the immutable manifest and artifact inventory.
profile dotnet import <trace.nettrace>Import an existing trace.
profile dotnet speedscope <capture-id>Resolve the derived SpeedScope profile path; alias export-speedscope.
profile dotnet overview <capture-id>Summarize events, CPU, GC, JIT, exceptions, and symbolication.
profile dotnet startup <capture-id>Show startup milestones and application-ready evidence.
profile dotnet cpu <capture-id>Rank sampled CPU hotspots.
profile dotnet call-tree <capture-id>Show the bounded sampled call tree.
profile dotnet threads <capture-id>Rank process and thread activity.
profile dotnet gc <capture-id>Summarize garbage-collection intervals.
profile dotnet jit <capture-id>Summarize JIT work and largest methods.
profile dotnet exceptions <capture-id>Group thrown exceptions by type and message.

Profiling capture options

Ansight never restores, builds, publishes, or modifies an application. The supplied artifact must already have .NET diagnostics enabled and use the target-specific DiagnosticConfiguration. --app-id and --device-id are required for capture.

TargetDiagnosticConfiguration
Android emulator10.0.2.2:9000,suspend,connect
Android physical device127.0.0.1:9000,suspend,connect
iOS Simulator or physical device127.0.0.1:9000,suspend,listen

For an exact application-ready boundary, the app can emit a StartupComplete event from an EventSource named Ansight-DotNet-Startup. Without that event, startup analysis uses runtime and trace-boundary milestones.

The recommended way to prepare the app is the opt-in Ansight.Profiling.DotNet package. Reference it normally, then enable it only for a dedicated profiling configuration owned by the app:

<ItemGroup>
  <PackageReference Include="Ansight.Profiling.DotNet" Version="0.1.0-preview.1" />
</ItemGroup>

<PropertyGroup Condition="'$(Configuration)' == 'Profile'">
  <AnsightProfilingEnabled>true</AnsightProfilingEnabled>
  <AnsightProfilingTarget>android-emulator</AnsightProfilingTarget>
</PropertyGroup>

Supported values are android-emulator, android-device, ios-simulator, and ios-device. The package configures the diagnostic endpoint and embeds ansight/dotnet-profiling.json. Ansight validates that manifest against the selected device before installation. Artifacts configured manually remain supported when the manifest is absent.

Call the package API when the first usable screen is ready:

using Ansight.Profiling;

AnsightProfiler.ApplicationReady();

The call is idempotent and supplies the exact application-ready boundary. The app or its CI remains responsible for building the artifact; Ansight never invokes this build.

OptionApplies toMeaning
--waitprofile dotnet startKeep the command attached until capture completion. A detached capture requires a resident host.
--duration-seconds <n>profile dotnet startSet the capture duration from 1 to 300 seconds. The default is 30.
--app-id <id>profile dotnet start, profile dotnet importSupply the bundle/package ID to launch, or associate an imported trace.
--device-id <id>profile dotnet startTarget an exact simulator, emulator, or physical device.
--symbols <path>profile dotnet startCopy a portable PDB file or directory into capture storage.
--limit <count>profile dotnet listReturn between 1 and 1000 recent captures. The default is 100.
--application-path <path>profile dotnet importAssociate an imported .nettrace with an application artifact.

Profiling analysis options

OptionApplies toMeaning
--start-ms <n>All analysis commandsSet the inclusive start offset from the beginning of the trace. It cannot be negative.
--end-ms <n>All analysis commandsSet the inclusive end offset. It cannot be negative or earlier than --start-ms.
--process-id <id>All analysis commandsRestrict analysis to one non-negative process ID.
--thread-id <id>All analysis commandsRestrict analysis to one non-negative managed or operating-system thread ID.
--limit <count>profile dotnet cpuReturn between 1 and 500 hotspots. The default is 50.
--limit <count>profile dotnet gc, profile dotnet jit, profile dotnet exceptionsReturn between 1 and 1000 results. The default is 100.
--max-depth <count>profile dotnet call-treeLimit tree depth to 1128. The default is 32.
--max-children <count>profile dotnet call-treeLimit children per node to 1200. The default is 50.

Global --json output uses the ansight.dotnet-analysis/v1 schema and includes the source trace hash and analysis warnings.

task

CommandPurpose
task list --app-id <app-id>Discover repository tasks.
task run <task-id> --app-id <app-id>Run a task against a connected session.
task extract <session-id> --start <value> --end <value>Generate a TypeScript task from a recorded session interval.

Task options

OptionApplies toMeaning
--app-id <app-id>task list, task runRequired application bundle or package ID.
--repository <path>task list, task runUse this repository root instead of the current directory.
--device-id <id>task runSelect the connected session on this simulator or emulator. It cannot be combined with --session-id.
--session-id <id>task runSelect an exact connected Ansight session. It cannot be combined with --device-id.
--input <JSON>task runPass task input as an inline JSON object. It cannot be combined with --input-file.
--input-file <path>task runRead the task input object from a JSON file. Comments and trailing commas are accepted. It cannot be combined with --input.
--start <timestamp|offset>task extractRequired interval start as an ISO-8601 timestamp or seconds after session start.
--end <timestamp|offset>task extractRequired interval end as an ISO-8601 timestamp or seconds after session start; it must follow --start.
--workspace <path>task extractSelect the workspace root. The default is the current directory; --repository is also accepted.
--title <title>task extractSet the generated task title. The session name or app name is used by default.
--output <path>task extractWrite the generated TypeScript to an explicit destination instead of ansight/tasks/<suggested-name>.ts.
--forcetask extractReplace an existing output file. --overwrite is an alias.

A resident host and matching live app session are required. Global --json emits the complete versioned task result. See Task API Reference.

replay

replay converts recorded interaction evidence into at most 50 semantic steps and asks the same bounded UI-control agent used by test run-inline to reproduce them against a separate live app session. Replay is a beta feature: every plan and run carries a prominent beta notice, and live runs should be supervised.

CommandPurpose
replay ansight <session-id>Build a plan from recorded Ansight touches plus visual-tree target and input-value transitions, then run it against a connected session for the same app.
replay sentry <export.json|replay-id>Parse a local Sentry RRWeb export, or download recording segments through the Sentry replay API.
replay posthog <export.json|recording-id>Parse a PostHog recording JSON export, or request the recording snapshots endpoint.
# Inspect derived actions without controlling an app.
ansight replay ansight <recorded-session-id> --plan-only
ansight replay posthog recording.json --app-id com.example.app --plan-only

# Reproduce an Ansight capture. If necessary, Ansight starts a compatible local
# target, launches the installed app, and waits for its fresh SDK session.
ansight replay ansight <recorded-session-id>

# Select an exact target or install a build before launching it.
ansight replay ansight <recorded-session-id> \
  --device-id <simulator-or-emulator-id> \
  --app <path-to-app-or-apk> \
  --repository <app-repository>

# Download Sentry recording segments without putting the token on the command line.
export SENTRY_AUTH_TOKEN=sntrys_...
ansight replay sentry <replay-id> \
  --organization acme --project mobile \
  --app-id com.example.app \
  --target-session-id <live-session-id>

Replay options

OptionMeaning
--plan-onlyPrint the versioned ansight.replay-plan/v1 plan without requiring or controlling a live target.
--allow-sparse-framesExplicitly allow a supervised Ansight replay when screenshot support is rated degraded or unreliable. This does not improve the source evidence.
--app-id <id>Associate an external Sentry or PostHog recording with the target app. This is optional when --target-session-id supplies the app identity.
--target-session-id <id>Control this exact connected Ansight session. --session-id is an alias. The source and target Ansight sessions must be different.
--device-id <id>Start and select an exact simulator, emulator, or physical device. --device is an alias.
--platform <ios|android>Restrict automatic target selection to one platform. Ansight captures infer this from recorded device metadata when possible.
--device-kind <virtual|physical>Restrict automatic target selection by device kind.
--app <path>Install an .app or .apk before launch. --ipa <path> installs an .ipa.
--wait-seconds <count>Time to wait for the launched app to connect to Ansight. The default is 45 seconds.
--team-id <uuid>Select an organisation when more than one organisation permits the app.
--start <timestamp|offset>Start an Ansight source range at an ISO-8601 timestamp or a non-negative seconds offset.
--end <timestamp|offset>End an Ansight source range at an ISO-8601 timestamp or a non-negative seconds offset.
--repository <path>Link trusted repository tasks for the app so the replay agent can use an exact matching task.
--secret <alias>Expose a configured host-managed app secret to the run. Repeat for multiple aliases.
--model <id>Select the replay-agent model. The default is gpt-5.6-terra.
--max-turns <count>Limit turns per step to 1512. The default is 64.
--max-round-trips <count>Limit model round trips per step to 1500. The default is 64.
--max-tool-calls <count>Limit total tool calls to 14000. The default is 512.
--stop-on-failureStop after the first failed replay step.
--organization <slug>Select the Sentry organization for API download.
--project <id|slug>Select the Sentry project slug or PostHog project ID for API download.
--host <url>Override the provider host for a region or self-hosted deployment.
--token-env <name>Read the provider token from this environment variable. Defaults are SENTRY_AUTH_TOKEN and POSTHOG_PERSONAL_API_KEY.

Replay validates its complete option contract before contacting a resident host or performing target discovery. Unknown options, missing option values, and values attached to boolean flags return a usage error without starting a device, launching an app, or driving a session. Use --plan-only to inspect a replay; --plan is intentionally rejected with a suggestion.

Before target discovery or app launch, an Ansight replay measures screenshot support around the actions in the selected source range. The plan reports retained-change FPS, observed frame intervals, the percentage of timed replay steps with a screenshot within 1.5 seconds, and how many actions have distinct supporting change frames. Exact consecutive duplicate JPEGs are suppressed, so quiet frame gaps are reported but do not by themselves reduce the rating. Support is rated reliable, degraded, or unreliable; degraded and unreliable captures are blocked unless --allow-sparse-frames is explicit. Prefer making a new capture over using the override. Sentry and PostHog RRWeb exports use an event-driven DOM mutation stream rather than periodic Ansight screenshots, so this screenshot-cadence gate does not apply to those sources.

For Ansight captures, taps are correlated with nearby visual-tree nodes and screenshots. Ordinary text-entry actions are inferred by matching stable input nodes across consecutive visual trees and comparing their visual.value content. Intermediate values in one typing burst are compacted to the final replacement, while an empty final value becomes a clear-field action. Generated steps retain source visual-tree, screenshot, and normalized touch-coordinate references for review; live execution always resolves the current semantic target instead of reusing a capture-local node ID.

Text inference requires a capture mode that records visual trees. A touch-triggered tree can observe the final value at the next touch; a session that ends with the keyboard still open may need screenshot-aligned periodic trees or an explicit post-edit capture. Secure or provider-omitted values are never reconstructed. Use --secret <alias> or an explicit repository task input for those fields. Return/Done/Search keys, shortcuts, selection, cursor movement, and IME composition are not represented by a value transition. Because this is state diffing rather than key logging, paste, autofill, and programmatic value changes can look identical; uncorrelated changes are marked for review in plan diagnostics.

Sentry and PostHog replay data is also best-effort input: privacy masking can remove field values and labels, coordinates may not map to a different viewport, and unsupported gestures are skipped. These cases are returned as diagnostics in the plan and run output. Provider tokens are used only for the download request and are never included in command output.

Live execution first reuses a compatible connected app session. When none is available, it uses the same target launcher as workspace tests: it discovers a compatible local device, boots it when necessary, optionally installs the supplied app artifact, launches the app, and waits for a fresh Ansight SDK session. Native Ansight captures infer their platform and, when available, their native device identifier from the recorded device profile. Ambiguous target inventories require --device-id; missing installations require --app or --ipa.

Replay uses the same authenticated test-run preparation and metering path as workspace tests. A signed-in session with an expired access token is refreshed automatically when its refresh token is available, then the organisation AI proxy is supplied to the replay agent. Signed-out development can instead use a locally configured OpenAI API key.

Before live control begins, the target session is durably tagged with replay-driven, replay-beta, replay-source-<provider>, and replay-status-running. Completion replaces the running tag with the latest replay-status-succeeded, replay-status-failed, or replay-status-cancelled value while preserving unrelated user tags.

repo

CommandPurpose
repo tasks <app-id> <repository-path>Inspect task definitions.
repo task run <app-id> <repository-path> <task-id>Run one repository task.
repo automation inspect <app-id> <repository-path>Validate triggers without connecting them.
repo automation connect <app-id> <repository-path>Connect trusted triggers to the resident host.
repo automation disconnect <app-id>Disconnect triggers for an app.
repo automation listList connected trigger catalogs.
repo automation runs <app-id>Show recent trigger attempts; alias history.

Repository options

OptionApplies toMeaning
--session-id <id>repo task runSelect an exact connected session. It cannot be combined with --device-id; without either flag, the newest connected session for the app is used.
--device-id <id>repo task runSelect the connected session on this simulator or emulator. It cannot be combined with --session-id.
--input <JSON>repo task runPass task input as an inline JSON object. It cannot be combined with --input-file.
--input-file <path>repo task runRead the task input object from a JSON file. Comments and trailing commas are accepted. It cannot be combined with --input.
--limit <count>repo automation runsReturn between 1 and 500 recent runs. The default is 100.

automations, trigger, and triggers alias automation. Connections require a resident host started with --enable-repository-automations.

workspace

CommandPurpose
workspace init <path>Create the ansight/ tree, README templates, schemas, and TypeScript support.
workspace add task <path> <id>Add a typed task module.
workspace add test <path> <id> --app-id <id>Add an end-to-end test.
workspace add trigger <path> <id>Add an event trigger.
workspace add sanitizer <path> <id>Add a typed sanitizer.

Workspace options

OptionApplies toMeaning
--app-id <id>workspace initRegister this application ID and link it to the new workspace without prompting. It cannot be combined with --no-register.
--name <name>workspace initSet the human-readable name used when --app-id registers the app.
--no-registerworkspace initSkip app registration without prompting. It cannot be combined with --app-id.
--title <text>workspace add taskSet the task’s human-readable title.
--description <text>workspace add taskSet the task’s purpose and expected result.
--app-id <id>workspace add taskRestrict the task to one application ID.
--app-id <id>workspace add testSet the required application bundle or package ID.
--name <text>workspace add testSet the test’s human-readable name.
--prompt <text>workspace add testSet the scenario instructions for the test runner.
--validation <text>workspace add testSet the final-state validation instructions.
--assertion <text>workspace add testAdd an observable assertion. Repeat the flag to add more than one.
--required-secret <name>workspace add testDeclare a required secret alias. Repeat the flag for multiple secrets.
--quality-check <id>workspace add testAdd a post-run quality definition. Repeat the flag for multiple checks.
--event-kind <kind>workspace add triggerSelect the event handled by the trigger. The default is app.event.
--app-id <id>workspace add triggerRestrict the trigger to one application ID.
--forceAll workspace authoring commandsReplace existing definitions or generated support files. --overwrite is an alias.

See Workspace for the generated files and authoring APIs.

auth

CommandPurpose
auth loginSign in using provider PKCE, email/password, email OTP, access token, or device flow.
auth refreshRefresh the saved account session.
auth statusShow identity, authentication method, and expiry without token values.
auth logoutRevoke remotely when possible and clear credentials; --local skips revocation.

Authentication options

Choose exactly one login mode:

OptionMeaning
--provider <name>Start browser authorization-code login with PKCE for this provider.
--email <address>Sign in with email and a password read through secret input.
--otpWith --email, request an email one-time code and read that code through secret input instead of reading a password.
--access-tokenValidate and save a Supabase access token read through secret input.
--deviceUse OAuth RFC 8628 device flow. Provider endpoint and client settings must also be supplied by flags or environment variables.

Additional authentication flags are:

OptionApplies toMeaning
--no-browserProvider loginPrint the PKCE authorization URL instead of opening the browser.
--callback-port <port>Provider loginBind the local callback to a fixed port from 1024 to 65535; otherwise an available port is selected. ANSIGHT_AUTH_CALLBACK_PORT is the environment alternative.
--timeout <seconds>Provider loginSet the browser-login timeout from 0 to 1800 seconds. The default is 300.
--device-authorization-endpoint <url>Device loginSet the absolute HTTPS authorization endpoint. ANSIGHT_OAUTH_DEVICE_AUTHORIZATION_ENDPOINT is the environment alternative.
--device-token-endpoint <url>Device loginSet the absolute HTTPS token endpoint. ANSIGHT_OAUTH_DEVICE_TOKEN_ENDPOINT is the environment alternative.
--device-client-id <id>Device loginSet the required OAuth client ID. ANSIGHT_OAUTH_DEVICE_CLIENT_ID is the environment alternative.
--device-scope <scope>Device loginSet the requested OAuth scopes. The default is openid email offline_access; ANSIGHT_OAUTH_DEVICE_SCOPE is the environment alternative.
--supabase-url <url>auth login, auth refresh, auth logoutOverride the configured Supabase project URL.
--supabase-publishable-key <key>auth login, auth refresh, auth logoutOverride the public Supabase client key.
--stdinEmail or access-token loginRead the password, OTP, or access token from standard input.
--from-env <NAME>Email or access-token loginRead the password, OTP, or access token from the named environment variable.
--localauth logoutClear local credentials without attempting remote session revocation.

Without --stdin or --from-env, an interactive terminal uses a hidden prompt. Secret values are never accepted as ordinary command-line arguments or printed.

secret

CommandPurpose
secret list <app-id>List test-secret aliases without values.
secret set <app-id> <alias>Create or replace a secret.
secret remove <app-id> <alias>Delete a secret; alias delete.
secret openai statusReport whether a local runner key exists.
secret openai setSave the local runner key.
secret openai removeDelete the local runner key.

Secret options

OptionApplies toMeaning
--stdinsecret set, secret openai setRead the secret value from standard input.
--from-env <NAME>secret set, secret openai setRead the secret value from the named environment variable.
--secret-store-file <path>All secret commandsUse an encrypted file instead of the operating-system credential vault.
--secret-key-file <path>All secret commandsRead the encrypted file store’s AES key from an owner-only file.

Without an input flag, an interactive terminal uses a hidden prompt. Secret values are never accepted as ordinary command-line arguments and are never returned by list or status.

--from-env copies a value into the configured secret store. Workspace and inline test runs can instead resolve a requested secret directly from an environment variable whose name exactly matches the alias. An app-scoped stored value takes precedence when both sources contain that alias.

test

CommandPurpose
test list <workspace-path>List test definitions and warnings.
test validate <workspace-path>Validate all workspace definitions.
test run <workspace-path> <test-id>Run one end-to-end test.
test run-inline --session-id <id> --instruction <text>Run ordered ad-hoc instructions against one connected app session.
test run-all <workspace-path>Run all tests or repeated --test <id> selections.
test historyList persisted Run All batches and model/tool execution audits.
test inspect <run-id>Inspect one batch or execution audit, including child tests and tool-call summaries.
test quality-historyList local quality measurements and trend decisions.
test quality-history rebuildRebuild historical trend decisions from the current workspace rules.

Test target options

OptionApplies toMeaning
--session-id <id>test run, test run-inlineReuse an exact connected app session. It is required for run-inline.
--device-id <id>test run, test run-inline, test run-allSelect an exact simulator, emulator, or physical device. --device is an alias. For run-inline, this narrows the live app target associated with the selected session.
--device-kind <physical|virtual>test run, test run-allRestrict automatic discovery to physical or virtual targets.
--platform <ios|android>test run, test run-allRestrict automatic target discovery by platform.
--app <path>test run, test run-allInstall an .app or .apk before launch. It cannot be combined with --ipa or --application-path.
--ipa <path>test run, test run-allInstall a signed physical-device IPA. The path must end in .ipa; the flag cannot be combined with --app or --application-path.
--application-path <path>test run, test run-allGeneric application-artifact option. It cannot be combined with --app or --ipa.
--team-id <uuid>test run, test run-allSelect the organisation used by hosted execution. The value must be a non-empty UUID.

Test runner and output options

OptionApplies toMeaning
--instruction <text>test run-inlineAdd an instruction to the ordered run. Repeat the flag for multiple instructions; at least one instruction or instruction file is required.
--instructions-file <path>test run-inlineRead additional instructions from a text file, one non-empty instruction per line.
--secret <alias>test run-inlineGrant an existing app-scoped test secret to the inline run. Repeat the flag for multiple aliases.
--model <id>test run, test run-inline, test run-allSelect the model. The default is gpt-5.6-terra.
--wait-seconds <seconds>test run, test run-allSet the app-session connection timeout. The default is 45; the accepted range is 086400.
--max-turns <count>test run, test run-inline, test run-allLimit agent turns to 1512. The default is 64.
--max-round-trips <count>test run, test run-inline, test run-allLimit model round trips to 14096. The default is 64.
--max-tool-calls <count>test run, test run-inline, test run-allLimit tool calls to 116384. The default is 512.
--test <id>test run-allSelect one test instead of the full catalog. Repeat the flag to select multiple tests.
--stop-on-failuretest run, test run-inline, test run-allStop continued execution after the first failed instruction, test step, or batch item.
--no-workspace-toolstest run, test run-allDo not expose trusted repository tasks to the test agent.
--result-file <path>test run, test run-allWrite the versioned JSON result to this path instead of the generated result path.
--audittest run, test run-allAdd token, tool-call, timing, and cost attribution to human-readable output.
--jsontest run, test run-inline, test run-allEmit the complete versioned result on standard output.
--silenttest run, test run-inline, test run-allSuppress standard output and standard error, overriding --json.
--verbosetest run, test run-inline, test run-allInclude model progress, telemetry, and app events.

Test history options

OptionApplies toMeaning
--app-id <id>test history, test quality-historyReturn history for one application ID.
--workspace <path>test historyRestrict batches and executions to one workspace.
--measurement <key>test quality-historyRestrict measurements to a quality-id.measurement-id key.
--trend <id>test quality-historyRestrict results to one trend definition.
--group <name>test quality-historyRestrict measurements and trends to one flow group.
--limit <count>test history, test quality-historyReturn from 1 to 10000 entries of each kind. The default is 100.

Trend history rebuild options

test quality-history rebuild replays stored measurements in chronological order. It recomputes baselines, pinned release comparisons, and consecutive-run hysteresis from the current registered workspace rules, then replaces the selected decisions atomically. It does not re-extract measurement values from session captures.

OptionMeaning
--app-id <id>Rebuild one app. Omit it to rebuild every app that has stored measurements and a registered codebase.
--app-version <version>Rebuild only this version of the selected app. Requires --app-id; earlier measurements remain available as baselines.
--trend <id>Rebuild only one current trend rule.
--workspace <path>Override the selected app’s registered codebase. Requires --app-id.
--dry-runCalculate and report the rows that would be replaced without changing the history database.

session

Inspection

CommandPurpose
session listList recorded and live sessions.
session show <session-id>Show identity, connection state, and evidence totals.
session logs <session-id>Read recorded logs.
session network <session-id>Query captured HTTP requests; alias requests.
session metrics <session-id>Read telemetry channels and samples; alias telemetry.
session telemetry analyze <session-id>Detect FPS drops and memory spikes.
session images <session-id>Read screenshot frames; alias screenshots.
session touches <session-id>Read touch events.
session trees <session-id>Read persisted visual trees; alias visual-trees.
session artifacts <session-id>Read artifact snapshots.
session annotations <session-id>Read user and agent annotations.
session analyses <session-id>Read saved analyses.

Inspection options

OptionApplies toMeaning
--app-id <id>session listReturn sessions for one application ID.
--connectedsession listReturn only currently connected sessions.
--platform <key>session listRequire ios, android, macos, windows, or other. Repeat the flag to accept multiple platforms.
--device-form-factor <value>session listRequire an exact device form factor. Repeat the flag for multiple values; --form-factor is an alias.
--os-name <value>session listRequire an exact operating-system name. Repeat the flag for multiple values.
--os-version <value>session listRequire an exact operating-system version. Repeat the flag for multiple values.
--device-type <value>session listRequire an exact device type. Repeat the flag for multiple values.
--physicalsession listRequire a physical device.
--virtualsession listRequire a virtual target.
--emulatorsession listRequire an emulator. --simulator is accepted as an equivalent filter.
--tag <tag>session listRequire a session tag. Repeat the flag to require multiple tags.
--from <utc>session listKeep sessions updated at or after this ISO-8601 timestamp.
--to <utc>session listKeep sessions created at or before this ISO-8601 timestamp.
--has-logssession listRequire retained log evidence.
--has-telemetrysession listRequire retained telemetry evidence.
--search <text>session listSearch session identity, app, device, OS, and tags. --contains is an alias.
--limit <count>session listReturn at most 110000 sessions. The default is 200.
--limit <count>session logsReturn the newest 110000 matching logs. The default is 200.
--contains <text>session logsKeep logs whose message contains this text, ignoring case. --query is an alias.
--stream <id>session logsKeep logs from this exact stream. Repeat the flag for multiple streams.
--tag <tag>session logsKeep logs with this exact tag. Repeat the flag for multiple tags.
--source <source>session logsKeep logs from this exact source. Repeat the flag for multiple sources.
--start <utc>session logsSet the inclusive beginning of the ISO-8601 timestamp range.
--end <utc>session logsSet the inclusive end of the ISO-8601 timestamp range.
--priority <level>session logsKeep an exact log priority.
--minimum-priority <level>session logsKeep this priority and higher, using verbose, debug, information, warning, error, or fatal. --minimum-severity and --severity are aliases.
--id <request-id>session networkKeep one exact request identifier.
--method <method>session networkKeep an exact HTTP method. Repeat the flag for multiple methods.
--status <code|class>session networkKeep an exact status, a 2xx5xx class, or failed/error requests. Repeatable.
--host <host>session networkKeep requests whose hostname contains this value.
--start <utc>session networkSet the inclusive beginning of the request start-time range.
--end <utc>session networkSet the inclusive end of the request start-time range.
--contains <text>session networkSearch URL, method, and error message. --query is an alias.
--failedsession networkKeep transport errors and HTTP 4xx/5xx responses.
--limit <count>session networkReturn the newest 110000 matching requests. The default is 200.
--limit <count>session metricsReturn the newest 150000 samples. The default is 500.
--channel <id>session metricsKeep samples and channel metadata for numeric channel ID 0255.
--limit <count>session images, touches, trees, artifacts, annotations, analysesReturn the newest 110000 collection items. The default is 200.

Telemetry analysis options

OptionMeaning
--kind <all|fps-drop|memory-spike>Select the detectors to run. The default is all; fps and memory are accepted aliases for the two individual detectors.
--memory-min-percent <percent>Require a relative memory increase from 1 to 100 percent. The default is 15.
--memory-min-mb <megabytes>Require an absolute memory increase from 1 to 4096 MB. The default is 128.
--max-events <count>Return at most 110000 findings per detector. The default is 12.
--fail-on-detectionReturn exit code 11 when the selected detectors find any event.

Editing and evidence export

CommandPurpose
session extract <session-id>Create a separate session from an annotation interval or explicit timestamp range.
session trim <session-id>Remove a selected interval or keep only that interval in the existing session.
session annotation upsert <session-id>Add or update an annotation from JSON or individual fields. Aliases include add, create, and update.
session annotation delete <session-id> <annotation-id>Delete an annotation; alias remove.
session analysis delete <session-id> <analysis-id>Delete a saved analysis; alias remove.
session screenshot export <session-id>Export the selected or latest screenshot to a local file. Aliases include get, read, and download.
session artifact export <session-id>Export one artifact file from a selected or latest snapshot. Aliases include get, read, and download.

Editing and export options

OptionApplies toMeaning
--annotation <id>session extractUse the bounds of this annotation. It cannot be combined with --start or --end.
--start <utc>session extract, session trim, session annotation upsertSet the required inclusive start as an ISO-8601 timestamp when explicit bounds are used.
--end <utc>session extract, session trim, session annotation upsertSet the end timestamp. It is required for extraction and trimming and optional for annotations.
--name <name>session extractSet the extracted session name.
--mode <cut|keep>session trimRemove the selected interval or retain only that interval. remove/cut-selection and keep-only/keep-selection are accepted aliases.
--file <annotation.json>session annotation upsertRead the complete annotation from JSON instead of individual annotation flags.
--annotation-id <id>session annotation upsertSet the annotation ID. A new compact GUID is generated by default.
--label <label>session annotation upsertSet the required annotation label when --file is not used.
--notes <text>session annotation upsertSet optional annotation notes.
--source <source>session annotation upsertSet the annotation source. The default is cli.
--frame-id <id>session screenshot exportExport a specific frame. Without a frame or timestamp, the newest screenshot is exported.
--timestamp <utc>session screenshot exportExport the screenshot nearest this ISO-8601 timestamp.
--snapshot-id <id>session artifact exportSelect an artifact snapshot. Without it, the newest matching snapshot is used.
--path <artifact-path>session artifact exportSelect the required artifact path within the snapshot.
--output <path>session screenshot export, session artifact exportWrite the exported evidence to this required local path.
--forcesession screenshot export, session artifact exportReplace an existing output file. --overwrite is an alias.

Management and cache

CommandPurpose
session metadata <session-id>Set name, notes, tags, or pinned state.
session cache statusShow cache size, protected sessions, and candidates.
session cache planPreview retention and size-limit cleanup.
session cache prunePreview or perform cleanup.
session cache compactZIP inactive session folders that have reached the compaction threshold.
session disconnect <session-id>Disconnect a live SDK session.
session delete <session-id>Permanently remove local session data; alias remove.

Metadata options

OptionMeaning
--name <name>Set the session’s display name.
--notes <text>Set notes, replacing the current value.
--clear-notesRemove all notes.
--tag <tag>Replace the current tags with the supplied values. Repeat the flag for multiple tags.
--clear-tagsRemove every tag.
--pinProtect the session from cache cleanup. It cannot be combined with --unpin.
--unpinRemove cache-cleanup protection. It cannot be combined with --pin.

Cache options

OptionApplies toMeaning
--compaction-age-days <days>session cache compactCompact inactive sessions at least 1365 days old. The default is 30.
--retention-days <days>session cache status, plan, pruneSelect sessions older than 1365 days. The default is 90.
--max-cache <size>session cache status, plan, pruneSet the target cache limit from 256MiB to 1TiB, using a value such as 5GB or 5GiB. The default is 5GiB.
--max-cache-size <size>session cache status, plan, pruneAlias for --max-cache.
--applysession cache pruneDelete the sessions in the plan. Without this flag, prune is a dry run.

Automatic cache maintenance defaults to compacting inactive captures after 30 days and deleting eligible unpinned captures after 90 days. Run compaction on demand with:

ansight session cache compact
ansight session cache compact --compaction-age-days 14
ansight session cache compact --json

Compaction is non-lossy: the expanded session folder becomes a ZIP archive on disk. Opening the session expands it automatically and resets its compaction age, so it must remain unopened for another threshold period before it is compacted again. Live sessions are skipped. Pinned historical sessions may be compacted because their data remains preserved; pinning continues to protect them from deletion.

Replay, sharing, and archives

CommandPurpose
session serve <session-id>Start a capability-protected loopback replay.
session serve stop <session-id>Stop a resident-host replay.
session share <session-id>Export and upload a team, authenticated, or public replay.
session url <session-id>Resolve the newest existing cloud replay URL.
session export <session-id> <output.zip>Write a portable archive.
session sanitize <session-id> <output.zip>Write a sanitized archive without changing the local capture.
session import <archive.zip>Import a portable archive.

Replay options

OptionApplies toMeaning
--port <port>session serveBind the replay server to this port. The default, 0, selects an available port.
--opensession serveOpen the replay in the default browser after the server starts.

Cloud sharing options

OptionApplies toMeaning
--team-id <uuid>session share, session urlSelect an organisation by non-empty UUID.
--team-name <name>session shareSelect an organisation by name when an ID is not supplied.
--publicsession shareShorthand for public replay access. It cannot be combined with a non-public --access value.
--access <team|authenticated|public>session shareSet the replay access level. The default is team.
--include-native-logssession shareInclude native device logs in the upload. They are excluded by default.
--sanitizer <module.ts>session shareRun named sanitization functions from this local TypeScript module in addition to the built-in policy.
--policy <module.ts>session shareAlias for --sanitizer.
--no-sanitizesession shareUpload raw capture data instead of applying the default sanitization policy.
--include-archivedsession urlAllow an archived share when resolving the newest replay URL.

Archive options

OptionApplies toMeaning
--exclude-native-logssession export, session sanitizeOmit native device logs from the archive.
--sanitizesession exportApply the built-in PII policy while exporting.
--sanitizer <module.ts>session export, session sanitizeRun named sanitization functions from this local TypeScript module. The file must end in .ts.
--policy <module.ts>session export, session sanitizeAlias for --sanitizer.
--password-env <NAME>session importRead an archive password from the named environment variable.

Cloud sharing and session sanitize apply the built-in policy by default. It redacts structured PII, masks screenshots whose raster content cannot be proven safe, excludes artifacts, and records its work in sanitization/report.json.

cloud

Registers cloud App IDs and administers uploaded trends, test-run summaries, sessions, attachments, and hosted analysis. Administration uses the current auth session. Headless uploads can instead use an app-scoped runner credential through ANSIGHT_RUNNER_API_KEY, ANSIGHT_TEAM_ID, and ANSIGHT_APP_ID. Registering an App ID expresses cloud intent but does not start billing. Uploads and other cloud writes require the organisation’s corresponding trial, paid entitlement, or explicit grant.

CommandPurpose
cloud team listList organisations available to the signed-in account. The action defaults to list; teams is a resource alias.
cloud app list [--team-id <uuid>]List registered App IDs available to the account.
cloud app register <app-id> --team-id <uuid>Register the exact App ID required by cloud session, trend, and test uploads. Organisation owner or admin permission is required.
cloud app remove <app-id> --team-id <uuid>Remove a registered App ID so new uploads for it are rejected.
cloud trend upload|sync <app-id> --team-id <uuid>Upload idempotent local quality measurements and trend decisions for portal history.
cloud test upload <run-id> --team-id <uuid> [--app-id <id>]Upload one local run or all child runs in a saved batch.
cloud test sync <app-id> --team-id <uuid>Upload recent local test-run summaries for one registered App ID.
cloud test import <results.xml> --format junit|appium-junitImport each JUnit test case as an idempotent cloud test result. Team and App ID can come from the runner environment.
cloud key list --team-id <uuid>List app-scoped runner keys without revealing their secret values.
cloud key issue --team-id <uuid> --app-id <id> [--scope <scope>]Issue an an_run_... key. The plaintext value is displayed once; owner or admin permission is required.
cloud key revoke <key-id>Revoke a runner key immediately.
cloud session listList shared cloud sessions; sessions is a resource alias.
cloud session download <cloud-session-id>Download the session archive.
cloud session archive|restore|delete <cloud-session-id>Change archival state or permanently delete the shared session. remove aliases delete.
cloud attachment list <cloud-session-id>List the session’s attachments; attachments is a resource alias.
cloud attachment upload <cloud-session-id> <file>Upload a local file as an attachment.
cloud attachment download <cloud-session-id> <attachment-id>Download an attachment to a required local destination.
cloud attachment delete <cloud-session-id> <attachment-id>Permanently delete an attachment; alias remove.
cloud analysis list <cloud-session-id>List hosted analysis runs; analyses is a resource alias.
cloud analysis run <cloud-session-id>Start a hosted analysis over selected session evidence.
cloud analysis archive|restore <run-id>Change the archival state of an analysis run.

Cloud query and transfer options

OptionApplies toMeaning
--search <text>cloud team list, cloud session listSearch organisation or session results.
--team-id <uuid>Cloud app, trend, test, key, and session commandsSelect or restrict the organisation. ANSIGHT_TEAM_ID supplies the headless default.
--include-archivedcloud session listInclude archived sessions.
--limit <count>cloud session listReturn from 1 to 1000 sessions. The default is 200.
--limit <count>cloud trend upload|sync, cloud test syncLimit the local history records considered for upload.
--name <name>cloud app registerSet the portal display name; the App ID is used by default.
--platform <name>cloud app registerAdd optional platform context.
--app-id <id>Cloud test imports/uploads and runner-key issueSupply the registered App ID. ANSIGHT_APP_ID supplies the headless default.
--app-version <value>Cloud test uploadsAdd the tested app version.
--branch <name>, --commit <sha>Cloud test uploadsAdd source-control context without uploading source or prompts.
--run-id <id>cloud test importSet a stable CI execution prefix. Otherwise the JUnit file digest is used.
--session-id <id>cloud test importLink imported results to the newest uploaded Ansight session with this source ID.
--scope <scope>cloud key issueGrant sessions:write, trends:write, or tests:write; repeat as needed. All three are granted when omitted.
--expires-at <timestamp>cloud key issueSet an optional future ISO-8601 expiry.
--output <path>cloud session downloadSet the archive destination. The default is ansight-cloud-<session-id>.zip in the current directory.
--output <path>cloud attachment downloadSet the required local attachment destination.
--name <name>cloud attachment uploadSet the attachment name. The local filename is used by default.
--notes <text>cloud attachment uploadAdd attachment notes.
--forceCloud downloadsReplace an existing destination file. --overwrite is an alias.

Hosted analysis options

OptionMeaning
--kind <analysis|mermaid|performance>Select the analysis result kind. The default is analysis.
--mode <fast|thorough>Select the analysis depth. The default is fast.
--provider <openai|anthropic|gemini>Select the hosted provider. The default is openai.
--model <id>Override the provider’s default model.
--source-part <part>Include logs, screenshots, visual_tree, metrics, annotations, or artifacts. Repeat the flag for multiple parts. With no source flags, all six are included.
--slice-start-ms <value>Set a non-negative inclusive start offset in milliseconds.
--slice-end-ms <value>Set a non-negative inclusive end offset in milliseconds.
--instructions <text>Add instructions for the hosted analysis.

licenses

CommandPurpose
licenses listShow bundled and optional external software attribution.
licenses export <output.md|output.json>Export Markdown or versioned JSON.
OptionApplies toMeaning
--format <markdown|json>licenses exportOverride the format inferred from the .md, .markdown, or .json output extension.
--forcelicenses exportReplace an existing output file.

Exit codes

CodeMeaning
0Success.
1General failure.
2Invalid command usage.
3Configuration is invalid or incomplete.
4Required Ansight host or app session is unavailable.
5Target capability is unavailable.
10A test or required assertion failed.
11Telemetry findings were detected with --fail-on-detection.
130Operation cancelled.