# OpenCLI

> Turns websites into CLI commands and lets agents drive your logged-in Chrome

- Category: Agents & Automation / Computer & Browser Use
- Language: JavaScript
- Licence: Apache-2.0
- Repository: https://github.com/jackwener/OpenCLI
- Website: https://opencli.info
- Canonical page: https://ai-tldr.dev/tools/opencli/

## In short

OpenCLI gives one surface to three kinds of automation. It sits in the Computer & Browser Use category of the Agents & Automation tools and is open-source, written in JavaScript and licensed Apache-2.0. To get started: install OpenCLI.

## Overview

OpenCLI gives one surface to three kinds of automation. Built-in adapters expose sites such as Hacker News, Reddit, Twitter/X, Bilibili, Zhihu and Xiaohongshu as ordinary commands — `opencli hackernews top --limit 5` — so a scripted task gets a deterministic interface instead of a live browser session. Where no adapter exists, `opencli browser` primitives let an agent navigate, click, type, extract and inspect any page directly.

The key design choice is that it drives the Chrome you are already signed into. A lightweight Browser Bridge extension plus a small local daemon connect OpenCLI to your profile, so an agent works with your existing logins rather than re-authenticating or handling credentials. Multiple Chrome profiles are supported: you list the connected contexts, give them aliases, and select one per command — with several connected and no default set, OpenCLI asks rather than guessing.

It is also a hub for things that are not websites. Local binaries can be registered and exposed through the same discovery surface (`gh`, `docker`, Notion, Telegram and others), and desktop adapters cover Electron apps like Cursor, Codex, ChatGPT, Trae and Antigravity. For agents, the project ships installable skills — `opencli-browser` for ad-hoc page driving, `opencli-adapter-author` for writing a reusable adapter end to end, `opencli-autofix` for repairing a broken one, plus sitemap skills for navigating a site with recorded structure.

## What it does

- Built-in adapters turning popular sites into deterministic CLI commands
- `opencli browser` primitives — navigate, click, type/fill, extract, inspect — over your logged-in Chrome
- Browser Bridge extension plus a local daemon that auto-starts when needed
- Named Chrome profiles with per-command selection, so multi-profile setups are explicit
- Agent skills: opencli-browser, opencli-adapter-author, opencli-autofix and the sitemap pair
- CLI hub for local binaries (`opencli external register`) and adapters for Electron desktop apps
- Plugin system for publishing or installing third-party commands from a Git repo

## Getting started

Install the CLI, add the browser bridge extension, verify the setup with the built-in doctor, then run your first command. Node.js >= 20.18.1 is required for the npm install path.

1. Install OpenCLI

   OpenCLIApp is recommended on macOS and Windows (it bundles the runtime and a tray UI); the npm global install is the CLI-only path for CI and servers.

```bash
node --version
npm install -g @jackwener/opencli
```

2. Add the Browser Bridge extension

   Install OpenCLI from the Chrome Web Store, or load the unpacked extension from a GitHub release zip via chrome://extensions with Developer mode enabled.

```text
https://chromewebstore.google.com/detail/opencli/ildkmabpimmkaediidaifkhjpohdnifk
```

3. Verify the setup

   The doctor diagnoses browser connectivity and the daemon.

```bash
opencli doctor
```

4. Name your Chrome profiles

   Each Chrome profile runs its own extension instance. With one connected profile OpenCLI uses it automatically.

```bash
opencli profile list
opencli profile rename <contextId> work
opencli profile use work
opencli --profile work browser main state
```

5. Run your first commands

   `opencli list` shows every registered command, built-in or generated.

```bash
opencli list
opencli hackernews top --limit 5
opencli bilibili hot --limit 5
```

6. Install the agent skills

   Installs into your AI agent (Claude Code, Cursor and others); re-running refreshes an existing install.

```bash
npx skills add jackwener/opencli

# or only what you need
npx skills add jackwener/opencli --skill opencli-browser
```

## When to use it

- Let an agent act on a site that has no API, using your existing session instead of credentials
- Replace brittle scraping with a deterministic command for a site you query repeatedly
- Write and verify a reusable adapter for a new site with the adapter-author skill
- Expose local binaries and Electron apps through one discovery surface an agent can enumerate
