Install the CLI
Set up the AskUI CLI to run Projects headless, from a terminal or in CI.
The AskUI CLI (askui) runs the same Projects you author in AskUI Desktop,
without the UI. One command, askui run, executes your tests on the
Project's device, a desktop, a browser, an Android device, or an iOS
simulator, and writes the reports of the run. Use it locally for scripted
runs, or in CI.
Install the CLI
The CLI ships with AskUI Desktop.
The AskUI Desktop installer puts askui on your PATH, and the
uninstaller removes it again. Open a new terminal after the install.
Settings → This machine → AskUI CLI shows whether that worked. If
a locked-down PowerShell stopped the installer from changing PATH, the
card says so and shows where askui.exe is. Reinstall, or add its folder
to your user PATH by hand.
Verify the install
askui --version
askui run --helpaskui run --help lists every option, the environment variables, and the
exit codes.
Set up the device you want to drive
The CLI runs on the Project's device profiles in
devices.json, the same ones the app uses (see
Choosing the device). The
CLI starts an emulator or a simulator that a profile provisions, as the
app does.
Desktop runs need AgentOS on the machine under test. For
a profile on localhost, the CLI starts a local AgentOS for the run
when none is running. For a remote machine, install AgentOS there and set
the profile's host and port to it; the CLI attaches to a remote AgentOS
instead of starting one.
Authenticate
If AskUI Desktop runs with a local license on the machine, skip this step.
The CLI then uses the license and the model you set up in the app, as the app
does, and askui status shows that model.
Otherwise, on your own machine, sign in with your AskUI account:
askui loginThe browser opens; sign in as you do in AskUI Desktop. Without a browser on the
machine, for example over SSH, askui login shows a link and a code instead:
open the link on any device and enter the code. askui login --use-device-code
does that on purpose. If your account belongs to several workspaces, pick one
when asked, or pass --workspace <name>.
askui login signs in existing accounts only. Create your account in the
AskUI Hub or in AskUI Desktop first, and confirm your
email address there.
In CI, or anywhere you prefer a token, set two environment variables instead. They win over a sign-in:
export ASKUI_WORKSPACE_ID="<your workspace id>"
export ASKUI_TOKEN="<your access token>"Create the access token in the AskUI Hub under your
workspace's Access tokens, see
Workspaces & access tokens. Instead of
exporting, you can also put both lines in a .env file in your Project root;
the CLI loads it on every run (variables already set in the environment win).
A new Project's .gitignore already keeps .env out of git. You choose the
token's lifetime in the Hub, so the same setup works for a scheduled job and a
CI runner.
askui status shows what a run on this machine uses: whether AskUI Desktop's
settings count, the kind of credential, the workspace, the token by its last
three characters, the entitlement, and the model.
To set up the rest of the machine from the terminal, such as the model, the
proxy, or the AgentOS controller, run askui configure; see
Configure the CLI.
Run a Project
cd my-project
askui runSee Running from the CLI for the full command reference, test plans, devices, model selection, reports, and exit codes.