Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License Release Stars

Perplexity WebUI Search

Perplexity WebUI Search

A portable Agent Skill that queries Perplexity through its web UI using Playwright browser automation — no API key required.

🇬🇧 English · 🇫🇷 Français

Table of Contents

What is this?

A universal Agent Skill that enables any AI coding agent — OpenCode, Claude Code, Codex CLI — to perform web searches through Perplexity's interface. It launches Chromium, navigates to perplexity.ai, submits a query, captures the generated answer from the clipboard, and writes it to a Markdown file.

No API key. No subscription. Just browser automation.

(back to top)

Features

  • Browser automation — Launches Chromium, navigates Perplexity, submits queries
  • Answer extraction — Clicks "Copy" on the generated response, reads from clipboard
  • Retry logic — Handles empty clipboard, slow responses, and transient failures (3 retries)
  • Markdown output — Saves answers as .md files preserving Perplexity's formatting
  • Multi-agent — Works with OpenCode, Claude Code, and Codex CLI out of the box
  • Clean I/O — Stderr for logs, stdout for output — pipe-friendly

(back to top)

Built With

  • Node.js — Runtime
  • Playwright — Browser automation
  • Git — Version control

(back to top)

Quick Start

Prerequisites: Node.js >= 18 and Chromium browsers.

cd skills/perplexity-webui-search
npm install
npx playwright install chromium
npm run search -- "What are the latest Playwright changes?" ./result.md

The command opens Chromium, sends the prompt to Perplexity, copies the answer, saves it to result.md, and prints it to stdout.

(back to top)

Usage

As an Agent Skill

Install into your agent's skill directory:

OpenCode:

npx skills add ./skills --skill perplexity-webui-search --agent opencode --copy

Or copy skills/perplexity-webui-search/ into ~/.config/opencode/skills/.

Codex CLI:

npx skills add ./skills --skill perplexity-webui-search --agent codex --copy

Claude Code and others:

Copy skills/perplexity-webui-search/ into your agent's skills directory.

Direct CLI

node scripts/perplexity-query.js "your query" ./output.md

Output

Answers are saved as plain Markdown. Perplexity's formatting is preserved verbatim from the clipboard.

npm run search -- "What is Rust?" ./rust-overview.md
# → rust-overview.md contains the full Perplexity answer

Checks

npm test              # Unit tests
npm run check         # Syntax validation
npm run pack:dry-run  # Verify publish-ready package

(back to top)

Project Structure

skills/
  perplexity-webui-search/
    scripts/
      perplexity-core.js         # Core: args, retry, Playwright automation
      perplexity-core.test.mjs   # Unit tests
      perplexity-query.js        # CLI entry point
    references/
      install-opencode.md
      install-codex.md
      install-claude.md
      troubleshooting.md
    LICENSE
    README.md
    SKILL.md
    package.json
docs/
  assets/
    logo.png
.gitignore
LICENSE
README.md
README.fr.md

(back to top)

Documentation

Document Description
Install — OpenCode Setup guide for OpenCode users
Install — Codex CLI Setup guide for Codex CLI users
Install — Claude Code Setup guide for Claude Code / compatible agents
Troubleshooting Common issues and solutions
Skill Spec Agent skill manifest and schema
Tests Unit test suite (arg parsing, retry logic, clipboard)

(back to top)

Contributing

Contributions are welcome. This is a public project — fork, branch, and open a PR.

  1. Fork the repo
  2. Create a feature branch (git checkout -b feat/amazing-feature)
  3. Commit your changes (git commit -m "feat: add amazing feature")
  4. Push to the branch (git push origin feat/amazing-feature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE for more information.

(back to top)


Star History Chart

About

Universal Agent Skill for querying Perplexity through the web UI with Playwright.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages