{"repo":"jackwener/OpenCLI","free":true,"listed":false,"github":"https://github.com/jackwener/OpenCLI","clone":"git clone https://github.com/jackwener/OpenCLI.git","description":"Make Any Website into CLI & Use your logged-in browser by AI agent. ","language":"JavaScript","stars":28238,"topics":["ai-agent","ai-agents","ai-tools","browser-automation","browser-use","cli","playwright"],"license":"Apache-2.0","category":"automation_framework","readme_excerpt":"# OpenCLI\n\n> **Convert any website into a CLI & run Browser Use on your logged-in Chrome.**\n> Turn websites, browser sessions, Electron apps, and local tools into deterministic interfaces for humans and AI agents.\n> Or run Browser Use against any page — navigate, fill forms, click, extract, automate.\n\n[![中文文档](https://img.shields.io/badge/docs-%E4%B8%AD%E6%96%87-0F766E?style=flat-square)](./README.zh-CN.md)\n[![npm](https://img.shields.io/npm/v/@jackwener/opencli?style=flat-square)](https://www.npmjs.com/package/@jackwener/opencli)\n[![Node.js Version](https://img.shields.io/node/v/@jackwener/opencli?style=flat-square)](https://nodejs.org)\n[![License](https://img.shields.io/npm/l/@jackwener/opencli?style=flat-square)](./LICENSE)\n\nOpenCLI gives you one surface for three different kinds of automation:\n\n- **Use built-in adapters** for sites like Bilibili, Zhihu, Xiaohongshu, Reddit, HackerNews, Twitter/X, and [many more](#built-in-commands).\n- **Let AI Agents operate any website** — install the `opencli-browser` skill in your AI agent (Claude Code, Cursor, etc.), and it can navigate, click, type/fill, extract, and inspect any page through your logged-in browser via `opencli browser` primitives.\n- **Write new adapters** end-to-end with `opencli browser` + the `opencli-adapter-author` skill, which guides from first recon through field decoding, code, and `opencli browser verify`.\n\nIt also works as a **CLI hub** for local tools such as `gh`, `docker`, `longbridge`, `tg`, `discord`, `wx`, `ntn` (Notion), and other binaries you register yourself, plus **desktop app adapters** for Electron apps like Cursor, Trae CN, Codex, Antigravity, ChatGPT, and Trae SOLO.\n\n## Quick Start\n\n### 1. Install OpenCLI\n\nFor desktop use, start with **OpenCLIApp**. It bundles the OpenCLI runtime,\nkeeps the managed `opencli` command installed, and gives you a system tray UI\nfor setup, diagnostics, updates, browser-login keepalive, and Web → Markdown.\n\n**Option A — OpenCLIApp (recommended for macOS / Windows):**\nDownload the latest app from <https://opencli.info/download>, install it, then\nopen the app once and use the System page to install or repair the `opencli`\ncommand.\n\n**Option B — npm global install (CLI-only / CI / servers):**\nOpenCLI requires **Node.js >= 20** when installed through npm.\n\n```bash\nnode --version\nnpm install -g @jackwener/opencli\n```\n\n### 2. Install the Browser Bridge Extension\n\nOpenCLI connects to Chrome/Chromium through a lightweight Browser Bridge extension plus a small local daemon. The daemon auto-starts when needed.\n\n**Option A — Chrome Web Store (recommended):**\nInstall **OpenCLI** from the [Chrome Web Store](https://chromewebstore.google.com/detail/opencli/ildkmabpimmkaediidaifkhjpohdnifk).\n\n**Option B — Manual install:**\n1. Download the latest `opencli-extension-v{version}.zip` from the GitHub [Releases page](https://github.com/jackwener/opencli/releases).\n2. Unzip it, open `chrome://extensions`, and enable **Developer mode**.\n3. Click **Load unpacked** and select the unzipped folder.\n\n### 3. Verify the setup\n\n```bash\nopencli doctor\n```\n\n### 4. Optional: name your Chrome profile\n\nEach Chrome profile runs its own OpenCLI extension instance. If you use multiple Chrome profiles, list the connected profiles and assign local aliases:\n\n```bash\nopencli profile list\nopencli profile rename <contextId> work\nopencli profile use work\nopencli --profile work browser main state\n```\n\nWith only one connected profile, OpenCLI uses it automatically. With multiple connected profiles and no default, OpenCLI asks you to choose instead of guessing.\n\n### 5. Run your first commands\n\n```bash\nopencli list\nopencli hackernews top --limit 5\nopencli bilibili hot --limit 5\n```\n\n## For Humans\n\nUse OpenCLI directly when you want a reliable command instead of a live browser session:\n\n- `opencli list` shows every registered command.\n- `opencli <site> <command>` runs a built-in or generated adapter.\n- `opencli external register mycli` exposes a local CLI through the same discovery surface.\n- `opencli doctor` helps diagnose browser connectivity.\n\n## Extending OpenCLI\n\nIf you want to add your own commands, start with the [Extending OpenCLI guide](./docs/guide/extending-opencli.md). README keeps this short; the guide covers the directory layout, source-control model, and install commands.\n\n| Need | Recommended path |\n|------|------------------|\n| Keep personal website commands in your own Git repo | `opencli plugin create` + `opencli plugin install file://...` |\n| Quickly draft a private local adapter | `opencli browser init <site>/<command>` in `~/.opencli/clis/` |\n| Modify an official adapter locally | `opencli adapter eject <site>` + `opencli adapter reset <site>` |\n| Publish or install third-party commands | `opencli plugin install github:user/repo` |\n| Wrap an existing local binary | `opencli external register <name>` |\n\n## For AI Agents\n\nOpenCLI's browser commands are designed to be used by AI Agents — not run manually. Install skills into your AI agent (Claude Code, Cursor, etc.), and the agent operates websites on your behalf using your logged-in Chrome session.\n\n### Install skills (also refreshes existing installs)\n\n```bash\nnpx skills add jackwener/opencli\n```\n\nOr install only what you need:\n\n```bash\nnpx skills add jackwener/opencli --skill opencli-adapter-author\nnpx skills add jackwener/opencli --skill opencli-autofix\nnpx skills add jackwener/opencli --skill opencli-browser\nnpx skills add jackwener/opencli --skill opencli-browser-sitemap\nnpx skills add jackwener/opencli --skill opencli-sitemap-author\nnpx skills add jackwener/opencli --skill opencli-usage\n```\n\n### Which skill to use\n\n| Skill | When to use | Example prompt to your AI agent |\n|-------|------------|-------------------------------|\n| **opencli-adapter-author** | Write a reusable adapter for a new site or add a command to an existing site | \"Write an adapter for douyin trending\" / \"Make a command that grabs the top posts from this page\" |\n| **opencli-autofix** | Repair a broken adapter when a built-in command fails | \"`opencli zhihu hot` is returning empty — fix it\" |\n| **opencli-browser** | Drive a real Chrome page ad-hoc — navigate, fill forms, click, extract | \"Help me check my Xiaohongshu notifications\" / \"Help me fill out this form\" / \"Use browser commands to scrape this page\" |\n| **opencli-browser-sitemap** | Consume site sitemap context while driving a browser task | \"Use the sitemap to navigate this website without blind clicking\" |\n| **opencli-sitemap-author** | Create or update site sitemap knowledge for browser agents | \"Record the stable workflow you just discovered for this site\" |\n| **opencli-usage** | Quick reference for all OpenCLI commands and sites | \"What commands does OpenCLI have for Twitter?\" |\n\n### How it works\n\nOnce `opencli-browser` is installed, your AI agent can:\n\n1. **Navigate** to any URL using your logged-in browser\n2. **Read** page content via structured DOM snapshots (not screenshots)\n3. **Interact** — click buttons, fill forms, select options, press keys\n4. **Extract** data from the page or intercept network API responses\n5. **Wait** for elements, text, or page transitions\n\nThe agent handles all the `opencli browser` commands internally — you just describe what you want done in natural language.\n\n**Skill references:**\n- [`skills/opencli-browser/SKILL.md`](./skills/opencli-browser/SKILL.md) — drive Chrome ad-hoc (navigate, fill forms, click, extract)\n- [`skills/opencli-browser-sitemap/SKILL.md`](./skills/opencli-browser-sitemap/SKILL.md) — use sitemap context while driving a browser task\n- [`skills/opencli-sitemap-author/SKILL.md`](./skills/opencli-sitemap-author/SKILL.md) — create or update site sitemap knowledge\n- [`skills/opencli-adapter-author/SKILL.md`](./skills/opencli-adapter-author/SKILL.md) — write a new adapter end-to-end\n- [`skills/opencli-autofix/SKILL.md`](./skills/opencli-autofix/SKILL.md) — repair broken adapters\n- [`skills/opencli-usage/SKILL.md`](./skills/opencli-usage/SKILL.md) — command and site reference\n\nAvailable browser commands include `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`.\n\n`opencli browser` commands require a `<session>` positional immediately after `browser`. `opencli browser work open <url>` and `opencli browser work tab new [url]` both return a target ID. Use `opencli browser work tab list` to inspect target IDs, then pass `--tab <targetId>` to route a command to a specific tab. `tab new` creates a new tab without changing the default browser target; only `tab select <targetId>` promotes that tab to the default target for later untargeted commands in the same session.\n\n## Writing a new adapter\n\nWhen the site you need is not yet covered, use the `opencli-adapter-author` skill end-to-end:\n\n1. **Recon** the site and pick a pattern (SPA / SSR / JSONP / Token / Streaming).\n2. **Discover** the right endpoint — network inspection, initial state, bundle search, token trace, or interceptor fallback.\n3. **Pick auth** — `PUBLIC` / `COOKIE` / `INTERCEPT` / `UI` / `LOCAL`.\n4. **Decode** response fields and design output columns.\n5. `opencli browser recon analyze <url>` → `opencli browser recon init <site>/<name>` → write adapter → `opencli browser recon verify <site>/<name>`.\n6. Site knowledge persists to `~/.opencli/sites/<site>/` so the next adapter for the same site starts from context.\n\n## Configuration\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `OPENCLI_PROFILE` | — | Browser Bridge profile alias/contextId to use when multiple Chrome profiles are connected |\n| `OPENCLI_WINDOW` | command default | Set to `foreground` or `background` to override Browser Bridge window placement. Browser-backed commands also accept `--window <foreground\\|background>`. |\n| `OPENCLI_BROWSER_CONNECT_TIMEOUT` | `45` | Seconds ","default_branch":"main","files":2501,"tree":[".github/ISSUE_TEMPLATE/bug_report.yml",".github/ISSUE_TEMPLATE/config.yml",".github/ISSUE_TEMPLATE/feature_request.yml",".github/ISSUE_TEMPLATE/new_site_adapter.yml",".github/actions/setup-chrome/action.yml",".github/pull_request_template.md",".github/workflows/build-extension.yml",".github/workflows/ci.yml",".github/workflows/doc-check.yml",".github/workflows/docs.yml",".github/workflows/e2e-headed.yml",".github/workflows/release.yml",".github/workflows/security.yml",".gitignore","CHANGELOG.md","CONTRIBUTING.md","LICENSE","PRIVACY.md","README.md","README.zh-CN.md","TESTING.md","autoresearch/baseline-browse.txt","autoresearch/baseline-skill.txt","autoresearch/browse-tasks.json","autoresearch/commands/debug.ts","autoresearch/commands/fix.ts","autoresearch/commands/plan.ts","autoresearch/commands/run.ts","autoresearch/config.ts","autoresearch/engine.ts","autoresearch/eval-all.ts","autoresearch/eval-browse.ts","autoresearch/eval-publish.ts","autoresearch/eval-save.ts","autoresearch/eval-skill.ts","autoresearch/eval-v2ex.ts","autoresearch/eval-zhihu.ts","autoresearch/logger.ts","autoresearch/presets/browser-reliability.ts","autoresearch/presets/combined-reliability.ts","autoresearch/presets/index.ts","autoresearch/presets/save-reliability.ts","autoresearch/presets/skill-quality.ts","autoresearch/presets/v2ex-reliability.ts","autoresearch/presets/zhihu-reliability.ts","autoresearch/publish-tasks.json","autoresearch/run-browse.sh","autoresearch/run-save.sh","autoresearch/run-skill.sh","autoresearch/save-adapters/xhs-explore-deep.ts","autoresearch/save-adapters/xhs-note-comments.ts","autoresearch/save-adapters/xhs-search-full.ts","autoresearch/save-adapters/zhihu-hot-detail.ts","autoresearch/save-adapters/zhihu-question-full.ts","autoresearch/save-adapters/zhihu-search-detail.ts","autoresearch/save-tasks.json","autoresearch/v2ex-tasks.json","autoresearch/zhihu-tasks.json","bun.lock","cases/README.md","cases/daily-rl-research-monitor.md","cases/find-paper-implementation.md","cases/track-conference-papers.md","cli-manifest.json","clis/12306/auth.js","clis/12306/me.js","clis/12306/orders.js","clis/12306/passengers.js","clis/12306/price.js","clis/12306/stations.js","clis/12306/train.js","clis/12306/trains.js","clis/12306/utils.js","clis/12306/utils.test.js","clis/1688/assets.js","clis/1688/assets.test.js","clis/1688/auth.js","clis/1688/download.js","clis/1688/download.test.js","clis/1688/item.js","clis/1688/item.test.js","clis/1688/search.js","clis/1688/search.test.js","clis/1688/shared.js","clis/1688/shared.test.js","clis/1688/store.js","clis/1688/store.test.js","clis/1point3acres/auth.js","clis/1point3acres/auth.test.js","clis/1point3acres/digest.js","clis/1point3acres/forum.js","clis/1point3acres/forums.js","clis/1point3acres/hot.js","clis/1point3acres/latest.js","clis/1point3acres/notifications.js","clis/1point3acres/search.js","clis/1point3acres/thread.js","clis/1point3acres/user.js","clis/1point3acres/utils.js","clis/36kr/article.js","clis/36kr/article.test.js","clis/36kr/hot.js","clis/36kr/hot.test.js","clis/36kr/news.js","clis/36kr/news.test.js","clis/36kr/search.js","clis/51job/company.js","clis/51job/detail.js","clis/51job/hot.js","clis/51job/search.js","clis/51job/utils.js","clis/51job/utils.test.js","clis/_atlassian/shared.js","clis/_atlassian/shared.test.js","clis/_shared/common.js","clis/_shared/desktop-commands.js","clis/_shared/search-adapter.js","clis/_shared/site-auth.js","clis/_shared/site-auth.test.js","clis/aibase/news.js","clis/aibase/news.test.js","clis/amazon/auth.js","clis/amazon/bestsellers.js","clis/amazon/bestsellers.test.js","clis/amazon/discussion.js","clis/amazon/discussion.test.js","clis/amazon/movers-shakers.js","clis/amazon/new-releases.js","clis/amazon/offer.js","clis/amazon/offer.test.js","clis/amazon/product.js","clis/amazon/product.test.js","clis/amazon/rankings.js","clis/amazon/rankings.test.js","clis/amazon/search.js","clis/amazon/search.test.js","clis/amazon/shared.js","clis/amazon/shared.test.js","clis/antigravity/SKILL.md","clis/antigravity/_actions.js","clis/antigravity/antigravity.test.js","clis/antigravity/audit-extras.js","clis/antigravity/delete.js","clis/antigravity/dump.js","clis/antigravity/extract-code.js","clis/antigravity/history.js","clis/antigravity/mark-read.js","clis/antigravity/model.js","clis/antigravity/new.js","clis/antigravity/read.js","clis/antigravity/rename.js","clis/antigravity/send.js","clis/antigravity/serve.js","clis/antigravity/status.js","clis/antigravity/storage.js","clis/antigravity/watch.js","clis/apple-podcasts/commands.test.js","clis/apple-podcasts/episodes.js","clis/apple-podcasts/search.js","clis/apple-podcasts/top.js","clis/apple-podcasts/utils.js","clis/apple-podcasts/utils.test.js","clis/archive/archive.test.js","clis/archive/item.js","clis/archive/search.js","clis/archive/snapshots.js","clis/archive/wayback.js","clis/arxiv/arxiv.test.js","clis/arxiv/author.js","clis/arxiv/paper.js","clis/arxiv/recent.js","clis/arxiv/search.js","clis/arxiv/utils.js","clis/autohome/__fixtures__/catalog.html","clis/autohome/__fixtures__/koubei.json","clis/autohome/autohome.test.js","clis/autohome/brand.js","clis/autohome/score.js","clis/autohome/utils.js","clis/baidu-scholar/search.js","clis/baidu-scholar/search.test.js","clis/band/auth.js","clis/band/bands.js","clis/band/mentions.js","clis/band/post.js","clis/band/posts.js","clis/barchart/flow.js","clis/barchart/greeks.js","clis/barchart/greeks.test.js","clis/barchart/options.js","clis/barchart/quote.js","clis/bbc/news.js","clis/bbc/topic.js","clis/bbc/utils.js","clis/bilibili/auth.js","clis/bilibili/comment.js","clis/bilibili/comment.test.js","clis/bilibili/comments.js","clis/bilibili/comments.test.js","clis/bilibili/download.js","clis/bilibili/download.test.js","clis/bilibili/dynamic.js","clis/bilibili/dynamic.test.js","clis/bilibili/favorite.js","clis/bilibili/feed.js","clis/bilibili/follow.js","clis/bilibili/follow.test.js","clis/bilibili/following.js","clis/bilibili/history.js","clis/bilibili/hot.js","clis/bilibili/hot.test.js","clis/bilibili/me.js","clis/bilibili/ranking.js","clis/bilibili/search.js","clis/bilibili/subtitle.js","clis/bilibili/subtitle.test.js","clis/bilibili/summary.js","clis/bilibili/summary.test.js","clis/bilibili/unfollow.js","clis/bilibili/user-videos.js","clis/bilibili/utils.js","clis/bilibili/utils.test.js","clis/bilibili/video.js","clis/bilibili/video.test.js","clis/binance/asks.js","clis/binance/commands.test.js","clis/binance/depth.js","clis/binance/gainers.js","clis/binance/klines.js","clis/binance/losers.js","clis/binance/pairs.js","clis/binance/price.js","clis/binance/prices.js","clis/binance/ticker.js","clis/binance/top.js","clis/binance/trades.js","clis/bloomberg/businessweek.js","clis/bloomberg/businessweek.test.js","clis/bloomberg/crypto.js","clis/bloomberg/economics.js","clis/bloomberg/feeds.js","clis/bloomberg/green.js","clis/bloomberg/industries.js","clis/bloomberg/main.js","clis/bloomberg/markets.js","clis/bloomberg/news.js","clis/bloomberg/opinions.js","clis/bloomberg/politics.js","clis/bloomberg/pursuits.js","clis/bloomberg/tech.js","clis/bloomberg/utils.js","clis/bloomberg/utils.test.js","clis/bluesky/feeds.js","clis/bluesky/followers.js","clis/bluesky/following.js","clis/bluesky/profile.js","clis/bluesky/search.js","clis/bluesky/starter-packs.js","clis/bluesky/thread.js","clis/bluesky/trending.js","clis/bluesky/user.js","clis/booking/booking.test.js","clis/booking/search.js","clis/boss/auth.js","clis/boss/auth.test.js","clis/boss/batchgreet.js","clis/boss/chatlist.js","clis/boss/chatlist.test.js","clis/boss/chatmsg.js","clis/boss/chatmsg.test.js","clis/boss/detail.js","clis/boss/exchange.js","clis/boss/greet.js","clis/boss/invite.js","clis/boss/joblist.js","clis/boss/mark.js","clis/boss/recommend.js","clis/boss/resume.js","clis/boss/search.js","clis/boss/search.test.js","clis/boss/send.js","clis/boss/stats.js","clis/boss/utils.js","clis/boss/utils.test.js","clis/brave/search.js","clis/brave/search.test.js","clis/chaoxing/assignments.js","clis/chaoxing/auth.js","clis/chaoxing/exams.js","clis/chaoxing/utils.js","clis/chaoxing/utils.test.js","clis/chatgpt-app/ask.js","clis/chatgpt-app/ax.js","clis/chatgpt-app/ax.test.js","clis/chatgpt-app/commands.test.js","clis/chatgpt-app/model.js","clis/chatgpt-app/new.js","clis/chatgpt-app/read.js","clis/chatgpt-app/send.js","clis/chatgpt-app/status.js","clis/chatgpt/ask.js","clis/chatgpt/auth.js","clis/chatgpt/commands.test.js","clis/chatgpt/deep-research-result.js","clis/chatgpt/detail.js","clis/chatgpt/envelope.test.js","clis/chatgpt/history.js","clis/chatgpt/image.js","clis/chatgpt/image.test.js","clis/chatgpt/model.js","clis/chatgpt/model.test.js","clis/chatgpt/new.js","clis/chatgpt/project-file-add.js","clis/chatgpt/project-list.js","clis/chatgpt/read.js","clis/chatgpt/send.js","clis/chatgpt/status.js","clis/chatgpt/utils.js","clis/chatgpt/utils.test.js","clis/chatwise/ask.js","clis/chatwise/composer.test.js","clis/chatwise/export.js","clis/chatwise/history.js","clis/chatwise/model.js","clis/chatwise/new.js","clis/chatwise/read.js","clis/chatwise/screenshot.js","clis/chatwise/send.js","clis/chatwise/status.js","clis/chatwise/utils.js","clis/chess/analyze.js","clis/chess/analyze.test.js","clis/chess/game.js","clis/chess/game.test.js","clis/chess/games.js","clis/chess/games.test.js","clis/chess/stats.js","clis/chess/stats.test.js","clis/chess/utils.js","clis/chess/utils.test.js","clis/claude/ask.js","clis/claude/ask.test.js","clis/claude/auth.js","clis/claude/commands.test.js","clis/claude/detail.js","clis/claude/history.js","clis/claude/new.js","clis/claude/read.js","clis/claude/send.js","clis/claude/status.js","clis/claude/utils.js","clis/claude/utils.test.js","clis/cnki/search.js","clis/cnki/search.test.js","clis/codex/_actions.js","clis/codex/archive.js","clis/codex/ask.js","clis/codex/dump.js","clis/codex/export.js","clis/codex/extract-diff.js","clis/codex/history.js","clis/codex/model.js","clis/codex/new.js","clis/codex/pin.js","clis/codex/projects.js","clis/codex/read.js","clis/codex/rename.js","clis/codex/screenshot.js","clis/codex/send.js","clis/codex/sidebar.js","clis/codex/sidebar.test.js","clis/codex/status.js","clis/coingecko/categories.js","clis/coingecko/coin.js","clis/coingecko/coingecko.test.js","clis/coingecko/derivatives.js","clis/coingecko/exchanges.js","clis/coingecko/global.js","clis/coingecko/top.js","clis/coingecko/trending.js","clis/confluence/commands.test.js","clis/confluence/create.js","clis/confluence/page.js","clis/confluence/search.js","clis/confluence/shared.js","clis/confluence/update.js","clis/coupang/add-to-cart.js","clis/coupang/auth.js","clis/coupang/coupang.test.js","clis/coupang/product.js","clis/coupang/search.js","clis/coupang/utils.js","clis/coupang/utils.test.js","clis/crates/crate.js","clis/crates/search.js","clis/crates/utils.js","clis/ctrip/attraction.js","clis/ctrip/auth.js","clis/ctrip/bus.js","clis/ctrip/cruise.js"],"storefront":"/r/jackwener","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/jackwener/OpenCLI/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}