OpenCLI
Turn websites into CLI commands while reusing an existing Chrome login session when needed.
When to Use
- You need data from a website that already works in the browser but does not expose a clean public API.
- You want browser-backed extraction without exporting credentials out of Chrome.
- You want structured output from a website in
table, json, md, or csv.
- You want to explore a site, generate an adapter, probe auth strategy, or smoke-test a generated workflow.
Install
npm install -g @jackwener/opencli
opencli list
Prerequisites
Browser-backed commands require:
- Chrome running and already logged into the target site
- Playwright MCP Bridge installed
PLAYWRIGHT_MCP_EXTENSION_TOKEN configured for the Playwright MCP server
Public API commands such as hackernews, v2ex, and some github search flows do not need the browser setup.
Core Usage
opencli <site> <command> [flags]
opencli list
opencli list --json
opencli hackernews top --limit 5 -f json
opencli bilibili hot --limit 10
opencli github search --keyword "cli"
AI-Native Workflows
opencli explore <url> --site <name>
opencli synthesize <site>
opencli generate <url> --goal "hot"
opencli cascade <api-url>
opencli verify <site/name> --smoke
explore: inspect a site and capture artifacts for later generation
synthesize: generate adapters from existing explore artifacts
generate: run the end-to-end explore to register flow in one step
cascade: auto-probe auth strategy from public to cookie to header
verify: smoke-test a generated adapter
If you need to build new adapters, read references/cli-creator.md.
Output And Debugging
opencli <site> <command> -f table
opencli <site> <command> -f json
opencli <site> <command> -f md
opencli <site> <command> -f csv
opencli <site> <command> -v
Common Targets
- Browser-backed:
bilibili, zhihu, xiaohongshu, twitter, reddit, weibo, youtube, boss, yahoo-finance, reuters, smzdm, ctrip
- Public or mixed:
hackernews, v2ex, github, bbc
Notes
- Tabs opened during execution are usually auto-closed afterwards.
- If a browser command returns empty data, first verify the site is reachable in Chrome and the session is logged in.
- For the full upstream command matrix and release details, start from
https://github.com/jackwener/opencli.
1---2name: opencli3description: Turns websites into CLI commands, reusing an existing Chrome login session for browser-backed data extraction and structured output.4---5# OpenCLI67Turn websites into CLI commands while reusing an existing Chrome login session when needed.89## When to Use1011- You need data from a website that already works in the browser but does not expose a clean public API.12- You want browser-backed extraction without exporting credentials out of Chrome.13- You want structured output from a website in `table`, `json`, `md`, or `csv`.14- You want to explore a site, generate an adapter, probe auth strategy, or smoke-test a generated workflow.1516## Install1718```bash19npm install -g @jackwener/opencli20opencli list21```2223## Prerequisites2425Browser-backed commands require:26271. Chrome running and already logged into the target site282. [Playwright MCP Bridge](https://chromewebstore.google.com/detail/playwright-mcp-bridge/mmlmfjhmonkocbjadbfplnigmagldckm) installed293. `PLAYWRIGHT_MCP_EXTENSION_TOKEN` configured for the Playwright MCP server3031Public API commands such as `hackernews`, `v2ex`, and some `github search` flows do not need the browser setup.3233## Core Usage3435```bash36opencli <site> <command> [flags]37opencli list38opencli list --json39opencli hackernews top --limit 5 -f json40opencli bilibili hot --limit 1041opencli github search --keyword "cli"42```4344## AI-Native Workflows4546```bash47opencli explore <url> --site <name>48opencli synthesize <site>49opencli generate <url> --goal "hot"50opencli cascade <api-url>51opencli verify <site/name> --smoke52```5354- `explore`: inspect a site and capture artifacts for later generation55- `synthesize`: generate adapters from existing explore artifacts56- `generate`: run the end-to-end explore to register flow in one step57- `cascade`: auto-probe auth strategy from `public` to `cookie` to `header`58- `verify`: smoke-test a generated adapter5960If you need to build new adapters, read [references/cli-creator.md](references/cli-creator.md).6162## Output And Debugging6364```bash65opencli <site> <command> -f table66opencli <site> <command> -f json67opencli <site> <command> -f md68opencli <site> <command> -f csv69opencli <site> <command> -v70```7172## Common Targets7374- Browser-backed: `bilibili`, `zhihu`, `xiaohongshu`, `twitter`, `reddit`, `weibo`, `youtube`, `boss`, `yahoo-finance`, `reuters`, `smzdm`, `ctrip`75- Public or mixed: `hackernews`, `v2ex`, `github`, `bbc`7677## Notes7879- Tabs opened during execution are usually auto-closed afterwards.80- If a browser command returns empty data, first verify the site is reachable in Chrome and the session is logged in.81- For the full upstream command matrix and release details, start from `https://github.com/jackwener/opencli`.