shortest
Shortest is a TypeScript framework that lets you write end-to-end tests in plain English, using AI (Claude API) to interpret and execute them against your application. It integrates Playwright for browser automation and supports GitHub 2FA, email validation, and test chaining.
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Repository | antiwork/shortest |
| Owner | antiwork |
| Primary language | TypeScript |
| License | MIT — OSI-approved |
| Stars | 5.6k |
| Forks | 334 |
| Open issues | 2 |
| Latest release | v0.4.9 (2025-04-01) |
| Last updated | 2026-05-21 |
| Source | https://github.com/antiwork/shortest |
What shortest is
Built on Playwright, Shortest leverages Anthropic's Claude API to parse natural language test descriptions and execute them as E2E test flows. It includes lifecycle hooks, callback assertions, API testing support, and CI/CD integration via headless mode. Configuration is declarative (TypeScript config files), and tests run through a custom CLI runner.
Get the shortest source
Clone the repository and explore it locally.
git clone https://github.com/antiwork/shortest.gitcd shortest# follow the project's README for install & configurationNeed it deployed, integrated, or customized instead? DEV.co ships production installs.
Best use cases
Implementation considerations
- Anthropic API key must be provisioned and stored securely in CI/CD; costs should be tracked and budgeted per sprint.
- Test files follow a simple `*.test.ts` pattern; minimal ramp-up for teams familiar with Jest/Mocha conventions.
- Lifecycle hooks (`beforeAll`, `beforeEach`, `afterEach`, `afterAll`) and callback assertions enable flexible test composition; plan for shared setup (auth, DB state).
- CLI supports line-number-based test execution and selective file runs; integrate with CI workflows similar to Playwright or Jest.
- Browser context options (e.g., `ignoreHTTPSErrors`) are configurable; environment-specific overrides (local vs. staging) should be parameterized.
When to avoid it — and what to weigh
- Strict cost control on AI API usage — Every test run invokes the Anthropic Claude API. High test volume or frequent reruns will incur per-token costs; no pricing/budget controls mentioned in README.
- Deterministic, reproducible test behavior required — AI interpretation of English descriptions may vary between API versions or model updates. Tests relying on exact execution sequences or timing may become flaky.
- Legacy browser support or non-Playwright stacks — Locked to Playwright; no mention of Safari, Internet Explorer, or mobile browser support. If you need those, you'll need a different framework.
- Minimal external dependencies or offline-first testing — Requires real-time API calls to Anthropic; no option for local/offline test execution mentioned. Network outages or API rate limits will block test runs.
License & commercial use
MIT License. Permissive OSI-approved license allowing free commercial use, modification, and distribution with attribution required.
MIT is a permissive open-source license suitable for commercial use. No restrictions on proprietary applications using Shortest as a dependency. However, verify that your use of the Anthropic Claude API is compliant with Anthropic's terms of service (separate from the software license).
DEV.co evaluation signals
Editorial assessment — not user reviews. Directional, with an explicit confidence level.
| Signal | Assessment |
|---|---|
| Maintenance | Active |
| Documentation | Strong |
| License clarity | Clear |
| Deployment complexity | Low |
| DEV.co fit | Good |
| Assessment confidence | High |
Anthropic API keys must be treated as secrets and never committed to version control. The `.env.local` is added to `.gitignore` by default. Test files may contain hardcoded credentials (e.g., test usernames/passwords); use environment variables instead. AI model receives test descriptions and page content; review what sensitive data is sent to Anthropic. Playwright browser context options allow disabling HTTPS validation (`ignoreHTTPSErrors`); avoid in production testing. No explicit mention of input sanitization or injection protection in AI prompts.
Alternatives to consider
Playwright + custom assertion helpers
Direct Playwright scripting avoids AI API costs and non-determinism, but requires more boilerplate and higher bar for non-engineers to contribute tests.
Cypress or WebdriverIO
Established E2E frameworks with larger ecosystems, better IDE support, and synchronous syntax. No AI overhead, but also no natural language abstraction.
OpenTest or Testim (commercial AI-driven tools)
Proprietary platforms offering codeless/low-code AI E2E testing with visual recorders and enterprise dashboards. Higher cost but less engineering overhead.
Build on shortest with DEV.co software developers
Shortest transforms test writing from imperative code to plain English. Start with `npx @antiwork/shortest init` and evaluate whether natural language tests fit your team's workflow and Anthropic API costs.
Talk to DEV.coRelated open-source tools
Surfaced by semantic similarity across the DEV.co open-source index.
Related on DEV.co
Explore the category and the services that help you build with it.
shortest FAQ
What happens if the AI misinterprets a test description?
Can I run Shortest without paying for Anthropic's API?
Does Shortest support mobile or cross-browser testing?
How does Shortest compare to GitHub's native test automation?
Work with a software development agency
From first prototype to production, DEV.co delivers software development services around tools like shortest. Our software development agency staffs experienced software developers and web developers for custom software development, web development, integrations, and ongoing support across open-source testing and beyond.
Ready to simplify your E2E testing?
Shortest transforms test writing from imperative code to plain English. Start with `npx @antiwork/shortest init` and evaluate whether natural language tests fit your team's workflow and Anthropic API costs.