Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save peterberkenbosch/71c1c72c0294a9593989bf8b76977260 to your computer and use it in GitHub Desktop.

Select an option

Save peterberkenbosch/71c1c72c0294a9593989bf8b76977260 to your computer and use it in GitHub Desktop.
Setting up Playwright CLI with system Chromium on Omarchy + global skills for OpenCode and Claude Code

Using Playwright CLI with System Chromium on Omarchy

A quick guide to configuring Playwright CLI to use your system-installed Chromium browser instead of downloading its own, plus enabling skills for both OpenCode and Claude Code.

The Problem

By default, Playwright downloads its own browser binaries. But on Omarchy (and many Linux setups), you already have Chromium installed at /usr/bin/chromium. Why download another 100MB+ when you can use what you have?

The Solution

1. Create the Config File

Playwright CLI automatically loads config from ~/.playwright/cli.config.json:

{
  "browser": {
    "browserName": "chromium",
    "launchOptions": {
      "executablePath": "/usr/bin/chromium"
    }
  }
}

The key is browser.launchOptions.executablePath — this tells Playwright exactly which browser binary to use.

2. Install Skills Globally

Playwright CLI comes with excellent AI agent skills. Install them for both your coding agents:

# Install skills (goes to ~/.claude/skills/ for Claude Code)
playwright-cli install --skills

# Symlink for OpenCode
ln -s ~/.claude/skills/playwright-cli ~/.config/opencode/skills/playwright-cli

Now both Claude Code and OpenCode can use commands like:

  • playwright-cli open https://example.com
  • playwright-cli snapshot
  • playwright-cli click e5

Why This Matters

  1. Save disk space — No duplicate browser downloads
  2. Faster setup — Skip the 174MB download
  3. Consistency — Use the same browser your system uses
  4. AI-powered browsing — Your coding agents can now navigate, screenshot, and interact with web pages

Testing It

# Should use your system Chromium
playwright-cli open https://playwright.dev --headed

No downloads, no waiting — just works with what you have.


Setup tested on Omarchy Linux with Chromium at /usr/bin/chromium

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment