Skip to main content
Ask AI

TestRelic CLI

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.

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 alias
Install in one line

Linux / macOS: curl -fsSL https://testrelic.ai/install.sh | sh Windows (PowerShell): irm https://testrelic.ai/install.ps1 | iex

See 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-p with --output-format text|json|stream-json for scripts and CI. See Artifacts & headless output.

Where to go next

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

Install the CLI

Was this page helpful?
Last updated on by Srivishnu Ayyagari