KushoAI
All Resources View on GitHub Book a demo
Open Source

KushoAI UI Testing TUI

Record a UI flow once. AI generates an exhaustive Playwright test suite.

Node.js 18+ Playwright OpenAI / Anthropic / Gemini MIT License

What It Does

Writing UI tests by hand is slow and tedious. You interact with a page, then translate every click and input into Playwright code, then do it again for the edge cases, the error states, and the boundary conditions. Most teams end up with happy-path coverage at best.

KushoAI UI Testing TUI changes that workflow. You record your user flow once in a real browser, and the tool uses AI to expand that single recording into a full test suite covering multiple input variations, edge cases, and error scenarios. The heavy lifting is automated. You stay in the terminal the entire time.

The core loop:

  • Record a user flow using Playwright's browser recorder. No code required.
  • Review the generated Playwright script in your terminal editor and make any adjustments.
  • Extend the recording with AI: the tool produces multiple test variations, edge cases, and optional custom scenarios based on plain-English instructions you provide.
  • Run the full test suite headlessly or with a visible browser, with optional video recording and detailed HTML reports.

Everything runs locally. Your API keys are stored in ~/.kusho-credentials and never sent anywhere beyond your chosen LLM provider.

Who it is for
Developers and QA engineers who want real test coverage without spending hours writing Playwright scripts by hand. Works on any web application.
What you need
Node.js 18 or later, Git, a terminal editor (Vim or Nano), and an API key from OpenAI, Anthropic, or Google Gemini.

The Interactive TUI Menu

If you prefer a guided experience over typing commands, run kusho ui to open the interactive menu. Every step in the flow below — credentials, recording, test generation, and running — is available here with arrow-key navigation and no flags to remember.

This is a good starting point if you are new to the tool. Press Esc or Ctrl+C at any prompt to cancel and return to the main menu.

kusho ui
kusho ui interactive TUI menu
Menu option What it does
Record Prompts for URL, device, viewport, target language, and output filename, then opens the Playwright browser recorder
Extend Pick a recording from the list and let AI expand it into a full suite of test variations and edge cases
Kusho Edit Pick an extended test and refine it interactively with plain-English instructions
Run Pick an extended test suite and choose headless or headed mode, with optional video recording
Run recording Pick a raw recording and run it directly, useful for debugging the original captured flow
Update credentials Switch your LLM provider or update your API key
Demo Opens the Playwright recorder on the demo to-do app at demo.playwright.dev/todomvc
Quit Exit the TUI
1

Install

Clone the repository, install dependencies, and link the kusho command globally so it is available from any directory.

# Clone and enter the repo git clone https://github.com/kusho-co/kusho-ui-testing-tui.git cd kusho-ui-testing-tui # Install dependencies and Playwright browser binaries npm install npx playwright install # Link globally so `kusho` works from anywhere npm link

After linking, verify the install worked:

kusho --help

Node.js 18 or later is required. If you do not have it, install via nvm install 18 && nvm use 18, or download from nodejs.org.

2

Configure Your LLM Provider

This step is also available as "Update credentials" in the kusho ui menu.

Before recording, tell KushoAI which LLM to use for test generation. Run the credentials command and follow the prompts:

kusho credentials

You will be asked to pick a provider and paste in your API key. Three providers are supported:

  • OpenAI (default model: gpt-4o)
  • Anthropic (default model: claude-haiku-4-5-20251001)
  • Gemini (default model: gemini-2.5-flash)

You can override the default model during setup. Your credentials are saved to ~/.kusho-credentials locally and used only when calling your chosen provider. Run kusho credentials again at any time to switch providers or update your key.

kusho credentials setup screen
3

Record a User Flow

This step is also available as "Record" in the kusho ui menu.

Launch the recorder with a URL (or without one to enter it interactively). A browser window opens. Perform the actions you want to test — navigate, click, fill forms, submit. When you are done, close the browser.

# Record from a specific URL kusho record https://your-app.com # Record with device emulation kusho record --device "iPhone 13" https://your-app.com # Record with a custom viewport kusho record --viewport "1280,720" https://your-app.com

After you close the browser, the generated Playwright script opens in your terminal editor. Review it, make any corrections, and save to continue. The script is saved to kusho-tests/recordings/.

Want to try it out before recording your own app? Run the built-in demo against Playwright's sample to-do app:

kusho demo
4

Generate the Full Test Suite

This step is also available as "Extend" and "Kusho Edit" in the kusho ui menu.

Once you have a recording, the kusho extend command sends it to the LLM and generates an expanded test suite with multiple variations, edge cases, and error scenarios.

# Extend the most recent recording kusho extend latest # Extend a specific recording file kusho extend kusho-tests/recordings/my-flow.js

After saving the reviewed script, you will be prompted for optional instructions to guide AI generation:

Any specific instructions for generating test variations? (Press Enter to skip): > add error handling tests and verify error messages are displayed correctly

Generated test suites land in kusho-tests/extended-tests/. You can further refine any generated suite using plain-English edit instructions:

kusho edit latest # Interactive loop: describe what to change, then type "done" when finished Edit instruction: add assertions for the page title Edit instruction: done
5

Run Tests

This step is also available as "Run" and "Run recording" in the kusho ui menu.

Run any extended test suite from kusho-tests/extended-tests/. Tests run headlessly by default. Add --headed to see the browser, and --record to capture screenshots and video.

# Run latest test suite kusho run latest # Run a named test suite kusho run my-flow # Run with visible browser and video recording kusho run my-flow --headed --record # Run a raw recording (useful for debugging) kusho run-recording latest

After the run completes, you get a detailed HTML report with pass/fail results, screenshots, video (if --record was used), performance timing, and error details for any failures.

Prefer a guided experience over direct commands? Run kusho ui to open the full interactive TUI menu, which walks through every step with arrow-key navigation.

Command Reference

Command What it does
kusho ui Open the interactive TUI menu with arrow-key navigation for all actions
kusho record [url] Open a browser recorder. Close the browser when done to save the Playwright script
kusho extend [file|latest] Use AI to expand a recording into a full test suite with variations and edge cases
kusho edit [file|latest] Interactively refine a generated test file using plain-English instructions
kusho run [name|latest] Execute an extended test suite. Flags: --headed, --record
kusho run-recording [name|latest] Run a raw recording directly, useful for debugging the original flow
kusho credentials Set or update your LLM provider and API key
kusho demo Launch the recorder on Playwright's demo to-do app to try the tool without your own app

Recording Options

Flag Description
-d, --device <name> Emulate a device (e.g., iPhone 13, Pixel 5)
-v, --viewport <WxH> Set viewport size (e.g., 1280,720)
-t, --target <lang> Output language: javascript, python, etc.
-o, --output <filename> Custom filename for the generated recording
--no-wait-enhancement Disable automatic wait-stabilization added to recorded scripts

Star it, fork it, or contribute

KushoAI UI Testing TUI is open source under the MIT license. The full README, issue tracker, and contribution guide are on GitHub.

View on GitHub