# OpenCLI

> Turns websites and Electron apps into CLI commands and lets AI agents drive your logged-in Chrome via a Browser Bridge extension and opencli browser primitives.

Stars: 30.7k · Language: JavaScript · License: Apache-2.0 · Categories: AI

- Repository: https://github.com/jackwener/OpenCLI
- Website: https://opencli.info/
- Page: https://www.trmn.sh/tools/opencli

## Install

- npm: `npm install -g @jackwener/opencli`
- Agent skills (npx): `npx skills add jackwener/opencli`

## Overview

OpenCLI converts websites into command-line interfaces and exposes browser automation for AI agents. It connects to Chrome/Chromium through a Browser Bridge extension and a small local daemon that auto-starts, so commands run inside your existing logged-in browser session. Built-in adapters cover sites such as Bilibili, Zhihu, Xiaohongshu, Reddit, HackerNews and Twitter/X, run as `opencli <site> <command>` (for example `opencli hackernews top --limit 5`). `opencli list` shows all registered commands and `opencli doctor` diagnoses browser connectivity. It also includes desktop adapters for Electron apps like Cursor, Codex, ChatGPT and Trae.

For AI agents, `opencli browser <session>` provides primitives including `open`, `state`, `click`, `type`, `fill`, `select`, `keys`, `wait`, `get`, `find`, `extract`, `network`, `screenshot`, `eval` and `tab` management. Page content is read as structured DOM snapshots rather than screenshots, and network API responses can be intercepted. Skills installed with `npx skills add jackwener/opencli` (`opencli-browser`, `opencli-adapter-author`, `opencli-autofix`, `opencli-usage`) let agents such as Claude Code or Cursor use these commands, write new adapters, or repair broken ones from natural-language prompts.

Users can extend it by writing adapters. The documented workflow covers recon of the site pattern (SPA, SSR, JSONP, token, streaming), endpoint discovery, choosing an auth mode (PUBLIC, COOKIE, INTERCEPT, UI, LOCAL), and `opencli browser recon verify`. Commands can be kept in a personal Git repo via `opencli plugin create` and `opencli plugin install`, or installed from GitHub with `opencli plugin install github:user/repo`. Multiple Chrome profiles can be aliased with `opencli profile`, and behavior is tunable through environment variables such as `OPENCLI_PROFILE`, `OPENCLI_CDP_ENDPOINT` and timeouts. It suits developers who want scripted access to logged-in sites and people building browser-driving agents. Installing via npm requires Node.js 20.18.1 or later.

### Installation

```bash
# via npm
npm install -g @jackwener/opencli
```

```bash
# via Agent skills (npx)
npx skills add jackwener/opencli
```

## Alternatives

- [Crush](https://www.trmn.sh/tools/crush.md): Terminal-based agentic coding assistant from Charm that connects to many LLM providers, uses LSPs for context, and extends via MCP servers. (Go, 28.9k stars)
- [Qwen Code](https://www.trmn.sh/tools/qwen-code.md): Open-source AI coding agent that runs in the terminal, with IDE plugins, desktop app, SDKs, and multi-provider model support (OpenAI, Anthropic, Gemini, Qwen). (TypeScript, 28.8k stars)
- [OfficeCLI](https://www.trmn.sh/tools/officecli.md): Single-binary CLI that lets AI agents create, read, edit, and render Word, Excel, and PowerPoint files without an Office installation. (C#, 32.7k stars)
- [Kilo Code](https://www.trmn.sh/tools/kilocode.md): Open source AI coding agent for VS Code, JetBrains, and the terminal, with 500+ selectable models at provider pricing and an autonomous mode for CI/CD. (TypeScript, 27.8k stars)
- [OpenClaude](https://www.trmn.sh/tools/openclaude.md): Open-source terminal coding-agent CLI that works with OpenAI-compatible APIs, Gemini, GitHub Models, Codex, Ollama and other cloud or local model backends. (TypeScript, 34.2k stars)

---

Canonical: https://www.trmn.sh/tools/opencli
