Introduction
"Make any website, Electron App, or Local Tool your CLI."
This is Part 64 of the "Open Source Project of the Day" series. Today we explore OpenCLI (GitHub).
Developers often want a single terminal entry point: call gh and docker, fetch trending feeds, query community sites, and—critically—let AI agents discover and execute the same tool surface reliably. OpenCLI aims to standardize that: turn websites, Electron desktop apps, and local CLI tools into a consistent command-line interface. It connects to your browser via a Browser Bridge (Chrome/Chromium extension + local micro-daemon) to reuse logged-in sessions, ships 70+ built-in adapters, provides a CLI Hub for passthrough commands like opencli gh and opencli docker (with optional auto-install via your package manager), and includes Electron/desktop adapters (Cursor, Antigravity, ChatGPT desktop, and more—see docs). For AI workflows, it provides Skills such as opencli-operate for direct browser control (click, type, screenshot, extract, etc.).
What You'll Learn
- How OpenCLI is layered: CLI process, Browser Bridge, adapters, and optional desktop integrations
- Built-in capabilities: site adapters, CLI hub, Electron adapters, plugins
- AI-oriented workflows:
opencli-operate, plusexplore/synthesize/cascadestyle flows described in the repo - Privacy and operational boundaries: session reuse via the browser; provider terms still apply to chat/API traffic
- Local development and troubleshooting:
opencli doctor, common exit codes, extension connectivity issues
Prerequisites
- Node.js 20+ (or Bun 1.0+) and comfort with global npm installs
- Basic Chrome/Chromium extension loading ("Load unpacked")
- Shell piping (
jq, scripts, CI) is helpful - Optional: TypeScript/YAML and browser automation concepts for adapter development
Project Background
Project Overview
OpenCLI is a Node.js CLI runtime that bridges three worlds:
- Websites — deterministic subcommands for many platforms (see the adapter index in docs).
- Local CLIs — unified discovery and passthrough via CLI Hub, plus
opencli registerfor custom tools. - Desktop apps (often Electron) — optional adapters documented under
docs/adapters/desktop/.
The project emphasizes deterministic outputs, scriptability, and AI-agent ergonomics (Skills, discoverable command lists, structured output formats).
Maintainer & Distribution
- Repository:
jackwener/opencli - npm package:
@jackwener/opencli - License: Apache-2.0
Project Stats
- ⭐ GitHub Stars: ~12,570 (changes over time; check the repo page)
- 📦 Versioning: See npm and GitHub Releases
- 📄 License: Apache-2.0
Main Features
Core Capabilities
- Website → CLI: Many platforms exposed as subcommands; 70+ adapters referenced in the README.
- Browser automation for agents:
operate+ theopencli-operateSkill for scripted interactions. - CLI Hub: Passthrough to tools like
gh,docker,lark-cli,vercel, etc., with discovery viaopencli list. - Electron/desktop: Terminal control flows for selected desktop apps (details per adapter doc).
- Plugins: Install community adapters via
opencli plugin install. - Output + exit codes:
--formatsupportstable,json,yaml,md,csv; exit codes follow common Unix conventions (including69for unavailable bridge,77for auth issues—see README tables).
Use Cases
- Terminal-first data pulls — trending/search feeds as JSON for scripts or LLM pipelines.
- Unified agent tooling — point agents at
opencli listto reduce tool-discovery friction. - Crystallize repetitive web flows — exploration/synthesis workflows to turn interactions into reusable commands.
- Orchestrate desktop AI apps — where supported, drive desktop clients from the terminal (read the specific adapter docs carefully).
- Coexist with existing CLIs — OpenCLI as a hub, not necessarily a replacement.
Quick Start
1) Install the Browser Bridge extension
Download opencli-extension.zip from GitHub Releases, then load unpacked in chrome://extensions.
2) Install the CLI
npm install -g @jackwener/opencli3) Verify
opencli doctor
opencli daemon status
opencli list
opencli hackernews top --limit 5
opencli bilibili hot --limit 5Note: site commands that rely on logged-in sessions require you to be logged in inside Chrome/Chromium first (per README).
4) Optional: install Skills for AI agents
npx skills add jackwener/opencliHighlights (from the upstream README)
- Account-friendly session reuse via real browser login state (credentials stay in the browser context as described upstream).
- Anti-automation hardening claims (webdriver flags, chrome stubs, plugin lists, stack cleanup)—effectiveness varies by site policies.
- Self-healing:
opencli doctorto diagnose extension/daemon connectivity. - Dynamic adapter loading: drop
.tsor.yamladapters into the documentedclis/workflow (see upstream docs). - Zero LLM cost at runtime for normal command execution (distinct from adapter generation flows that may involve LLM usage—read skills/docs).
Advantages
| Dimension | OpenCLI | One-off scrapers | Raw Playwright DIY |
|---|---|---|---|
| Unified discovery | ✅ opencli list + hub | ❌ fragmented | ⚠️ build your own |
| Login handling | ✅ reuse browser session | ⚠️ cookie hacks | ⚠️ manual |
| Agent integration | ✅ Skills + operate | ❌ rare | ⚠️ DIY |
| Output contracts | ✅ formats + exit codes | ⚠️ varies | ⚠️ varies |
| Setup overhead | ⚠️ extension + daemon | ✅ sometimes simpler | ❌ high engineering cost |
Detailed Project Analysis
Conceptual Architecture
opencliCLI parses commands and routes to adapters, plugins, or external CLI passthrough.- Browser Bridge coordinates with Chrome/Chromium through an extension and local daemon connectivity.
- Adapters encode site capabilities as structured commands with stable schemas.
- Desktop adapters document how to control selected Electron apps (capabilities differ per app and version).
AI Workflows (as advertised upstream)
explore: discover APIs and capabilities for a sitesynthesize: generate adaptersgenerate: one-shot explore → synthesize → registercascade: probe auth strategies for APIs
Start from skills/opencli-explorer for deep workflows, or skills/opencli-oneshot for quick URL-to-command generation.
Operational Notes
- Expect browser extension troubleshooting to be part of day-to-day usage.
- Site changes can break adapters; watch releases and issues.
- Compliance: users must respect each platform's Terms of Service and automation policies.
Project Links & Resources
Official
- 🌟 GitHub: https://github.com/jackwener/opencli
- 📦 npm: https://www.npmjs.com/package/@jackwener/opencli
- 📥 Releases (extension zip): https://github.com/jackwener/opencli/releases
- 🐛 Issues: https://github.com/jackwener/opencli/issues
Related
- Chinese README:
README.zh-CN.mdin the repository - Adapter index:
docs/adapters/index.md - Testing guide:
TESTING.md
Who It's For
- Developers who want one terminal surface across web, desktop apps, and existing CLIs
- Teams building AI agent workflows that need discoverable, structured tools
- Advanced users comfortable with browser extensions + a local daemon as prerequisites
Visit my personal homepage to find more useful knowledge and interesting products