The Complete Guide to OpenCLI: Turn Any Website, Desktop App, and Local Tool Into One Command Line

In the AI agent era, tool accessibility is redefining the ceiling of productivity. While most developers were writing a scraper per website, applying for an API key per service, and hunting for automation recipes per desktop app, an open-source Node.js tool called OpenCLI attacked the problem with one minimalist idea: turn everything into the command line.

OpenCLI (GitHub: jackwener/opencli) has passed 20,000 stars and stands among the most-watched CLI frameworks in the AI-native tooling ecosystem. It lets AI agents operate hundreds of websites and desktop applications the way they run terminal commands — no GUI, no API keys, no complex scripting.

The Core Architecture

OpenCLI’s design philosophy compresses into one sentence: determinism beats intelligence. No smart middleware wrapped around the LLM, no tokens burned on “understanding” a web page — instead, adapters are written in advance, making every operation predictable and scriptable. The architecture has three layers:

  • CLI engine layer: a Node.js command-line runtime handling command routing, output formatting, and plugin management
  • Browser Bridge layer: a Chrome extension plus a local daemon that bridges your logged-in browser sessions
  • Adapter layer: 100+ built-in site adapters, plus Electron app adapters and pass-through to external CLIs

The elegant part of this design is reusing your browser’s login state. You never hand credentials to a third party and never apply for API keys — OpenCLI borrows the sessions already signed in inside Chrome. If you’re logged into Zhihu, Xiaohongshu, and Bilibili in your browser, OpenCLI can operate them directly.

Installation and Setup

Step 1: Install the Node.js CLI

npm install -g @jackwener/opencli

Verify the installation:

opencli --version

Download opencli-extension-v{version}.zip from the GitHub Releases page, unzip it, open chrome://extensions, enable “Developer mode,” and click “Load unpacked” to select the extracted folder. Then run diagnostics:

opencli doctor

Step 3: Connect the Browser

Run any browser-dependent command and OpenCLI automatically starts its daemon and connects to Chrome. Managing multiple Chrome profiles:

opencli profile list
opencli profile rename <contextId> work
opencli profile use work

Built-In Site Adapters: 100+ Websites, One Command Away

OpenCLI ships adapters for more than 100 sites spanning major domestic and international platforms, pulling structured data without even opening a browser:

Domestic platforms: social/content — Xiaohongshu, Zhihu, Bilibili, Weibo, Douban, Hupu, Tieba; commerce/life — 1688, Xianyu, Boss Zhipin, Dianping, Xiaoe Tech; audio/video — Xiaoyuzhou podcasts, Bilibili video; academic/policy — Baidu Scholar, Wanfang, GitLaw.

International platforms: social — Twitter/X, Reddit, HackerNews; content — YouTube, Spotify, Google Scholar; AI services — Gemini, Claude.

Usage is simple:

# list every available command
opencli list

# fetch the Hacker News front page
opencli hackernews top --limit 5

# fetch trending Bilibili videos
opencli bilibili hot --limit 10 -f json

# search jobs on Boss Zhipin
opencli boss search "AI developer"

# fetch the Xiaohongshu recommendation feed
opencli xiaohongshu feed

The -f flag switches output format: table (default), json, yaml, md, csv — ready to pipe into other tools or an LLM.

Browser Automation: Agents Operating Any Website

This is OpenCLI’s most powerful capability. Through the Chrome extension plus daemon, an AI agent can directly drive your logged-in browser: navigation to any URL; page reading as a structured DOM snapshot (text page structure, not screenshots); interaction — clicking buttons, filling forms, selecting options, pressing keys; data extraction by intercepting network API responses for the raw underlying data; and waiting — for elements, text changes, or navigation completion.

Available browser commands include: open, state, click, type, fill, select, keys, wait, get, find, extract, frames, screenshot, scroll, back, eval, network, tab list/new/select/close, init, verify, and close.

The typical setup pairs it with an agent skill package:

npx skills add jackwener/opencli --skill opencli-adapter-author

Once installed, you describe the need in natural language and the agent drives the browser commands itself. Say “check my Xiaohongshu notifications” — the agent opens the browser, navigates to Xiaohongshu, reads the notifications, and returns the result.

This capability solves the central pain of traditional scrapers and Playwright/Puppeteer setups: anti-automation detection. Platforms like Boss Zhipin and Zhihu detect headless Chrome or CDP automation environments and redirect or block. OpenCLI drives your real Chrome browser — the fingerprint is completely genuine and never flags as a crawler.

Desktop Application Control

Through the Chrome DevTools Protocol and AppleScript, OpenCLI also controls Electron desktop applications:

  • Cursor IDE: drive the Composer panel and Chat, extract code
  • OpenAI Codex: headless driving of the Codex CLI agent
  • ChatGPT desktop: automate the ChatGPT macOS app
  • Discord: messages, channels, server management
  • Doubao: control the Doubao AI desktop app
  • Notion: note operations (requires the additional ntn CLI)

CLI Hub: One Entry for Local Tools

OpenCLI is not only a website operator — it is also a CLI hub that discovers and executes the command-line tools already on your machine:

# register local tools
opencli external register gh
opencli external register docker
opencli external register obsidian

# from then on, discover and invoke them all through opencli

Supported tools include gh (GitHub CLI), docker, obsidian, longbridge, lark-cli, tg (Telegram), discord, wx (WeChat), vercel, ntn (Notion), and more.

The Agent Skill System

OpenCLI ships a complete skill system for AI agents, currently supporting Claude Code, Cursor, OpenClaw, and other frameworks:

SkillPurposeExample prompt
opencli-adapter-authorBrowser operation + adapter writing"Check my Xiaohongshu notifications" / "Write an adapter for the Zhihu hot list"
opencli-autofixRepair broken adapters"The Zhihu hot-list adapter is broken — fix it"
opencli-browserBrowser automation reference"Fill in this form on the current page"
opencli-usageCommand and site reference"Which Twitter commands does OpenCLI have?"
smart-searchSearch existing capabilities"Find me a Bilibili hot-list adapter"

Installation:

npx skills add jackwener/opencli
# or install a specific skill on demand
npx skills add jackwener/opencli --skill opencli-adapter-author

Plugins and Custom Adapters

When a built-in adapter doesn’t fit, OpenCLI provides a complete plugin system: create plugins with opencli plugin create; install local plugins with opencli plugin install file://path; install from GitHub with opencli plugin install github:user/repo; eject an official adapter with opencli adapter eject <site>; and author new adapters through the opencli adapter author workflow, where the AI agent can automate the entire path from site analysis to adapter generation.

Best-Fit Scenarios and Limits

Where it shines: daily information aggregation — one command for every platform’s trending lists and updates; agent-driven automation — AI operating the browser through complex multi-step tasks; developer workflows — a unified entry for gh, docker, obsidian and the rest; and media downloading — batch-fetching images, video, audio, and articles across platforms.

Where it doesn’t: it requires Node.js 21 or later, which excludes older servers; browser automation depends on a local Chrome, so headless servers can’t exercise the full capability set; login sessions expire and need manual re-authentication; and it is not a universal scraper — scenarios demanding complex CAPTCHAs or high-frequency calls still need dedicated APIs.

The Takeaway

OpenCLI’s core idea echoes one of the AI era’s important currents — all software will eventually be rewritten for agents. As Andrej Karpathy observed, the software industry spent forty years adding a GUI as the human-translation layer for computers; AI agents natively speak the language of CLI and API, and the GUI is the obstacle. OpenCLI’s value is not that it is one more tool but that it demonstrates a paradigm: a deterministic interface beats intelligent guessing. Rather than spending tokens teaching a model to “understand” a page every time, write the adapter once and reduce the operation to a CLI command. It consumes no tokens at runtime, produces stable structured output, scripts cleanly, pipes cleanly, and behaves in CI. For developers in the AI age, OpenCLI is the bridge that releases agents from the chat box onto the real operating layer — infrastructure worth knowing whether you use it for daily aggregation or for building complex agent workflows.

Related News