trywright
v1.0.9
Published
Visual Playwright browser sessions with an interactive UI — explore, debug, and automate without writing test code
Maintainers
Readme
Trywright
Try playwright without touching code — a local daemon that spins up a live browser session (via Playwright) with a web UI for interactive exploration, debugging, and scripting.
What is Trywright?
Trywright is a local control panel that lets you instantly explore any website through Playwright's eyes — no code, no IDE required.
Open the web UI at localhost:3333, launch a session pointed at any URL, and then:
- Live preview — see a real-time screenshot of the page inside a browser, tablet, or phone frame
- Interactive REPL — type Playwright expressions (
page.title(),page.locator('h1').textContent()) and see the result instantly - Console log capture — all
console.log,console.error, and network errors from the page appear in the Console tab - API reference — searchable cheatsheet with expandable examples, click any method to insert it into the REPL
- Multi-browser — switch between Chromium, Firefox, and WebKit
- Headed or headless — run in headless mode (preview in UI) or headed mode (interact with the desktop window directly)
Product vision mission and measure of success
Vision
A world where anyone — regardless of their experience with test automation — can instantly understand how Playwright sees and interacts with any website, without writing a single line of code.
Mission
Trywright is a local control panel that removes the barrier between curiosity about Playwright and actually understanding it. It gives developers, QA engineers, and anyone learning browser automation three things without touching a file, opening an IDE, or creating a project:
- See: launch any website in any Playwright-supported browser, headed or headless, and observe exactly what Playwright sees.
- Learn: explore the Playwright page API interactively through a live REPL wired to a real browser session. Build intuition through direct experience, not documentation.
- Understand: verify how a specific Playwright API command behaves under a specific combination of browser, operating system, and Playwright version — before committing to writing any test code.
What Trywright is not
Trywright deliberately sits at one moment in a developer's journey — before any test code exists. It is not a test runner, not a code generator, not a CI debugging tool, and not a replacement for Playwright's own codegen or UI mode. Those tools serve a later stage. Trywright serves the stage before them.
The measure of success
Someone who has never used Playwright should be able to install Trywright, open it, point it at a website they care about, and walk away twenty minutes later with a genuine understanding of what Playwright is and how its API works — without ever leaving their browser.
Installation
npm install -g trywrightPlaywright browser binaries are installed automatically as part of the npm install. If the automatic step is skipped or fails, run it manually:
npx playwright installQuick Start
# Start the daemon in the background
trywright start
# Open the UI — optionally pre-fill a URL
trywright open https://example.com
# Stop the daemon
trywright stopThe UI opens at http://localhost:3333.
CLI Commands
| Command | Description |
|---|---|
| trywright start | Start the daemon in the background |
| trywright start --foreground | Start in the foreground (blocking) |
| trywright stop | Stop the running daemon |
| trywright open [url] | Open the UI in the browser (starts daemon if needed) |
| trywright status | Show running daemon and active sessions |
| trywright cleanup | Close all active Playwright sessions |
| trywright uninstall | Stop the daemon and remove the login startup item |
| trywright --version | Show version |
| trywright --help | Show help |
REPL Examples
Once a session is active, try these in the REPL tab:
// Page metadata
page.title()
page.url()
// Finding elements
page.locator('h1').textContent()
page.locator('a').count()
page.locator('input[type="text"]').first().inputValue()
// Interactions
page.click('button[type="submit"]')
page.fill('#search', 'playwright')
page.keyboard.press('Enter')
page.mouse.wheel(0, 300)
// Navigation
page.goto('https://playwright.dev')
page.reload()
page.goBack()
// Evaluating in the browser
page.evaluate(() => document.querySelectorAll('a').length)
page.evaluate(() => window.innerWidth)Session Modes
| Mode | Description | |---|---| | Headless | Browser runs invisibly; live screenshot streams to the preview pane | | Headed | A real browser window opens on your desktop; use it directly or via REPL |
Device Presets
Choose Desktop (1280×800), Tablet (768×1024), or Mobile (390×844) from the Config tab. The preview pane renders the matching browser, iPad, or iPhone frame.
Configuration
Trywright reads ~/.config/trywright/config.json. The file is created automatically on first run with defaults. Supported options:
{
"port": 3333,
"maxSessions": 3,
"defaultMode": "headless",
"defaultBrowser": "chromium",
"screenshotFps": 10
}| Option | Default | Description |
|---|---|---|
| port | 3333 | Port the daemon listens on |
| maxSessions | 3 | Maximum concurrent Playwright sessions |
| defaultMode | "headless" | Pre-selected mode when the UI loads ("headless" or "headed") |
| defaultBrowser | "chromium" | Pre-selected browser when the UI loads ("chromium", "firefox", or "webkit") |
| screenshotFps | 10 | Screenshot streaming rate in headless mode (frames per second) |
Troubleshooting
Playwright browsers not installed?
Run npx playwright install after installing trywright.
