SkillAgentSearch skills...

OpenCLI

Make Any Website & Tool Your CLI. A universal CLI Hub and AI-native runtime. Transform any website, Electron app, or local binary into a standardized command-line interface. Built for AI Agents to discover, learn, and execute tools seamlessly via a unified AGENT.md integration.

Install / Use

/learn @jackwener/OpenCLI
About this skill

Quality Score

0/100

Supported Platforms

Zed

README

OpenCLI

Turn websites, browser sessions, Electron apps, and local tools into deterministic interfaces for humans and AI agents. Reuse your logged-in browser, automate live workflows, and crystallize repeated actions into reusable CLI commands.

中文文档 npm Node.js Version License

OpenCLI gives you one surface for three different kinds of automation:

  • Use built-in adapters for sites like Bilibili, Zhihu, Xiaohongshu, Reddit, HackerNews, Twitter/X, and many more.
  • Drive a live browser directly with opencli browser when an AI agent needs to click, type, extract, or inspect a page in real time.
  • Generate new adapters from real browser behavior with explore, synthesize, generate, and cascade.

It also works as a CLI hub for local tools such as gh, docker, and other binaries you register yourself, plus desktop app adapters for Electron apps like Cursor, Codex, Antigravity, ChatGPT, and Notion.

Why OpenCLI


Highlights

  • CLI All Electron — CLI-ify apps like Antigravity Ultra! Now AI can control itself natively.
  • Browser Automationbrowser gives AI agents direct browser control: click, type, extract, screenshot — any interaction, fully scriptable.
  • Website → CLI — Turn any website into a deterministic CLI: 70+ pre-built adapters, or crystallize your own with opencli record.
  • Account-safe — Reuses Chrome/Chromium logged-in state; your credentials never leave the browser.
  • Anti-detection built-in — Patches navigator.webdriver, stubs window.chrome, fakes plugin lists, cleans ChromeDriver/Playwright globals, and strips CDP frames from Error stack traces. Extensive anti-fingerprinting and risk-control evasion measures baked in at every layer.
  • AI Agent readyexplore discovers APIs, synthesize generates adapters, cascade finds auth strategies, browser controls the browser directly.
  • External CLI Hub — Discover, auto-install, and passthrough commands to any external CLI (gh, obsidian, docker, etc). Zero setup.
  • Self-healing setupopencli doctor diagnoses and auto-starts the daemon, extension, and live browser connectivity.
  • Dynamic Loader — Simply drop .ts adapters into the clis/ folder for auto-registration.
  • Zero LLM cost — No tokens consumed at runtime. Run 10,000 times and pay nothing.
  • Deterministic — Same command, same output schema, every time. Pipeable, scriptable, CI-friendly.
  • Broad coverage — 79+ sites across global and Chinese platforms (Bilibili, Zhihu, Xiaohongshu, Reddit, HackerNews, and more), plus desktop Electron apps via CDP.

Quick Start

1. Install OpenCLI

npm install -g @jackwener/opencli

2. Install the Browser Bridge Extension

OpenCLI connects to Chrome/Chromium through a lightweight Browser Bridge extension plus a small local daemon. The daemon auto-starts when needed.

  1. Download the latest opencli-extension.zip from the GitHub Releases page.
  2. Unzip it, open chrome://extensions, and enable Developer mode.
  3. Click Load unpacked and select the unzipped folder.

3. Verify the setup

opencli doctor

4. Run your first commands

opencli list
opencli hackernews top --limit 5
opencli bilibili hot --limit 5

For Humans

Use OpenCLI directly when you want a reliable command instead of a live browser session:

  • opencli list shows every registered command.
  • opencli <site> <command> runs a built-in or generated adapter.
  • opencli register mycli exposes a local CLI through the same discovery surface.
  • opencli doctor helps diagnose browser connectivity.

For AI Agents

Use two different entry points depending on the task:

Install the packaged skills with:

npx skills add jackwener/opencli

Or install only what you need:

npx skills add jackwener/opencli --skill opencli-usage
npx skills add jackwener/opencli --skill opencli-browser
npx skills add jackwener/opencli --skill opencli-explorer
npx skills add jackwener/opencli --skill opencli-oneshot

In practice:

  • start with opencli-explorer when the agent needs a reusable command for a site (it covers both automated and manual flows)
  • use opencli-browser when the agent needs to inspect or steer the page directly

Available browser commands include open, state, click, type, select, keys, wait, get, screenshot, scroll, back, eval, network, init, verify, and close.

Core Concepts

browser: live control

Use opencli browser when the task is inherently interactive and the agent needs to operate the page directly.

Built-in adapters: stable commands

Use site-specific commands such as opencli hackernews top or opencli reddit hot when the capability already exists and you want deterministic output.

explore / synthesize / generate: create new CLIs

Use these commands when the site you need is not covered yet:

  • explore inspects the page, network activity, and capability surface.
  • synthesize turns exploration artifacts into evaluate-based YAML adapters.
  • generate runs the verified generation path and returns either a usable command or a structured explanation of why completion was blocked or needs human review.

cascade: auth strategy discovery

Use cascade to probe fallback auth paths such as public endpoints, cookies, and custom headers before you commit to an adapter design.

CLI Hub and desktop adapters

OpenCLI is not only for websites. It can also:

  • expose local binaries like gh, docker, obsidian, or custom tools through opencli <tool> ...
  • control Electron desktop apps through dedicated adapters and CDP-backed integrations

Prerequisites

  • Node.js: >= 20.0.0 (or Bun >= 1.0)
  • Chrome or Chromium running and logged into the target site for browser-backed commands

Important: Browser-backed commands reuse your Chrome/Chromium login session. If you get empty data or permission-like failures, first confirm the site is already open and authenticated in Chrome/Chromium.

Configuration

| Variable | Default | Description | |----------|---------|-------------| | OPENCLI_DAEMON_PORT | 19825 | HTTP port for the daemon-extension bridge | | OPENCLI_WINDOW_FOCUSED | false | Set to 1 to open automation windows in the foreground (useful for debugging) | | OPENCLI_BROWSER_CONNECT_TIMEOUT | 30 | Seconds to wait for browser connection | | OPENCLI_BROWSER_COMMAND_TIMEOUT | 60 | Seconds to wait for a single browser command | | OPENCLI_BROWSER_EXPLORE_TIMEOUT | 120 | Seconds to wait for explore/record operations | | OPENCLI_CDP_ENDPOINT | — | Chrome DevTools Protocol endpoint for remote browser or Electron apps | | OPENCLI_CDP_TARGET | — | Filter CDP targets by URL substring (e.g. detail.1688.com) | | OPENCLI_VERBOSE | false | Enable verbose logging (-v flag also works) | | OPENCLI_DIAGNOSTIC | false | Set to 1 to capture structured diagnostic context on failures |

Update

npm install -g @jackwener/opencli@latest

# If you use the packaged OpenCLI skills, refresh them too
npx skills add jackwener/opencli

Or refresh only the skills you actually use:

npx skills add jackwener/opencli --skill opencli-usage
npx skills add jackwener/opencli --skill opencli-browser
npx skills add jackwener/opencli --skill opencli-explorer
npx skills add jackwener/opencli --skill opencli-oneshot

For Developers

Install from source:

git clone git@github.com:jackwener/opencli.git
cd opencli
npm install
npm run build
npm link

To load the source Browser Bridge extension:

  1. Open chrome://extensions and enable Developer mode.
  2. Click Load unpacked and select this repository's extension/ directory.

Built-in Commands

| Site | Commands | |------|----------| | xiaohongshu | search note comments feed user download publish notifications creator-notes creator-notes-summary creator-note-detail creator-profile creator-stats | | bilibili | hot search history feed ranking download comments dynamic favorite following me subtitle user-videos | | tieba | hot posts search read | | hupu | hot search detail mentions reply like unlike | | twitter | trending search timeline bookmarks post download profile article like likes notifications reply reply-dm thread follow unfollow followers following block unblock bookmark unbookmark delete hide-reply accept | | reddit | hot frontpage popular search subreddit read user user-posts user-comments upvote upvoted save saved comment subscribe | | zhihu | hot search question download follow like favorite comment answer | | amazon | bestsellers search product offer discussion movers-shakers new-releases | | 1688 | search item assets download store | | gitee | trending search user | | gemini | new ask image deep-research `deep-r

View on GitHub
GitHub Stars14.9k
CategoryDevelopment
Updated7m ago
Forks1.4k

Languages

JavaScript

Security Score

100/100

Audited on Apr 10, 2026

No findings