testsprite-cli README

README проекта с github.com/TestSprite/testsprite-cli. Одним файлом markdown: README.md.

TestSprite

The verification layer for the agentic coding era.

AI ships code in minutes — verifying it hasn't. testsprite opens your live app, uses it like a real user, and shows your coding agent exactly what broke — so it fixes its own work before a bug ever reaches you.

Proof, in public: verification beats model size. With this CLI in the loop, the cheapest model in the field shipped the most correct app on an open leaderboard — 89%, at half the cost of the priciest one. See the leaderboard →

npm version npm downloads Node 20.19+, 22.13+, or 24+ License Apache 2.0 CI

Website Docs Follow on X LinkedIn Join our Discord

⭐ Help us reach more developers and grow the TestSprite community. Star this repo!

▶ Watch the launch video — the three hard limits every coding agent hits, and the loop that breaks them (4 min).


What is it?

TestSprite is the AI testing platform 100,000+ teams use to test their software, frontend and backend — in the cloud, against the live product, not mocks. This repo is its official CLI.

It puts that platform in your coding agent's hands: the agent verifies every behavior it ships, and what broke comes back as one result — the failed step, its cause and a fix — it can act on, with no dashboard scraping. Humans drive the same surface from a terminal or CI.

⭐️ Star the Repository

testsprite-repo-star-fast

If you find testsprite useful, a GitHub Star ⭐️ would be greatly appreciated — it helps other builders (and their agents) find the project, and stars notify you about new releases.

Quickstart

You need Node.js 20.19+ on the 20.x line, 22.13+ on 22.x, or 24 or later. Using 0.16? Read its command reference.

From your app's repository, install the CLI and run setup. It prompts for your workspace API key and installs the skills for the coding agents it detects.

npm install -g @testsprite/testsprite-cli
testsprite --version
testsprite setup
testsprite auth status

Choose your project and target. Run testsprite project list to find an existing project. For a new frontend project, create it and add the URL where your app is running. Replace the URL below with yours and set PROJECT_ID to the ID printed by project create.

testsprite project create --type frontend --name "Checkout"
PROJECT_ID=your-project-id
testsprite project env create "$PROJECT_ID" --name staging --url https://staging.example.com

Get your first test. Ask the project's agent to propose coverage. If it asks a question in a text message, answer with testsprite reply "your answer". For a question card, submit all the numbered answers together with testsprite apply --answer 1=b --answer 2=a,c. Review the proposed steps in the terminal and apply the plan when they match what you want to verify. For a backend project, attach the API specification with --file ./openapi.yaml.

testsprite plan "Verify that a guest can place an order with a test card" --project "$PROJECT_ID" --steps
testsprite apply
testsprite test list --project "$PROJECT_ID"

Run and inspect. A project run waits for the suite when you pass --wait. Exit 0 means it passed. On exit 1, look for a failed or blocked row in results[] and copy its resultId to inspect the error and available evidence. If no row failed, check runFailures for an execution-level error such as cancellation. Without --output json, each run also prints a Dashboard: link that opens it in the Portal.

testsprite run --project "$PROJECT_ID" --wait --output json
RESULT_ID=your-result-id
testsprite result get "$RESULT_ID" --out ".testsprite/results/$RESULT_ID"

After deploying a fix, run the affected test again with testsprite run "$TEST_ID" --wait, using its ID from test list. To resume waiting for a run you already started, use its run ID with testsprite run wait "$RUN_ID". The scripting example shows how to extract both IDs and preserve the verdict in CI.

Testing an environment on your machine

Start your frontend app on port 3000 and save it as the project's environment. A run on that environment opens a tunnel from this machine and waits for the cloud runner.

testsprite project env create "$PROJECT_ID" --name local --url http://localhost:3000
testsprite run --project "$PROJECT_ID" --env local

The project's agent explores the app through the same kind of tunnel: ask it with testsprite plan, and when it asks for a tunnel, run testsprite tunnel start in another terminal and testsprite reply "The tunnel is running.". Review and apply the test plan, then run with --env local. An ordinary Ctrl-C detaches a public run. With a tunnel this command opened, Ctrl-C cancels unfinished work by default and closes the tunnel. Local frontend testing and tunnels

Commands

Task Command
Check credentials or install coding-agent skills auth status, setup, agent status
Manage a project and its targets project list, project create, project env
Propose tests, review them and save them plan, status, reply, reject, apply
Find the ID or steps of a saved test test list --project <id>, test get <test-id>
Launch a project, named tests or a saved list run --project <id>, run <test-id...>, run --testlist <list-id>
Follow or cancel an execution run wait <run-id...>, run cancel <run-id...>
Read results and download evidence result list --run <run-id>, result list --test <test-id>, result get <result-id>
Automate scheduled tests or a pull-request gate schedule, ci init github, ci run

For test lists, tunnel management, usage, diagnostics, profiles and exit codes, see the command reference. To migrate shell scripts or previously installed agent skills from 0.16, see Upgrading from 0.16.

Why a CLI for coding agents?

How it works

Every time your agent changes code, it asks one question: is this behavior already covered by the suite?

Every pass is banked into a durable suite, so coverage compounds as the project grows — a lasting record of every requirement it has ever gotten right, far bigger than any context window.

flowchart TD
    A["🤖 Your coding agent<br/>Claude Code · Codex · Antigravity · Kimi · Cursor · Trae …"]
    D{"behavior already<br/>covered by the suite?"}
    B["<b>testsprite plan → apply</b><br/>the project's agent writes a test<br/>for the new behavior"]
    R["<b>testsprite run --project &lt;project-id&gt; --wait</b><br/>run the existing tests"]
    C{{"☁️ TestSprite testing agent<br/>runs the test like a real user against<br/>real browsers & real APIs on Cloud"}}
    F["<b>testsprite result get</b><br/>one test's result in the run:<br/>failed step · screenshots · video ·<br/>cause · fix"]
    S[("📚 Durable integration suite<br/>grows with every pass")]

    A -->|"writes / changes code"| D
    D -->|"no — new behavior"| B
    D -->|"yes"| R
    B --> R
    R --> C
    C -->|"pass ✅"| S
    C -->|"fail ❌"| F
    F -->|"agent reads the result<br/>& fixes the code"| A
    S -.->|"defines what's covered"| D

The cloud is a black box on purpose: your agent describes intent and reads results. It never has to know how the test was driven — only what a real user experienced.

Proved in public

On CoderCup — an open leaderboard where frontier coding agents build the same app under the same rules, with TestSprite as the referee — the cheapest model in the field shipped the most correct app on the board: 89%, at half the cost of the priciest one.

That's the point of all of this: you no longer need the biggest, most expensive model to ship software you can trust — top-tier quality, without paying top-tier prices, within reach of every team.

Getting help

Contributing

Contributions are welcome — the CLI is plain TypeScript/Node (20.19+, 22.13+, or 24+), tested with Vitest, built with tsc. Getting a dev loop running takes a minute:

git clone https://github.com/TestSprite/testsprite-cli.git
cd testsprite-cli && npm install
npm run build       # tsc → dist/ ; try it: node dist/index.js --help
npm test            # unit suite — no network or credentials needed
npm run lint:fix    # ESLint
npm run typecheck   # tsc --noEmit

Pull requests target the main branch. The full guide — build from source, test tiers, CI checks, branches, project layout — is in CONTRIBUTING.md.

Support — if you need any help, we're responsive on Discord, and feel free to email us at [email protected] too.

License

Apache-2.0 © TestSprite

testsprite-cli (TestSprite/testsprite-cli)

Ищем в базе…

Что это такое?Официальный CLI TestSprite — AI-платформы для тестирования, которой пользуются более 100 000 команд. Она тестирует фронтенд и бэкенд в облаке на живом продукте, а не на моках, и передаёт вашему кодинг-агенту информацию о том, что сломалось, чтобы он исправил собственную работу.
Так это облачный сервис или инструмент, который работает у меня на компьютере?И то и другое: это CLI для терминала, а тесты выполняются в облаке TestSprite на вашем работающем приложении. Один и тот же интерфейс доступен кодинг-агенту, человеку в терминале или CI.
Как его запустить?Нужен Node.js 20.19+, 22.13+ или 24+. Выполните 'testsprite setup' (или 'npx @testsprite/testsprite-cli' без глобальной установки): одна команда спросит ваш API-ключ, проверит его и установит skill цикла проверки в ваши кодинг-агенты.
С какими кодинг-агентами он работает?Восемь вариантов: claude, cursor, cline, windsurf, antigravity, kiro, copilot, codex. Setup определяет, какими из них вы пользуетесь, и устанавливает skill для них; 'testsprite agent status' в любой момент покажет результат.
Есть ли подводные камни, о которых стоит знать заранее?TLS обязателен — CLI никогда не переключается на незашифрованное соединение, поэтому в сетях, где TLS подменяет сертификаты, нужно указать NODE_EXTRA_CA_CERTS на корневой сертификат вашей организации. Запуски через портал на бесплатном тарифе также заблокированы, пока вы не зададите публичный URL проекта.
Он полезен, только если я программирую с AI-агентом?Нет — связка с агентом это главный сценарий, но тот же CLI-интерфейс может использовать человек из терминала или CI, причём есть неинтерактивные флаги для CI и скриптов первичной настройки.
Что уходит с моего компьютера при использовании?Трафик тестов идёт через TLS-шифрованный облачный туннель TestSprite. Единственная регулярная проверка — запрос к реестру npm не чаще одного раза в 24 часа, который отправляет только имя пакета, но не ваш ключ и не данные; переменная окружения позволяет его отключить.
Что получает мой агент, когда тест падает?Один самодостаточный набор данных о последнем падении из 'testsprite test failure get' — вердикт, статус каждого шага со скриншотом и указателями на DOM — устроенный так, чтобы агент мог сразу на его основе действовать. 'test failure summary' выдаёт обзорную карточку на один экран, а 'test diff' сравнивает два запуска, включая смены статусов отдельных шагов.
Может ли TestSprite сам предложить тесты вместо того, чтобы я писал их вручную?Да. 'testsprite test plan generate --project' исследует ваше приложение (или читает загруженную API-спецификацию), составляет черновик тест-кейсов и оставляет их на проверку, не трогая ваш диск — вы оставляете только то, что нужно. Каждый запущенный этап тратит кредиты: загрузка PRD стоит 0,5 кредита за встраивание, а API-спецификация бесплатна.
Обязательно составлять тест-планы онлайн?Нет. 'test scaffold' создаёт корректный по схеме стартовый план, а 'test lint' проверяет файлы планов полностью офлайн — без сети и без учётных данных, с флагом --dry-run для предпросмотра команд. Локальные проекты пропускают этап исследования и запускаются из подготовленных планов через 'test create --plan-from'.
Как проверить, что всё настроено правильно?'testsprite doctor' проводит полную диагностику окружения — версии CLI и Node, профиль, endpoint, учётные данные, подключение, skill агентов — и завершается с ненулевым кодом при ошибке. 'testsprite agent status' показывает, у каких из ваших кодинг-агентов установлен skill проверки.
Какие есть похожие проекты?superpowers-zh, assay, agent-skills, tau, playwright-cli, e2e, midscene, agentic-playwright
Автор
TestSprite
Размер
2.4 MB
Звёзды
5.2K
Возраст
5 мес
Коммиты · 90 дней