> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://tester.army/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://tester.army/_mcp/server.

# Agentic Usage

> Give coding agents like Claude Code, Cursor, and Codex access to the TesterArmy CLI to set up projects, save tests, and queue remote QA runs.

Give your coding agent access to the TesterArmy CLI when you want it to set up
and run QA without leaving your development loop. The CLI is a control plane
for the TesterArmy dashboard: agents use it to manage projects, environments,
and saved tests, and to queue remote runs that execute in TesterArmy cloud.

The CLI is designed to be self-discoverable. Agents should start with
`ta agent init` and `ta docs` instead of scraping long help output. `ta docs`
prints task-oriented command routing, and `--json` returns structured output for
automation.

## What agents can do

With an API key, an agent can:

* create and list projects
* create and delete static project environments (`--name`/`--url` flags)
* save project memories as durable testing context
* create dashboard tests
* queue remote dashboard runs (default) and target saved environments with `--env`
* run tests in a local browser with `--local` for quick checks
* wait for remote runs and inspect run history
* upload iOS Simulator apps and Android artifacts for mobile tests

## Setup

Install and authenticate once:

```bash
npm install -g testerarmy
ta agent init
ta auth
ta status --json
```

For non-interactive sessions, set:

```bash
export TESTERARMY_API_KEY="YOUR_KEY"
```

## Prompt your agent

```txt
Use TesterArmy CLI (`ta`) for QA. Start with `ta agent init`, then discover
workflows with `ta docs --json` or `ta docs <topic>`. Use `--json` for automation;
on failure, follow `error.hint`. Report commands, run IDs, results, and artifacts.
```

## Useful entrypoints

```bash
ta agent init
ta docs
ta docs --json
ta docs agent
ta docs projects
ta docs memories
ta docs tests
ta docs runs
ta docs ci
```

## Safety

* use scoped API keys when possible
* prefer `--json` for agent-readable output
* use JSON error envelopes to decide the next action instead of parsing text
* avoid putting secrets in shell history
* ask before deleting projects, environments, memories, or tests