About this project
OpenCLI is a command-line tool that bridges websites, browser sessions, Electron apps, and local tools into deterministic interfaces for both humans and AI agents. It provides three main automation surfaces: built-in adapters for popular sites, AI agent browser control, and a CLI hub for local tools.
**Core Capabilities**
1. **Built-in Adapters**: OpenCLI ships with adapters for 100+ sites including Bilibili, Zhihu, Xiaohongshu, Reddit, HackerNews, Twitter/X, LinkedIn, Amazon, Upwork, Midjourney, and many more. Each adapter exposes site-specific commands like `opencli bilibili hot`, `opencli twitter trending`, or `opencli hackernews top`.
2. **AI Agent Browser Control**: Install the `opencli-browser` skill into AI agents (Claude Code, Cursor, etc.) to let them navigate, click, type, fill forms, extract data, and inspect any page through your logged-in Chrome session. The agent uses structured DOM snapshots rather than screenshots for reliable interaction.
3. **CLI Hub**: Unified passthrough for existing command-line tools like `gh`, `docker`, `vercel`, `wrangler`, `obsidian`, `longbridge`, `lark-cli`, `ntn` (Notion), `dws` (DingTalk), `wecom-cli`, `tg`, `discord`, and `wx`. Register custom tools with `opencli external register`.
4. **Desktop App Adapters**: Control Electron apps like Cursor, Trae CN, Codex, Antigravity, ChatGPT App, ChatWise, Qoder, Discord, Doubao, and Trae SOLO via Chrome DevTools Protocol.
**Installation**
OpenCLI requires Node.js >= 20.18.1. Install via npm (`npm install -g @jackwener/opencli`) or use the OpenCLIApp desktop application for macOS/Windows. A Chrome extension (Browser Bridge) connects OpenCLI to your browser, available from the Chrome Web Store or manual installation.
**Browser Automation Primitives**
The `opencli browser` command provides primitives for browser automation: `open`, `state`, `click`, `type`, `fill`, `select`, `keys`, `wait`, `get`, `find`, `extract`, `frames`, `screenshot`, `scroll`, `back`, `eval`, `network`, `tab list`, `tab new`, `tab select`, `tab close`, `init`, `verify`, and `close`. Sessions are managed with explicit session names, and tabs can be targeted individually.
**Adapter Development**
Write new adapters end-to-end using the `opencli-adapter-author` skill. The workflow includes site reconnaissance, endpoint discovery, authentication selection (PUBLIC/COOKIE/INTERCEPT/UI/LOCAL), field decoding, and verification. Site knowledge persists locally for reuse across adapters.
**Download Support**
Download images, videos, and articles from supported platforms including Xiaohongshu, Bilibili, Twitter, Douban, Pixiv, 1688, Xiaoyuzhou (audio and transcripts), Zhihu (Markdown articles), and Weixin (WeChat articles). Video downloads require `yt-dlp`.
**Output Formats**
All commands support `--format` with `table` (default), `json`, `yaml`, `md`, and `csv` for piping to jq, LLMs, or spreadsheets.
**Plugins**
Extend OpenCLI with community plugins via `opencli plugin install github:user/repo`. Available plugins include GitHub Trending, multi-platform trending aggregator, Juejin hot articles, VK wall/feed/search, and X article publisher.
**Configuration**
Environment variables control profile selection, window placement (foreground/background), session persistence, timeouts, CDP endpoints, and verbose logging. Exit codes follow Unix `sysexits.h` for CI/script integration.
**License**: Apache-2.0
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.