{"id":50781665,"url":"https://github.com/testsprite/testsprite-cli","last_synced_at":"2026-06-18T10:00:47.496Z","repository":{"id":364045022,"uuid":"1266125334","full_name":"TestSprite/testsprite-cli","owner":"TestSprite","description":"Official TestSprite CLI — AI-powered automated testing from your terminal","archived":false,"fork":false,"pushed_at":"2026-06-13T01:07:02.000Z","size":548,"stargazers_count":348,"open_issues_count":0,"forks_count":13,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-06-17T09:26:20.499Z","etag":null,"topics":["ai","cli","e2e-testing","playwright","qa","test-automation","testing"],"latest_commit_sha":null,"homepage":"https://www.testsprite.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TestSprite.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-11T10:44:15.000Z","updated_at":"2026-06-17T09:05:22.000Z","dependencies_parsed_at":"2026-06-14T06:01:45.815Z","dependency_job_id":null,"html_url":"https://github.com/TestSprite/testsprite-cli","commit_stats":null,"previous_names":["testsprite/testsprite-cli"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/TestSprite/testsprite-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TestSprite%2Ftestsprite-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TestSprite%2Ftestsprite-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TestSprite%2Ftestsprite-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TestSprite%2Ftestsprite-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TestSprite","download_url":"https://codeload.github.com/TestSprite/testsprite-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TestSprite%2Ftestsprite-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34485169,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-18T02:00:06.871Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","cli","e2e-testing","playwright","qa","test-automation","testing"],"created_at":"2026-06-12T04:00:26.778Z","updated_at":"2026-06-18T10:00:47.445Z","avatar_url":"https://github.com/TestSprite.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n\u003ca href=\"https://www.testsprite.com\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"assets/testsprite-logo-dark.svg\"\u003e\n    \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"assets/testsprite-logo-light.svg\"\u003e\n    \u003cimg src=\"assets/testsprite-logo-dark.svg\" alt=\"TestSprite\" width=\"420\"\u003e\n  \u003c/picture\u003e\n\u003c/a\u003e\n\n### The verification layer for the agentic coding era.\n\nAI 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.\n\n\u003csub\u003e\u003cb\u003eProof, in public: verification beats model size.\u003c/b\u003e With this CLI in the loop, the cheapest model in the field shipped the most correct app on an open leaderboard — \u003cb\u003e89%\u003c/b\u003e, at half the cost of the priciest one. \u003ca href=\"https://codercup.ai\"\u003eSee the leaderboard →\u003c/a\u003e\u003c/sub\u003e\n\n\u003cp\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@testsprite/testsprite-cli\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/@testsprite/testsprite-cli?color=19C379\u0026label=npm\" alt=\"npm version\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@testsprite/testsprite-cli\"\u003e\u003cimg src=\"https://img.shields.io/npm/dm/@testsprite/testsprite-cli?color=19C379\u0026label=downloads\" alt=\"npm downloads\"\u003e\u003c/a\u003e\n  \u003ca href=\"#quickstart\"\u003e\u003cimg src=\"https://img.shields.io/badge/node-%3E%3D20-19C379\" alt=\"Node \u003e= 20\"\u003e\u003c/a\u003e\n  \u003ca href=\"./LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-Apache%202.0-0A0A0A\" alt=\"License Apache 2.0\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/TestSprite/testsprite-cli/actions/workflows/ci.yml\"\u003e\u003cimg src=\"https://github.com/TestSprite/testsprite-cli/actions/workflows/ci.yml/badge.svg\" alt=\"CI\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp\u003e\n  \u003ca href=\"https://www.testsprite.com\"\u003e\u003cimg src=\"https://img.shields.io/badge/testsprite.com-19C379?style=for-the-badge\u0026logoColor=white\" alt=\"Website\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.testsprite.com/docs\"\u003e\u003cimg src=\"https://img.shields.io/badge/Docs-0A0A0A?style=for-the-badge\" alt=\"Docs\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://x.com/Test_Sprite\"\u003e\u003cimg src=\"https://img.shields.io/badge/Follow%20on%20X-000000?style=for-the-badge\u0026logo=x\u0026logoColor=white\" alt=\"Follow on X\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.linkedin.com/company/testsprite\"\u003e\u003cimg src=\"https://img.shields.io/badge/LinkedIn-0A66C2?style=for-the-badge\u0026logo=linkedin\u0026logoColor=white\" alt=\"LinkedIn\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://discord.gg/W4JDrZfdB\"\u003e\u003cimg src=\"https://img.shields.io/badge/Join%20our%20Discord-5865F2?style=for-the-badge\u0026logo=discord\u0026logoColor=white\" alt=\"Join our Discord\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n⭐ _Help us reach more developers and grow the TestSprite community. Star this repo!_\n\n\u003c/div\u003e\n\nhttps://github.com/user-attachments/assets/eca90a91-93ef-49f6-8d13-86b4eb25f4cf\n\n\u003cp align=\"center\"\u003e\u003csub\u003e\u003cb\u003e▶ Watch the launch video\u003c/b\u003e — the three hard limits every coding agent hits, and the loop that breaks them (4 min).\u003c/sub\u003e\u003c/p\u003e\n\n---\n\n## What is it?\n\n[TestSprite](https://www.testsprite.com) 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.\n\nIt puts that platform in your coding agent's hands: the agent verifies every behavior it ships, and what broke comes back as **one self-consistent bundle** it can act on — no dashboard scraping. Humans drive the same surface from a terminal or CI.\n\n## ⭐️ Star the Repository\n\n\u003cimg width=\"900\" height=\"506\" alt=\"testsprite-repo-star-fast\" src=\"https://github.com/user-attachments/assets/8c3975df-8d47-4d6c-a485-135b80f779a5\" /\u003e\n\nIf 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.\n\n## Quickstart\n\nRequires **Node.js ≥ 20**. (No global install? `npx @testsprite/testsprite-cli` works too.)\n\n```bash\nnpm install -g @testsprite/testsprite-cli\ntestsprite init\n```\n\n`testsprite init` prompts for your [API key](https://www.testsprite.com), verifies it, and installs the verification-loop skill for your coding agent (`claude`, `cursor`, `cline`, `antigravity`, `codex`, etc.). Non-interactive (CI / onboarding scripts):\n\n```bash\nTESTSPRITE_API_KEY=sk-... testsprite init --from-env --yes --agent claude\n```\n\nFrom there, the loop runs on its own — an example session, typed by the coding agent:\n\n```bash\n# 1 — describe the behavior you want to guarantee, run it, wait\ntestsprite test create --project proj_8f0f6 --type frontend \\\n  --plan-from ./checkout-flow.plan.json --run --wait --output json\n#   → exits 1: the run failed\n\n# 2 — pull ONE self-consistent failure bundle\ntestsprite test failure get test_3a9f21c7 --out ./.testsprite/failure\n\n# 3 — the agent reads the bundle, fixes the code, then replays\ntestsprite test rerun test_3a9f21c7 --wait --output json\n#   → exits 0: passed. The test now lives in your durable suite.\n```\n\nPrefer to configure each step by hand (or learn the surface offline with `--dry-run` first)? See [Manual setup](./DOCUMENTATION.md#manual-setup) and [Install \u0026 verify](./DOCUMENTATION.md#install--verify).\n\n## Commands\n\n| Group     | Command                                             | What it does                                                                                                          |\n| --------- | --------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |\n| **Init**  | `init`                                              | One-shot onboarding: auth configure + whoami + agent install                                                          |\n| **Auth**  | `auth configure`                                    | Store an API key at `~/.testsprite/credentials`                                                                       |\n|           | `auth whoami` _(alias `status`)_                    | Resolve the active profile to its user, key, env, and scopes                                                          |\n|           | `auth logout`                                       | Remove the active profile from the credentials file                                                                   |\n| **Read**  | `project list` / `project get`                      | List projects / fetch one by id                                                                                       |\n|           | `test list` / `test get`                            | List tests under a project / fetch one by id                                                                          |\n|           | `test code get`                                     | Print (or write) the generated test source                                                                            |\n|           | `test steps`                                        | List the latest run's steps with screenshot / DOM pointers                                                            |\n|           | `test result`                                       | Latest result; `--history` lists a test's prior runs                                                                  |\n|           | `test failure get`                                  | The agent entry point: one self-contained latest-failure bundle                                                       |\n|           | `test failure summary`                              | One-screen triage card (no media download)                                                                            |\n| **Write** | `test create` / `test create-batch`                 | Create a test (or bulk-create from a plan file); `--produces` / `--needs` / `--category` wire BE dependency metadata  |\n|           | `test update` / `test delete` / `test delete-batch` | Edit metadata / soft-delete                                                                                           |\n|           | `test code put`                                     | Replace generated code (etag-guarded)                                                                                 |\n|           | `test plan put`                                     | Replace a frontend test's plan-steps                                                                                  |\n|           | `project create` / `project update`                 | Manage projects                                                                                                       |\n| **Run**   | `test run`                                          | Trigger a fresh run; `--wait` blocks until terminal; `--all --project \u003cid\u003e` runs all tests in a project in wave order |\n|           | `test rerun`                                        | Cheap replay of one/many tests (FE verbatim; BE with deps); `--all --project \u003cid\u003e` reruns all tests                   |\n|           | `test wait`                                         | Block on a `runId` until terminal                                                                                     |\n|           | `test artifact get`                                 | Download the failure bundle for a specific `runId`                                                                    |\n| **Agent** | `agent install` / `agent list`                      | Onboard a coding agent (pure-local); targets: `claude`, `codex`, `cursor`, `cline`, `antigravity`                     |\n\n📚 **Full reference — every command, flag, and example:** [DOCUMENTATION.md](./DOCUMENTATION.md), including [configuration \u0026 profiles](./DOCUMENTATION.md#configuration), [scripting](./DOCUMENTATION.md#output--scripting), and [exit codes](./DOCUMENTATION.md#exit-codes).\n\n## Why a CLI for coding agents?\n\n- 🧪 **Tests like a real user.** Runs against a live browser or API in the cloud — real clicks, real navigation, real assertions. Not a mock.\n- 🤖 **Agent-shaped output.** `test failure get` returns **one bundle** — the failing step, its neighbors, screenshots, DOM snapshots, the test source, a root-cause hypothesis, and a recommended fix target — all sharing a single `snapshotId`. The CLI _refuses_ to stitch data from two different runs, so an agent never reasons over a frankenstein context.\n- ♻️ **A loop, not a one-shot.** `create → run → failure get → fix → rerun` — every pass is banked, not thrown away.\n- 📐 **Scriptable \u0026 deterministic.** Stable `--output json` contract, predictable [exit codes](./DOCUMENTATION.md#exit-codes), and a `--dry-run` that exercises the full code path offline with canned data.\n- 🔌 **One command to onboard your agent.** `testsprite agent install claude` drops a ready-made skill file into your repo so your coding agent knows how to drive the loop on its own.\n\n## How it works\n\nEvery time your agent changes code, it asks one question: **is this behavior already covered by the suite?**\n\n- **Not yet covered** → `testsprite test create` — describe the new behavior, run it.\n- **Already covered** → `testsprite test rerun` — replay the existing tests, so nothing that used to work breaks silently.\n- **Something fails** → `testsprite test failure get` — one self-consistent bundle; the agent fixes the code and reruns.\n\nEvery 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.\n\n```mermaid\nflowchart TD\n    A[\"🤖 Your coding agent\u003cbr/\u003eClaude Code · Codex · Antigravity · Kimi · Cursor · Trae …\"]\n    D{\"behavior already\u003cbr/\u003ecovered by the suite?\"}\n    B[\"\u003cb\u003etestsprite test create\u003c/b\u003e\u003cbr/\u003enew behavior → new test\"]\n    R[\"\u003cb\u003etestsprite test rerun\u003c/b\u003e\u003cbr/\u003ereplay the existing tests\"]\n    C{{\"☁️ TestSprite testing agent\u003cbr/\u003eruns the test like a real user against\u003cbr/\u003ereal browsers \u0026 real APIs on Cloud\"}}\n    F[\"\u003cb\u003etestsprite test failure get\u003c/b\u003e\u003cbr/\u003eONE self-consistent bundle:\u003cbr/\u003efailing step · screenshots · DOM ·\u003cbr/\u003eroot-cause · recommended fix\"]\n    S[(\"📚 Durable integration suite\u003cbr/\u003egrows with every pass\")]\n\n    A --\u003e|\"writes / changes code\"| D\n    D --\u003e|\"no — new behavior\"| B\n    D --\u003e|\"yes\"| R\n    B --\u003e C\n    R --\u003e C\n    C --\u003e|\"pass ✅\"| S\n    C --\u003e|\"fail ❌\"| F\n    F --\u003e|\"agent reads the bundle\u003cbr/\u003e\u0026 fixes the code\"| A\n    S -.-\u003e|\"defines what's covered\"| D\n```\n\nThe 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.\n\n## Proved in public\n\nOn [**CoderCup**](https://codercup.ai) — 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.\n\nThat'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.\n\n## Getting help\n\n- 📚 **CLI reference** — [DOCUMENTATION.md](./DOCUMENTATION.md)\n- 🌐 **Platform docs** — [testsprite.com/docs](https://www.testsprite.com/docs)\n- 🐛 **Issues \u0026 feature requests** — [GitHub issues](https://github.com/TestSprite/testsprite-cli/issues)\n- 💬 **Quick questions** — [Discord](https://discord.gg/W4JDrZfdB), or `testsprite --help` / `testsprite test run --help` right in your terminal\n- 📝 **Changelog** — [CHANGELOG.md](./CHANGELOG.md)\n\n## Contributing\n\nContributions are welcome — the CLI is plain TypeScript/Node (≥ 20), tested with Vitest, built with `tsc`. Getting a dev loop running takes a minute:\n\n```bash\ngit clone https://github.com/TestSprite/testsprite-cli.git\ncd testsprite-cli \u0026\u0026 npm install\nnpm run build       # tsc → dist/ ; try it: node dist/index.js --help\nnpm test            # unit suite — no network or credentials needed\nnpm run lint:fix    # ESLint\nnpm run typecheck   # tsc --noEmit\n```\n\nPull requests target the `dev` branch. The full guide — build from source, test tiers, CI gates, branches, project layout — is in [CONTRIBUTING.md](./CONTRIBUTING.md).\n\n**Support** — if you need any help, we're responsive on [Discord](https://discord.gg/W4JDrZfdB), and feel free to email us at [contact@testsprite.com](mailto:contact@testsprite.com) too.\n\n## License\n\n[Apache-2.0](./LICENSE) © TestSprite\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftestsprite%2Ftestsprite-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftestsprite%2Ftestsprite-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftestsprite%2Ftestsprite-cli/lists"}