TestRelic CLI overview
The TestRelic Ask AI agent in your terminal — a Claude Code-style interactive CLI with a full MCP host, written in Rust.
The TestRelic CLI runs the same Ask AI agent the web app uses — in a Claude Code-style inline terminal UI, written in Rust. It streams markdown, shows live tool activity, renders artifacts (dashboards, reports, test plans) directly in your scrollback, and acts as a full MCP host for your local tools.
$ tr
Welcome back Sam!
✻ TestRelic
sam@shop-e2e
session · testrelic.ai
~/shop-e2e
Tips for getting started
Run /init to set up TestRelic for this repo: frameworks, MCP, and the TESTRELIC.md rules.
What’s new
• Augur: Text-to-Image evals in plain chat — ask the agent to define eval cases, run them, and approve references.
• Tool activity is collapsed by default; press ctrl+o to expand it.
A hand-recreated slice of the real terminal UI — switch between the boxed /init welcome,
an example chat turn with collapsed tool activity, and headless -p print mode.
One binary, three names:
testrelic # interactive UI
testrelic -p "why did the nightly regress?" # print mode (pipes welcome)
tr # same binary, shorter name
ask-ai # same binary, mnemonic aliasInstall in one line
curl -fsSL https://testrelic.ai/install.sh | shSee Installation for targets, versions, and environment variables.
What it does
- Interactive agent chat against the TestRelic cloud — streamed markdown, live tool
activity (
⏺ tool(args)/⎿ result), artifacts, and token usage, in an inline terminal UI that scrolls into native scrollback (no alt-screen). - Every artifact renders in the terminal — New Relic-grade dashboards (KPI billboards, sparklines, braille charts, heat-colored tables), reports, test plans, navigation paths, data tables, code, and session cards. Live generation shows a streaming progress line.
- Tool confirmations — destructive tools (repo memory writes, alert CRUD) pause the stream for an Approve / Reject panel.
@context and!shell mode — attach repos, runs, branches, tests, environments, suites, or tags; run a local command whose output attaches to your next message.- Full MCP host — run local MCP servers (stdio or HTTP) whose tools the cloud agent can call. See MCP host.
- Headless print mode —
-pwith--output-format text|json|stream-jsonfor scripts and CI. See Artifacts & headless output.
Commands at a glance
Beyond the interactive agent, the CLI exposes commands for onboarding, IDE integration, and local config:
| Command | What it does |
|---|---|
setup | Deterministic, keys-only onboarding — --api-key tr_live_*, --mcp-token tr_mcp_*, --no-install. Wires up local config so the SDKs can upload. |
init | Agentic onboarding that inspects your project — --yes, --framework, --no-upload. |
login / logout | Authenticate or sign out. See Authentication. |
upload | Import existing Allure/JUnit reports into TestRelic Cloud. See Upload reports. |
device up|setup|serve|list|status|install|down|doctor | Boot and drive a local Android emulator — WebDriver serving, network capture, and one-click SDK/AVD provisioning with setup. See Device setup. |
augur | Text-to-image evals — judge a generator's output against approved references, compare multiple models, and ground prompt phrases to image regions. See Augur. |
map | Save a Project Map to your cloud repo memory. |
mcp add|list|remove | Manage local MCP servers the agent can call. See MCP host. |
studio | Launch the TestRelic Studio desktop GUI — --path, --stop. See Studio. |
results / run / complete | IDE Test Explorer integration. |
usage | Ask AI token usage against your org budget. |
artifacts | List, show, and export artifacts. See Artifacts. |
config get|set|list|path | Read and write local configuration. See Configuration. |
doctor | Auth, MCP, and terminal diagnostics. |
See Modes & engines for the --mode and --engine axes that apply
across the interactive agent.
Where to go next
Install
One-line install for Linux, macOS, and Windows, with version pinning and environment variables.
Quickstart
Log in, ask your first question, and learn the interactive basics in a couple of minutes.
Authentication
Session login for full parity, or a personal access token for headless and CI use.
MCP host
Add local MCP servers so the cloud agent can call your tools during a turn.
Augur
Text-to-image evals — judge a generator against approved references, compare models, and ground prompt phrases to image regions.
Studio
The native desktop GUI companion — browse tests, watch a live browser, fix and re-run failures, and manage CI pipelines.
How it relates to the rest of TestRelic
The CLI is a client of the same cloud Ask AI agent surfaced in the web app and over
MCP. The SDK reporters send your test runs to the cloud; the CLI lets you
query and act on that data from the terminal. Authentication mirrors @testrelic/mcp —
the same tr_mcp_* token convention works for both.
Distribution
The CLI ships as prebuilt binaries for Linux, macOS, and Windows — there's nothing to compile. Install with the one-liner above; see Installation for supported targets and version pinning.
Next steps
TestRelic Documentation
An AI-native test analytics platform — a terminal Ask AI agent (the CLI) and its desktop companion (Studio) set up SDK reporters and a cloud platform for AI insights, monitoring, and integrations.
Install the TestRelic CLI
Install the testrelic CLI on Linux, macOS, or Windows with a one-line script, and pin a release with environment variables.