TestNeo
TestNeo Docs CLI
TestNeoDocs › CLI

TestNeo CLI

Run natural-language .testneo tests from your terminal or CI — same NLP format as the VS Code extension, same TestNeo execution backend and dashboard.

One line: Sign up free → create project & API key → npm i -g @testneo/clitestneo run your.testneo --wait

npm install -g @testneo/cli
testneo config set apiKey tn_your_key
testneo config set projectId 47
testneo run login.testneo --wait --fail-on-error

Get started free (14-day trial) · @testneo/cli on npm

Also from TestNeo — pick your surface

Package / surfaceUse when
@testneo/cli (this doc)Terminal & CI — run .testneo files, smoke folders, testneo doctor
@testneo/playwright-ai-sdkPlaywright in Git + CIai.run + page / expect in TypeScript specs
@testneo/mcp-serverCursor / Claude — generate, triage, batch from chat
TestNeo appProjects, environments, live runs, team visibility

Getting started (recommended path)

CLI runs tests on your TestNeo account (cloud or self-hosted API). Complete these steps once.

1) Sign up (14-day trial)

  1. app.testneo.ai/signup — create an account.
  2. Use the 14-day trial to explore the product.
  3. Sign in at app.testneo.ai.

2) Create a web project

  1. Projects → Create project (e.g. My Web Tests, URL https://www.saucedemo.com).
  2. Note project ID (e.g. 47).

3) Add an environment

  1. Project → Environments → create dev (or saucedemo).
  2. Set base_url = https://www.saucedemo.com (required for Navigate to {{base_url}}).

4) Create an API key

  1. Settings → API keys → create key (tn_…).

5) Install and configure CLI

npm install -g @testneo/cli

Production:

testneo config set baseUrl https://app.testneo.ai
testneo config set webAppUrl https://app.testneo.ai
testneo config set apiKey tn_your_key
testneo config set projectId 47
testneo config set defaultEnvironment dev
testneo doctor

Local API (optional):

testneo config set baseUrl http://127.0.0.1:8001
testneo config set webAppUrl http://127.0.0.1:5173
# same apiKey if valid on local DB; worker must be running

testneo doctor should show ✓ API reachable and list projects.

Working example (Sauce Demo)

Create login.testneo:

# Test: Sauce Demo login smoke
# Project: 47
# Environment: dev

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

Run:

testneo run login.testneo --wait --fail-on-error

Expected: step list + result: PASSED + open run: path and full URL: for the dashboard.

Explicit URL (no {{base_url}} in project env): use examples with a hard-coded URL after install — samples ship under node_modules/@testneo/cli/examples/saucedemo/.

Hybrid (NLP + Playwright Code: block):

testneo run examples/saucedemo/add-backpack-hybrid.testneo --env dev --wait --fail-on-error

Commands

CommandDescription
testneo doctorValidate API key and list projects
testneo config set …Save ~/.config/testneo/config.json (baseUrl, apiKey, projectId, defaultEnvironment, webAppUrl)
testneo config showShow effective config (key masked)
testneo run <file.testneo | dir>Execute flow(s)
testneo status <execution_id> [--wait]Poll status

testneo run flags

FlagDescription
--project <id>Override project ID
--env <name>Environment name (e.g. dev)
--waitPoll until done (exit 1 on failure)
--fail-on-errorWith --wait, exits non-zero on failure
--use-agentRoute to self-hosted TestNeo agent
--timeout <ms>Max wait (default 600000)

.testneo file format

# Test: My flow
# Project: 47
# Environment: dev
# Tags: smoke

Navigate to {{base_url}}
Click on "Sign in"
Verify "Dashboard" is visible

Code:
  await page.locator('[data-test="submit"]').click()
End Code:

Same format as the TestNeo VS Code extension.

CI (GitHub Actions)

- name: TestNeo smoke
  run: testneo run tests/smoke/ --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"

Environment variables

VariablePurpose
TESTNEO_BASE_URLAPI origin (overrides config)
TESTNEO_WEB_APP_URLDashboard links in CLI output
TESTNEO_API_KEYBearer token
TESTNEO_PROJECT_IDDefault project
TESTNEO_DEFAULT_ENVDefault environment name

Troubleshooting

IssueFix
401 Invalid API keyKey from same environment as baseUrl; run testneo doctor
[pending] 0/? long timeStart API worker; open dashboard URL from CLI output
Wrong host in URLstestneo config set baseUrl / webAppUrl for prod vs local
Need Playwright in repoUse @testneo/playwright-ai-sdk