CLI

Run the Ansight host, device control, session analysis, tests, tasks, repository automation, and workspace authoring from a terminal.

CLI v0.23.1

The Ansight CLI is the headless host and automation client. It exposes the same local app sessions, captures, device targets, workspace definitions, and repository modules used by Studio in a terminal-friendly form.

Beta. The CLI is under active development. Commands and machine-readable contracts are versioned, but workflows may still change before general availability.

All local CLI and agent tools are free and do not require sign-in. Sign in only when a command reads from or writes to Ansight Cloud. Cloud persistence, sharing, test tracking, and hosted computation require a current trial, paid plan, or explicit organisation grant.

Canonical interface. Use the CLI for agent setup, app and session discovery, structured evidence, live app tools, and automation. Ansight Studio remains an optional visual companion for human review.

Start with the built-in help

The executable owns the authoritative help for the version you installed:

ansight help
ansight <command> help
ansight <command> --help
ansight version
ansight update check

Open the CLI Command Reference for every current command, subcommand, alias, global option, and exit code on one page.

Run ansight doctor after installation, then use System Requirements and Dependencies to interpret the required and feature-specific checks.

Manage the installed release with Update the CLI, or remove the installer-managed CLI safely with Uninstall the CLI.

Run a resident host

Most workflows work best with one long-lived host in the first terminal:

ansight host run --open

The resident host owns SDK discovery, session capture, the loopback explorer, connected app tools, repository triggers, and the data-directory lock. Commands issued from another terminal reuse it through a current-user-only control pipe.

ansight host status --json
ansight session list --connected --json
ansight host stop

Use ansight serve --open when you want a transient host and browser explorer for one terminal session.

Machine-readable output

Add --json to commands used by scripts. Successful output uses versioned JSON contracts; failures use machine-readable error codes when JSON output is enabled.

ansight device list --json
ansight session show <session-id> --json
ansight test run . onboarding.smoke --json

--silent suppresses stdout and stderr, including JSON. --verbose adds host, SDK, telemetry, and app-event diagnostics where the command supports them.

Find identifiers

CLI commands use stable IDs rather than display labels:

NeedCommand
App bundle or package IDansight app list
Simulator, emulator, or device IDansight device list
Installed app IDs on one targetansight device apps <platform> <device-id>
Recorded or connected session IDansight session list
Live app-tool IDansight app tools <session-id>
Workspace test IDansight test list <workspace-path>
Repository task IDansight task list --app-id <app-id>
Pairing invitation IDansight pairing list
.NET profiling capture IDansight profile dotnet list

Data and security

CLI state is local by default. Use ansight doctor or ansight host status --json to find the active data directory. Account and test secrets use the OS credential vault or an explicitly configured encrypted file store. Workspace tests can also resolve a declared secret alias directly from an environment variable with the same name. Values are never accepted as ordinary command-line arguments.

See Data, Privacy, and Analysis for session archives, structured JSON extraction, raw capture folders, and SQLite quality history.

The CLI records one pseudonymous daily-active event after a successful, meaningful command outside CI. It separately records install and update lifecycle events. Optional detailed analytics contains normalized command categories and outcomes, never raw arguments, paths, App IDs, session IDs, prompts, logs, or captured content. Inspect or change detailed tracking with ansight analytics status and ansight analytics detailed disable.