CLI commands
The Aucert CLI provides three commands in Phase 1: init, run, and status.
aucert init
Initialize a new Aucert project in the current directory. Creates an aucert.config.yaml with default test configuration.
Syntax
aucert init [--app <path>] [--platform <android|ios>] [--force]
Flags
| Flag | Description | Default | Required |
|---|---|---|---|
--app | Path to APK/AAB file | Auto-detected from ./app/build/outputs/ | No |
--platform | Target platform | android | No |
--force | Overwrite existing config | false | No |
Examples
Basic initialization — auto-detects your APK:
cd my-android-app
aucert init
✓ Detected APK: ./app/build/outputs/apk/debug/app-debug.apk
✓ Platform: android
✓ Created aucert.config.yaml
Explicit APK path — useful when multiple build variants exist:
aucert init --app ./app/build/outputs/apk/release/app-release.apk
Re-initialize — overwrite an existing config:
aucert init --force
Exit codes
| Code | Meaning |
|---|---|
0 | Config created successfully |
1 | Config already exists (use --force to overwrite) |
2 | No APK found and --app not specified |
aucert run
Execute a test run against your application. This is the primary command — it triggers the full AI testing pipeline.
Syntax
aucert run [--scope <scope>] [--watch] [--output <format>] [--max-tests <n>]
Flags
| Flag | Description | Default | Required |
|---|---|---|---|
--scope | Test scope: navigation, user-flows, regression, or all | all | No |
--watch | Stream results in real-time as tests complete | false | No |
--output | Output format: json, junit, html | From config (default: json) | No |
--max-tests | Maximum number of test scenarios to generate | From config (default: 100) | No |
Examples
Run all tests — default behavior:
aucert run
▶ Starting test run...
Platform: android
APK: ./app/build/outputs/apk/debug/app-debug.apk
Scope: all (navigation, user-flows, regression)
⏳ Generating test scenarios... (12 scenarios)
⏳ Executing on emulator... [████████████████████] 12/12
⏳ Analyzing results...
✓ Test run complete
Passed: 10/12
Failed: 2/12
Confidence: 94.2% average
Results saved to ./aucert-results/run-2026-04-07T10-30-00Z.json
Run with live streaming — see results as each test completes:
aucert run --watch
▶ [1/12] Login → Home navigation ........................ PASS (98.1%)
▶ [2/12] Login with invalid credentials ................. PASS (97.5%)
▶ [3/12] Search → Product detail → Cart ................ PASS (95.3%)
▶ [4/12] Cart → Checkout → Payment ..................... FAIL (72.1%)
⚠ Expected: payment form displayed
⚠ Actual: loading spinner persisted after 5s timeout
...
Navigation tests only — fastest scope, tests screen transitions:
aucert run --scope navigation
Generate JUnit XML — for CI/CD test summary integration:
aucert run --output junit
Results saved to ./aucert-results/run-2026-04-07T10-30-00Z.xml
Exit codes
| Code | Meaning |
|---|---|
0 | All tests passed |
1 | One or more tests failed |
2 | Configuration error (missing config, invalid APK path) |
3 | Authentication error (missing or invalid API key) |
4 | Network error (cannot reach Aucert API) |
In CI/CD, exit code 1 (test failures) should fail the build. Exit codes 2–4 indicate setup problems that need fixing before tests can run.
aucert status
Check the status of current or past test runs. Useful for polling run completion in scripts or reviewing historical results.
Syntax
aucert status [--latest] [--run-id <id>] [--format <format>]
Flags
| Flag | Description | Default | Required |
|---|---|---|---|
--latest | Show the most recent run | false | No |
--run-id | Show a specific run by ID | — | No |
--format | Output format: table, json | table | No |
Examples
Show all recent runs:
aucert status
Run ID Status Tests Passed Failed Date
───────────────────────────────────────────────────────────────────────────────
a1b2c3d4-e5f6-7890-abcd-ef1234567890 complete 12 10 2 2026-04-07 10:30
f9e8d7c6-b5a4-3210-fedc-ba0987654321 complete 8 8 0 2026-04-06 14:15
11223344-5566-7788-99aa-bbccddeeff00 running 15 — — 2026-04-07 11:00
Show the latest run:
aucert status --latest
Show a specific run with JSON output — useful for scripting:
aucert status --run-id a1b2c3d4-e5f6-7890-abcd-ef1234567890 --format json
{
"run_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "complete",
"started_at": "2026-04-07T10:30:00Z",
"completed_at": "2026-04-07T10:32:15Z",
"scenarios": 12,
"passed": 10,
"failed": 2,
"average_confidence": 0.942
}
Exit codes
| Code | Meaning |
|---|---|
0 | Status retrieved successfully |
1 | Run ID not found |
3 | Authentication error |
Global flags
These flags work with any command:
| Flag | Description |
|---|---|
--help, -h | Show help for a command |
--version, -v | Show CLI version |
--verbose | Show debug-level output |
--config <path> | Use a custom config file path (default: ./aucert.config.yaml) |
--no-color | Disable colored output (auto-disabled in non-TTY environments) |
Authentication
The CLI authenticates via API key. Two methods:
-
Environment variable (recommended for CI/CD):
export AUCERT_API_KEY=your-api-key
aucert run -
Interactive login (recommended for local development):
aucert auth loginStores the token in
~/.aucert/credentials.
What's next
- Configuration — Customize your
aucert.config.yaml - CI/CD integration — Automate with GitHub Actions
- Run your first test — Step-by-step tutorial