Shortest: AI-Powered Natural Language End-to-End Testing Framework
This repository profile is provided by osrepos.com, an open source repository discovery platform.
Summary
Shortest is an innovative AI-powered end-to-end testing framework that leverages natural language for test creation and execution. Built on Playwright and utilizing the Anthropic Claude API, it simplifies the QA process by allowing users to define tests in plain English. This tool integrates seamlessly into development workflows, offering features like GitHub 2FA support and email validation.
Repository Information
Topics
Click on any tag to explore related repositories
Use at your own risk
OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.
Introduction
Shortest is an advanced AI-powered end-to-end testing framework designed to streamline quality assurance through natural language. It enables developers and QA engineers to write comprehensive tests using plain English, abstracting away complex automation details. Built on top of Playwright, Shortest provides robust browser automation capabilities, enhanced by the intelligence of the Anthropic Claude API for dynamic test execution.
Key features include:
- Natural language-driven E2E testing.
- AI-powered test execution using Anthropic Claude API.
- Foundation on Playwright for reliable browser interaction.
- Seamless GitHub integration, including 2FA support.
- Email validation capabilities with Mailosaur.
Installation
Getting started with Shortest is straightforward. Use the shortest init command to quickly set up the framework in your project.
npx @antiwork/shortest init
This command automates several steps:
- Installs the
@antiwork/shortestpackage as a dev dependency if not already present. - Creates a default
shortest.config.tsfile with boilerplate configuration. - Generates a
.env.localfile (if absent) with placeholders for essential environment variables, such asANTHROPIC_API_KEY. - Adds
.env.localand.shortest/to your.gitignorefile.
After installation, configure your shortest.config.ts file and provide your Anthropic API key.
import type { ShortestConfig } from "@antiwork/shortest";
export default {
headless: false,
baseUrl: "http://localhost:3000",
browser: {
contextOptions: {
ignoreHTTPSErrors: true
},
},
testPattern: "**/*.test.ts",
ai: {
provider: "anthropic",
},
} satisfies ShortestConfig;
Examples
Shortest offers a flexible and powerful way to define your tests.
Basic Test
Create test files following the pattern specified in your configuration, for example, app/login.test.ts:
import { shortest } from "@antiwork/shortest";
shortest("Login to the app using email and password", {
username: process.env.GITHUB_USERNAME,
password: process.env.GITHUB_PASSWORD,
});
Using Callback Functions
You can extend tests with callback functions for additional assertions or logic after the browser execution.
import { shortest } from "@antiwork/shortest";
import { db } from "@/lib/db/drizzle";
import { users } from "@/lib/db/schema";
import { eq } from "drizzle-orm";
shortest("Login to the app using username and password", {
username: process.env.USERNAME,
password: process.env.PASSWORD,
}).after(async ({ page }) => {
const clerkId = await page.evaluate(() => {
return window.localStorage.getItem("clerk-user");
});
if (!clerkId) {
throw new Error("User not found in database");
}
const [user] = await db
.select()
.from(users)
.where(eq(users.clerkId, clerkId))
.limit(1);
expect(user).toBeDefined();
});
Lifecycle Hooks
Execute code before and after test suites or individual tests using lifecycle hooks.
import { shortest } from "@antiwork/shortest";
shortest.beforeAll(async ({ page }) => {
// Setup before all tests
});
shortest.beforeEach(async ({ page }) => {
// Setup before each test
});
shortest.afterEach(async ({ page }) => {
await page.close();
});
shortest.afterAll(async ({ page }) => {
// Teardown after all tests
});
Chaining Tests
Shortest supports chaining tests for sequential execution or reusable test flows.
// Sequential test chain
shortest([
"user can login with email and password",
"user can modify their account-level refund policy",
]);
// Combine flows with spread operator
const loginAsLawyer = "login as lawyer with valid credentials";
const allAppActions = ["send invoice to company", "view invoices"];
shortest([loginAsLawyer, ...allAppActions]);
API Testing
Test API endpoints using natural language descriptions or explicit requests.
const req = new APIRequest({
baseURL: API_BASE_URI,
});
shortest(
"Ensure the response contains only active users",
req.fetch({
url: "/users",
method: "GET",
params: new URLSearchParams({
active: true,
}),
}),
);
Or a simpler natural language approach:
shortest(`
Test the API GET endpoint ${API_BASE_URI}/users with query parameter { "active": true }
Expect the response to contain only active users
`);
Why Use Shortest?
Shortest revolutionizes the testing process by making it more accessible and efficient. Its natural language interface allows non-technical team members to understand and even contribute to test definitions, fostering better collaboration. The integration of AI, specifically Anthropic Claude, enables more dynamic and intelligent test execution, adapting to UI changes and reducing maintenance overhead. With its Playwright foundation, Shortest ensures reliable and robust end-to-end testing across various browsers. Features like GitHub 2FA login and Mailosaur email validation address common real-world testing challenges, making it a comprehensive solution for modern web applications.
Links
- GitHub Repository: https://github.com/antiwork/shortest
- NPM Package: https://www.npmjs.com/package/@antiwork/shortest
- Video Tutorial: https://github.com/antiwork/shortest/issues/143#issuecomment-2564488173
- CI Setup Example: https://github.com/antiwork/shortest/blob/main/.github/workflows/shortest.yml
Related repositories
Similar repositories that may be relevant next.

TeamAI-CLI: Empowering Teams to Become AI Native with a Git-Based Foundation
September 24, 2026
TeamAI-CLI, developed by Tencent, is a powerful command-line interface aimed at making every team AI native. It offers a unified, Git-based platform for teams to collaborate, learn, and continuously improve with AI. This tool transforms individual AI capabilities into shared team assets, integrating AI agents, machines, and team members for enhanced efficiency.

LLM Wiki: Build a Self-Maintaining, Interlinked Knowledge Base with AI
September 23, 2026
LLM Wiki is a powerful cross-platform desktop application designed to transform your documents into an organized, interlinked knowledge base automatically. Unlike traditional RAG systems, it incrementally builds and maintains a persistent wiki from your sources, ensuring knowledge is compiled once and kept current. This innovative approach offers a dynamic and evolving personal knowledge management solution.

Maka: A High-Performance Agent Workspace for AI Tasks
September 21, 2026
Apache Maka (Incubating) is a high-performance agent workspace designed to maintain a complete, append-only record of all agent actions. It focuses on measurable performance, local-first operation, and robust recovery mechanisms. This project provides a unified execution authority for desktop, TUI, and CLI clients, ensuring consistent agent behavior across platforms.

OpenMausBot: Your Open-Source AI Bot Team in a Chat App
September 20, 2026
OpenMausBot is an open-source desktop application that provides an alternative to Grok Bot, allowing users to manage a team of AI agents within a chat interface. It emphasizes local-first operation, bringing your own agents, and providing each bot with its own virtual machine or access to your computer. This project enables powerful AI interactions with privacy and control at its core.
Source repository
Open the original repository on GitHub.
16 counted GitHub visits