TestNeo
TestNeo Docs CLI v0.2.1
TestNeoDocs › CLI

TestNeo CLI v0.2.1

Release assurance in your terminal — run .testneo tests, pick cases from Test Manager, validate PRs, query Engineering Memory, check release readiness, and Ask the AI Assistant. Same account and projects as app.testneo.ai and MCP.

Install: npm install -g @testneo/cli@0.2.1 · Package: @testneo/cli · App: app.testneo.ai

npm install -g @testneo/cli@0.2.1
testneo login
testneo config set baseUrl https://app.testneo.ai
testneo config set webAppUrl https://app.testneo.ai
testneo config set projectId YOUR_PROJECT_ID
testneo config set defaultEnvironment dev
testneo doctor

# Run an exported .testneo file (cloud execution — safe default for most users)
testneo run ./login.testneo --project YOUR_PROJECT_ID --env dev --cloud --wait --fail-on-error

# Before you merge (from your application git repo)
testneo pr validate --project YOUR_PROJECT_ID
testneo readiness --project YOUR_PROJECT_ID
testneo ask --project YOUR_PROJECT_ID "What is my release readiness?"

Get started free (14-day trial) · Release Intelligence product overview

Also from TestNeo — pick your surface

Package / surfaceUse when
@testneo/cli (this doc)Terminal & CI — humans + scripts: run tests, PR brief, memory, readiness, Ask
@testneo/playwright-ai-sdkPlaywright in Git + CIai.run in TypeScript specs
@testneo/mcp-serverCursor / Claude — generate, triage, release workflows from chat
TestNeo appProjects, Test Manager, live runs, PR boards, Release Readiness UI

Getting started

Point the CLI at https://app.testneo.ai. Do this once.

1) Sign up & create a project

  1. app.testneo.ai/signup — create an account (14-day trial).
  2. Projects → Create project.
  3. Note your project ID (shown in the app or via testneo doctor).

2) Environment + API key

  1. Project → Environments → create dev with a base_url for the app under test (example: https://www.saucedemo.com).
  2. Settings → API keys → create a key (tn_…).

3) Install & configure

npm install -g @testneo/cli@0.2.1

testneo login
# or: testneo config set apiKey tn_your_key

testneo config set baseUrl https://app.testneo.ai
testneo config set webAppUrl https://app.testneo.ai
testneo config set projectId YOUR_PROJECT_ID
testneo config set defaultEnvironment dev
testneo doctor

Expect ✓ API reachable and your projects listed. Dashboard links in CLI output will use https://app.testneo.ai/….

4) Export tests from Test Manager (recommended)

  1. Open Test Manager → select cases → Export → TestNeo CLI → unzip.
  2. Run the exported file (see examples below).

Which command should I use?

GoalCommandNotes
Run a saved NLP file testneo run ./my.testneo --cloud --wait Best for exports from Test Manager
Run an existing Test Manager case by ID testneo run --test-case 12 --cloud --wait Does not create a duplicate case
Browse & multi-select cases testneo run --pick --cloud --wait Interactive (TTY)
Quick one-shot NLP (no file) testneo try "…" --url https://… --cloud --wait Creates/updates a case by name, then runs it
Headed browser on your machine Add --use-agent (agent must be online) See Local agent vs cloud
CI / no local agent Always pass --cloud Recommended in GitHub Actions

Avoid surprise duplicates: testneo run path/to/file.testneo upserts by file name (without .testneo). If that name differs from the case in Test Manager, a new case is created. To always run the original case, use testneo run --test-case ID --cloud --wait or --pick.

Sample project journey (end-to-end)

Walkthrough for a typical web project (Sauce Demo–style login + catalog). Replace YOUR_PROJECT_ID with your ID from testneo doctor.

  1. 1 · Smoke — Prove auth & execution with run / try.
  2. 2 · Inventory — Ask “how many tests?” / “which tests cover login?”
  3. 3 · Diff risk — From your app git repo: memory match + pr validate.
  4. 4 · Ship decisionreadiness + Ask “safe to ship?” / release decision report.
  5. 5 · CI — Same commands in GitHub Actions with secrets.
P=YOUR_PROJECT_ID   # from: testneo doctor

# --- 1) Smoke (cloud — works without a local agent) ---
testneo try --project $P --env dev --cloud --wait --fail-on-error \
  --url https://www.saucedemo.com \
  "Enter username as standard_user
Enter password as secret_sauce
Click Login
Verify Products is visible"

# Or run an exported / example file
testneo run "$(npm root -g)/@testneo/cli/examples/saucedemo/login-explicit-url.testneo" \
  --project $P --env dev --cloud --wait --fail-on-error

# Or run existing Test Manager cases (no new cases created)
testneo run --pick --project $P --cloud --wait --fail-on-error
# testneo run --test-case 12,34 --project $P --cloud --wait --fail-on-error

# --- 2) Inventory (Ask) ---
testneo ask --project $P "How many test cases do I have?"
testneo ask --project $P "Which tests cover login?"
testneo ask --project $P "List all test cases"
testneo ask --project $P --chat    # interactive; type questions, exit to quit

# --- 3) PR / memory (run from the *application* git repo) ---
cd /path/to/your-app-repo
testneo memory match --project $P
testneo pr validate --project $P
# optional: execute impacted tests on cloud (write guard)
testneo pr validate --project $P --run-impacted --confirm --cloud --wait --fail-on-error
testneo pr history --project $P

# --- 4) Release readiness ---
testneo readiness --project $P
testneo ask --project $P "What is my release readiness?"
testneo ask --project $P "Show release metrics"
testneo ask --project $P "Generate release decision report"
testneo ask --project $P "Is it safe to ship?"

Important: pr validate and memory match use local git (base/head SHAs + changed files). Run them from your application repository, not a random unrelated checkout — otherwise impact scoring is empty.

Run · pick · try

All three execute NLP against your project on app.testneo.ai. Prefer --cloud unless you intentionally use a local agent (next section).

File / folder run

# Cloud (recommended default)
testneo run ./login.testneo --project YOUR_PROJECT_ID --env dev --cloud --wait --fail-on-error
testneo run ./tests/smoke/ --project YOUR_PROJECT_ID --env dev --cloud --wait --fail-on-error

# Local agent (headed browser on your machine — agent must be online)
testneo run ./login.testneo --project YOUR_PROJECT_ID --env dev --use-agent --wait --fail-on-error

Bundled Sauce Demo sample (after global install):

testneo run "$(npm root -g)/@testneo/cli/examples/saucedemo/login-explicit-url.testneo" \
  --project YOUR_PROJECT_ID --env dev --cloud --wait --fail-on-error

Pick Test Manager cases (TTY)

testneo run --pick --project YOUR_PROJECT_ID --cloud --wait --fail-on-error
# filter: testneo run --pick --search login --cloud --wait

Run by ID (no duplicate cases — best for CI)

testneo run --test-case 12,34 --project YOUR_PROJECT_ID --env dev --cloud --wait --fail-on-error

One-shot natural language (try)

No .testneo file — NLP as arguments. Upserts a case by name, then executes.

testneo try --project YOUR_PROJECT_ID --env dev --cloud --wait --fail-on-error \
  --url https://www.saucedemo.com \
  "Enter username as standard_user
Enter password as secret_sauce
Click Login
Verify Products is visible"

Live steps stream in the terminal; open the printed dashboard URL on app.testneo.ai.

Status

testneo status EXECUTION_ID --wait

Local agent vs cloud

Every execute prints a line like execution: cloud / EC2 (--cloud) or execution: local agent #12 … so you always know where the browser ran.

Flag / settingWhen to useWhat happens
--cloud Recommended for CI and most users Always run on TestNeo cloud (EC2) — no local agent needed
--use-agent You want a headed browser on your laptop Force local agent (start it first in the app)
Neither flag (preferAgent: true default) Optional convenience Local agent if online (heartbeat ≤ 90s), otherwise cloud
config set preferAgent false Always prefer cloud unless you pass --use-agent Same effect as defaulting to cloud
# Check whether a local agent is registered / online
testneo agent status
testneo doctor

# --- Cloud (pin it — clearest for demos & CI) ---
testneo run ./login.testneo --project YOUR_PROJECT_ID --env dev --cloud --wait --fail-on-error
testneo run --pick --project YOUR_PROJECT_ID --cloud --wait
testneo try --project YOUR_PROJECT_ID --cloud --url https://www.saucedemo.com \
  "Verify Products is visible" --wait

# --- Local agent ---
# 1) In app.testneo.ai → Settings → Agent → create & start the agent
# 2) Confirm:
testneo agent status
# 3) Run:
testneo run ./login.testneo --project YOUR_PROJECT_ID --env dev --use-agent --wait --fail-on-error
testneo run --pick --project YOUR_PROJECT_ID --use-agent --wait --fail-on-error

Do not confuse flags:

  • --use-agent / --cloud = where the browser runs
  • --agent (global) = output mode (NDJSON for coding agents / scripts) — unrelated to local agent routing

PR validate — Release Brief

Builds a Release Brief from local git (or a connected GitHub PR): risk level (PASS / WARN / BLOCK), impacted tests, Engineering Memory matches, and a board URL. Product deep-dive: Release Intelligence.

# From your app repo (must have commits + origin/main or origin/master)
cd /path/to/your-app

testneo pr validate --project YOUR_PROJECT_ID
# prints brief + workflow_id + https://app.testneo.ai/web/pr-validation/<id>

# Connected GitHub PR number
testneo pr validate --project YOUR_PROJECT_ID --pr 142

# Run impacted tests (requires explicit --confirm)
testneo pr validate --project YOUR_PROJECT_ID --run-impacted
# → errors without --confirm (write guard)

testneo pr validate --project YOUR_PROJECT_ID \
  --run-impacted --confirm --wait --fail-on-error

# Force cloud for impacted runs (CI / no local agent)
testneo pr validate --project YOUR_PROJECT_ID \
  --run-impacted --confirm --cloud --wait

testneo pr history --project YOUR_PROJECT_ID --limit 5

What to look for: 🟢 PASS / 🟡 WARN / 🔴 BLOCK · risk score · historical incident matches · merge recommendation · open the board link for the full UI.

Engineering Memory

Prior incidents, patterns, and live matches against your current diff.

cd /path/to/your-app

testneo memory match --project YOUR_PROJECT_ID     # score / tier vs current changes
testneo memory list --project YOUR_PROJECT_ID      # stored entries
testneo memory patterns --project YOUR_PROJECT_ID  # clustered patterns

Use match before merge when you want a fast “have we broken this area before?” signal; use pr validate for the full brief.

Release readiness

Project-level confidence (0–100) and recommendation (e.g. SAFE TO RELEASE).

testneo readiness --project YOUR_PROJECT_ID
testneo readiness --project YOUR_PROJECT_ID --json   # scripts / CI

# Same question via Ask (narrative + links)
testneo ask --project YOUR_PROJECT_ID "What is my release readiness?"
testneo ask --project YOUR_PROJECT_ID "Show release metrics"
testneo ask --project YOUR_PROJECT_ID "Generate release decision report"

UI board: app.testneo.ai/web/release-readiness

Ask — AI Assistant in the terminal

Same endpoint as web /web/ai-assistant and MCP testneo_ai_assistant_query. Operational questions (inventory, readiness, navigate, k6/codegen) are answered from your project data via the server command router — not a hard-coded FAQ.

Modes

testneo ask --project YOUR_PROJECT_ID "How many test cases do I have?"
testneo ask --project YOUR_PROJECT_ID --detailed "Give me an executive summary"
testneo ask --project YOUR_PROJECT_ID --json "List all test cases"
testneo ask --project YOUR_PROJECT_ID --chat

In --chat, type the question only (e.g. Go to dashboard). Pasting a full testneo ask … line also works — the CLI strips the wrapper.

High-value questions

AskYou get
How many test cases do I have?Live Test Manager count
List all test casesIDs + names
Which tests cover login? / Products and CouponsCoverage-style matches (name, tags, NLP)
Show latest test run resultsRecent executions
Show project statisticsCounts + pass/fail tallies
What is my release readiness?Confidence /100 + decision
Show release metricsPR window + score factors
Generate release decision reportChecklist + rollback-style brief
Is it safe to ship? / Can I release?Ship recommendation
Open test manage / Go to dashboardAbsolute UI links in the terminal
Generate k6 load test for GET /productsLoad script (not test inventory)
Give me an executive summaryLLM analytics path (richer with uploaded docs)

Interactive chat script

testneo ask --project YOUR_PROJECT_ID --chat
  1. How many test cases do I have?
  2. Which tests cover login?
  3. Show latest test run results
  4. What is my release readiness?
  5. Generate release decision report
  6. Open release readiness
  7. exit

Demo reel — Ask loop (copy-paste)

Walk inventory → latest runs → readiness → ship decision → UI link. Great for demos. Set P to your project ID from testneo doctor.

P=YOUR_PROJECT_ID

for q in \
  "How many test cases do I have?" \
  "List all test cases" \
  "Which tests cover login?" \
  "Show latest test run results" \
  "What is my release readiness?" \
  "Show release metrics" \
  "Generate release decision report" \
  "Is it safe to ship?" \
  "Open release readiness"
do
  echo ""
  echo "════════ $q ════════"
  testneo ask --project "$P" "$q"
  sleep 2
done

Navigate answers print absolute links under https://app.testneo.ai/… (from your webAppUrl config).

Commands reference (v0.2.1)

CommandDescription
testneo doctorValidate API key + list projects + agent routing hint
testneo loginEmail/password → create tn_ key → save config
testneo config set|show|path~/.config/testneo/config.json (incl. preferAgent)
testneo runFile/dir, --pick, or --test-case
testneo try "…"One-shot NL → upsert + execute
testneo agent statusLocal agent registered / online? (drives smart routing)
testneo status <id>Poll execution
testneo pr validateRelease Brief (local git or --pr)
testneo pr historyRecent validation boards
testneo memory list|patterns|matchEngineering Memory
testneo readinessRelease confidence summary
testneo ask ["…"]AI Assistant (--chat, --detailed)
testneo tuiInteractive home (pick → validate → run)

Global flags

FlagDescription
--jsonSingle JSON object (CI / scripts)
--agentNDJSON event stream for coding agents (output mode — not local-agent routing)

run / try / impacted PR flags

FlagDescription
--project <id>Override project ID
--env <name>Environment name
--waitPoll until done
--fail-on-errorNon-zero exit on failure (with --wait)
--use-agentForce local TestNeo agent
--cloudForce cloud / EC2 (skip local agent)
--timeout <ms>Max wait (default 600000)
--pick / --search / --test-caseCloud case selection
--url (try)Explicit start URL

TUI & NDJSON agent mode

testneo tui

testneo try "Verify Products is visible" --wait --agent
# → NDJSON events, then a final result line

.testneo file format

# Test: Sauce Demo login smoke
# Project: YOUR_PROJECT_ID
# Environment: dev
# Tags: smoke

Navigate to {{base_url}}
Enter username as "standard_user"
Enter password as "secret_sauce"
Click on Login button
Verify "Products" is visible

Code:
  await page.locator('[data-test="add-to-cart-sauce-labs-backpack"]').click()
End Code:

Same NLP as the VS Code extension and Test Manager.

CI (GitHub Actions)

- name: TestNeo smoke
  run: |
    npm install -g @testneo/cli@0.2.1
    testneo run tests/smoke/ --cloud --wait --fail-on-error
  env:
    TESTNEO_BASE_URL: https://app.testneo.ai
    TESTNEO_WEB_APP_URL: https://app.testneo.ai
    TESTNEO_API_KEY: ${{ secrets.TESTNEO_API_KEY }}
    TESTNEO_PROJECT_ID: "47"
    TESTNEO_PREFER_AGENT: "false"

- name: PR release brief (optional)
  run: |
    testneo pr validate --project ${{ env.TESTNEO_PROJECT_ID }} --json
  env:
    TESTNEO_BASE_URL: https://app.testneo.ai
    TESTNEO_API_KEY: ${{ secrets.TESTNEO_API_KEY }}
    TESTNEO_PROJECT_ID: "47"
  # checkout must include full git history for local impact

Environment variables

VariablePurposeTypical value
TESTNEO_BASE_URLAPI originhttps://app.testneo.ai
TESTNEO_WEB_APP_URLDashboard / board links in CLI outputhttps://app.testneo.ai
TESTNEO_API_KEYBearer tokentn_…
TESTNEO_PROJECT_IDDefault projectfrom testneo doctor
TESTNEO_DEFAULT_ENVDefault environment namedev
TESTNEO_PREFER_AGENTSmart local-agent routing when flags omittedtrue (default) / false

Troubleshooting

IssueFix
401 Invalid API keyKey must match https://app.testneo.ai; re-run testneo login / doctor
[pending] 0/? for a long timeOpen the dashboard URL from CLI output on app.testneo.ai; ensure agent is online if using --use-agent
Wanted cloud but got local agentPass --cloud (or config set preferAgent false)
Wanted local agent but got cloudtestneo agent status — start agent in app Settings; heartbeat ≤90s; then --use-agent
Extra / duplicate test case after run file.testneoUpsert is by file name. Use --test-case ID or --pick to run the original case
Empty PR brief / score 0Run from the application git repo with origin/main (or master); fetch remotes
--run-impacted errorsAdd --confirm (write guard)
Ask returns upload/welcome blurbUse inventory questions above; upgrade CLI to 0.2.1
Navigate shows relative path onlySet webAppUrl to https://app.testneo.ai; upgrade to 0.2.1
--pick in CIUse --test-case id (non-TTY)
Wrong host in dashboard linkstestneo config set baseUrl https://app.testneo.ai and webAppUrl https://app.testneo.ai
Still on old CLInpm i -g @testneo/cli@0.2.1 then which testneo / testneo --version