Playwright CLI + OpenCode browser automation tutorial

Learn to give OpenCode browser control with Playwright CLI, automate support tickets, and turn repeated workflows into reusable tools.

Player not loading? Watch on YouTube

This tutorial pairs OpenCode with Playwright CLI to automate browser tasks in a locally hosted osTicket installation. The speaker covers installation and says agents can load the bundled skill through the CLI help command. They describe the CLI as more token efficient than Playwright MCP because it avoids loading large tool schemas and verbose accessibility trees into model context. That comparison is the speaker's account of the README, rather than an independent benchmark.

The first example submits a support ticket using contact details stored in memory.md. The walkthrough explains how page logs and accessibility snapshots give the coding assistant references for fill and click commands. A custom browser worker and orchestrator skill then handle a larger request: submit four tickets, assign them, and close an earlier issue. The presenter manually enters login details before the agent continues with admin tasks.

For recurring work, the speaker converts the browser workflow into reusable OpenCode tools, with several rounds of testing. They report a completion time of 5 minutes 26 seconds for the revised run; the suggested 2 to 3 minutes is a possible future improvement. The practical recommendation is to use a skill for exploratory tasks and custom tools for repeated workflows, particularly when a web application lacks a usable API.