SuperAPI AI Directory

OpenCLI - Open-source AI command-line tool, turn websites into command-line interfaces with one click

Author: AI小集 · Original source: AI工具集

What is OpenCLI

OpenCLI is an open-source command-line tool that can turn any website and Electron desktop app into a command-line interface. The tool connects to a local daemon through a Chrome browser extension, reusing the user's already logged-in account permissions without the need for additional API key configuration. OpenCLI supports 30+ platforms including Bilibili, Zhihu, Cursor, Notion, WeChat, and more, providing explore、synthesize、cascade three AI-specific commands that can automatically discover APIs, generate adapters, and detect authentication strategies. The tool enables AI Agents to uniformly control various types of software, achieving true "everything can be a CLI".

OpenCLI

OpenCLI's main features

  • Website CLI-ification: Turn 30+ websites such as Bilibili, Zhihu, Xiaohongshu, Twitter/X, etc. into command-line tools, supporting operations such as trending list viewing, content search, and data download.
  • Electron app CLI-ification: Control desktop apps such as Cursor, Notion, Discord, ChatGPT, WeChat, etc. through the Chrome DevTools Protocol, enabling functions such as sending messages, reading content, and automated interaction.
  • External CLI hub: Integrate existing command-line tools such as gh, docker, kubectl, obsidian, etc., providing unified discovery, automatic installation, and pass-through execution capabilities.
  • AI-native discovery engine: Through explore automatically explore website APIs,synthesize generate adapter code,cascade detect authentication strategies, enabling AI Agents to autonomously learn and control new platforms.
  • Multi-format structured output: Supports output in multiple formats such as JSON, YAML, Markdown, CSV, Table, etc., making it easy for AI Agents to directly process and analyze data.
  • Content download and export: Supports downloading content such as Xiaohongshu image-text posts and videos, Bilibili videos, Twitter media, Zhihu articles, etc. to local storage.
  • Zero-configuration security architecture: Reuses the account status already logged in in the Chrome browser, with no need for additional API Key configuration.

OpenCLI's key information and usage requirements

  • Positioning: General CLI hub and AI-native runtime
  • Core capability: Turn any website, Electron app, or local CLI tool into a standardized command-line interface
  • Technical architecture: CLI → local Daemon (localhost:19825) → WebSocket → Chrome extension → browser/app
  • Authentication method: Reuses the Chrome browser login state, zero configuration, no API Key
  • AI-specific commands:explore(discover APIs),synthesize(generate adapters),cascade(detect authentication)
  • Output format:JSON、YAML、Markdown、CSV、Table
  • Chrome browser: Must be installed and running, and already logged in to the target website
  • Browser extension: Requires installation of the OpenCLI Browser Bridge extension (loaded in developer mode)
  • Network requirements: The local daemon communicates with Chrome via WebSocket
  • Video download: Requires additional installation of yt-dlp(for streaming media downloads such as Bilibili)

OpenCLI's core advantages

  • Full-platform coverage: Simultaneously supports websites (Bilibili, Zhihu, Twitter, etc.), Electron desktop applications (Cursor, Notion, Discord, etc.), and local CLI tools (gh, docker, etc.), achieving "everything can be CLI".
  • AI-native design: Built-in explore、synthesize、cascade three major commands, enabling AI Agents to autonomously discover APIs, generate adapters, and detect authentication strategies, controlling new platforms without manual code writing.
  • Unified standardization: All platforms are converted into a unified CLI interface, supporting structured outputs such as JSON, YAML, Markdown, etc., facilitating AI Agents in orchestrating cross-application workflows.
  • Secure and trustworthy: User account passwords always remain within the browser, communicating through a local daemon, without passing through third-party servers, reducing the risk of credential leakage.
  • Dynamically extensible: Supports hot-loading .ts or .yaml adapters, the community can share commands, and the ecosystem continues to enrich.

How to use OpenCLI

  • Environment preparation: Install Node.js >= 20.0.0, ensure Chrome browser is installed and logged into the target website.
  • Install OpenCLI: Execute npm install -g @jackwener/opencli to globally install the command-line tool.
  • Install browser extension: Download from GitHub Releases opencli-extension.zip, after unzipping, enable developer mode in the Chrome extension management page, and load the unzipped extension folder.
  • Verify installation: Run opencli doctor to check the connection status of the extension and daemon, automatically diagnose and fix issues.
  • View available commands: Execute opencli list to browse the list of built-in supported website and application commands.
  • Execute commands: Use the opencli <平台> <操作> format to call, such as opencli bilibili hot -f json to get Bilibili trending JSON data,opencli cursor send "hello" to send a message to Cursor.
  • Generate custom adapters: For new websites, execute opencli generate https://example.com --goal "hot", completing exploration, generation, and registration in one click.
  • Integrate external CLI: Directly run opencli gh pr list or opencli docker ps, OpenCLI will automatically pass through and support automatic installation of uninstalled tools.

OpenCLI project address

  • GitHub repository:https://github.com/jackwener/opencli

Comparison of OpenCLI with similar competitors

Comparison dimension OpenCLI Playwright Puppeteer
Positioning General CLI hub and AI-native runtime Browser automation testing framework Headless Chrome control library
Core capability Unifies websites/Electron/local CLI into command-line interfaces End-to-end web testing and automation Programmatically control Chrome browser
Technical architecture CLI → Daemon → WebSocket → Chrome extension Scripts directly drive browser instances Node.js library controls browser via DevTools Protocol
Usage threshold Zero configuration, reuses browser login state Requires writing test scripts, configuring environment Requires writing code, understanding browser API
AI Agent support Native design, built-in explore/synthesize/cascade Requires secondary encapsulation, no built-in AI workflow Requires self-development, no AI-specific commands
Electron support Native support, direct control via CDP Requires additional configuration, limited support Supported, but requires manual handling of application startup and port connection
Local CLI integration Supports passthrough of external CLIs such as gh and docker Not supported Not supported

OpenCLI application scenarios

  • AI Agent automation: Enables AI to autonomously control browsers and desktop applications, execute cross-platform tasks, such as automatically collecting information, filling out forms, and publishing content.
  • Data scraping and monitoring: Supports scheduled scraping of Bilibili trending lists, Zhihu topics, stock quotes, and news, outputting structured data for analysis or push notifications.
  • Content creation assistance: The tool can automatically download Xiaohongshu notes, Zhihu articles, and Twitter media, and import them into Notion or Cursor for organization and secondary creation.
  • Cross-application workflow orchestration: Supports chaining multiple platforms, such as obtaining stock data from Xueqiu, analyzing it with AI, and sending it to a Feishu group, or extracting and summarizing subtitles from Bilibili and writing them into a document.