KushoAI UI Testing TUI
Record a UI flow once. AI generates an exhaustive Playwright test suite.
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.
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.
| 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 |
Install
Clone the repository, install dependencies, and link the kusho command globally so it is available from any directory.
After linking, verify the install worked:
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.
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:
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.
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.
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:
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.
After saving the reviewed script, you will be prompted for optional instructions to guide AI generation:
Generated test suites land in kusho-tests/extended-tests/. You can further refine any generated suite using plain-English edit instructions:
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.
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.