opencli-usage

jackwener/opencli

Используйте в начале любой сессии OpenCLI: верхнеуровневая карта возможностей `opencli`, поиск адаптеров, универсальные флаги и форматы вывода, а также какой специализированный навык загружать дальше.

OpenCLI превращает сайты, Electron-приложения и внешние CLI в единую поверхность команд opencli site, которой агенты управляют без скрейпинга экрана. Инструмент для разработчиков и агентов: адаптеры в clis/ и ~/.opencli/clis/ помечены стратегией PUBLIC, COOKIE, INTERCEPT, UI или LOCAL, определяющей необходимость Chrome-сессии. Ограничение: opencli doctor диагностирует только браузерный мост, а PUBLIC/LOCAL-адаптерам и external-CLI passthrough зелёный статус не нужен.

Звёзды31 150
Авторjackwener
Установок21,6K

Установка

SKILL.md

opencli-usage

OpenCLI turns any website, Electron desktop app, or external CLI into a uniform opencli <site> <command> surface that agents can drive without screen-scraping. This skill is the orientation layer — once you know what you want to do, load one of the specialized skills below.

The three pillars

  • Adapter commands — opencli <site> <command> [...]. Built-in adapters live in clis/, user adapters in ~/.opencli/clis/. Each is backed by a strategy (PUBLIC | COOKIE | INTERCEPT | UI | LOCAL) that tells you whether a Chrome session is needed.
  • Browser driving — opencli browser * subcommands (open, state, click, type, select, find, extract, network, …) for ad-hoc interaction and scraping when no adapter covers the task. See opencli-browser.
  • Current-tab binding — opencli browser <session> bind attaches the Chrome tab the user already opened/logged into to that browser session. Follow-up commands use opencli browser <session> .... See opencli-browser before using it; bound sessions still block tab mutation.
  • External CLI passthrough — opencli gh, opencli docker, opencli vercel, etc. Managed via opencli external install <name> (auto-install from external-clis.yaml) or opencli external register <name> (bring your own).

Install

# npm global
npm install -g @jackwener/opencli          # binary: opencli, requires Node >= 21
opencli doctor                              # run before browser-dependent work (see below)

# From source
git clone git@github.com:jackwener/OpenCLI.git
cd OpenCLI && npm install
npx tsx src/main.ts <command>               # same surface, no global install

opencli doctor prints a structured DoctorReport — daemon status, extension connection, version checks, and a live browser connectivity probe. Scope is narrow: it diagnoses the browser bridge (daemon + extension + Chrome wiring). PUBLIC / LOCAL adapters, opencli list, validate, verify, plugin commands, and external-CLI passthrough don't need it to be green — only COOKIE / INTERCEPT / UI adapters and the opencli browser * subcommands do. Flag: -v (verbose).

Prerequisites by command type

Strategy tag on opencli listWhat it needs
PUBLICNothing — pure HTTP, no browser.
COOKIEChrome logged into the target site + OpenCLI extension installed from the Chrome Web Store. Command captures the credential from your live session — no re-login.
INTERCEPTSame as COOKIE, plus opencli opens an automation window to capture a signed request.
UISame as COOKIE, full DOM interaction.
LOCALNo browser; talks to a local/dev endpoint.

Electron desktop apps (cursor, codex, chatwise, discord-app, doubao-app, antigravity, chatgpt-app) route through CDP against the running app — same cookie-less flow as a logged-in browser. Make sure the app is running before invoking.

Discover what's installed — don't read this file, run a command

opencli list                    # table, grouped by site
opencli list -f json            # machine-readable; pipe to jq or your agent
opencli list | grep -i twitter  # find commands for a specific site
opencli <site> --help           # see that site's commands + flags
opencli <site> <command> --help # see positional args and command-specific flags

Do not hard-code adapter lists — there are 100+ sites and the count moves every week. opencli list -f json is the source of truth; it emits one entry per command with {site, name, aliases, description, strategy, browser, args, columns, ...}. For an agent, that is always better than grepping a doc.

Before falling back to raw opencli browser commands on high-change authenticated sites, check whether a site adapter already exposes the workflow. For example, ChatGPT web has higher-level commands for conversation reads and Deep Research result extraction; discover the current surface with opencli chatgpt --help or opencli list -f json.

Universal flags (work on every adapter command)

flageffect
-f, --format <fmt>table (default in TTY) · yaml (default in non-TTY) · json · plain · md · csv. Pass explicitly when you want a specific shape; agents almost always want -f json.
-v, --verboseDebug logs + stack traces on failure; also sets OPENCLI_VERBOSE=1 for the process.

Command-specific flags (--limit, --tab, --filter, …) are not universal — consult <site> <command> --help.

Output formats

  • json — pretty-printed, 2-space indent. Default choice for agents.
  • plain — prints a single primary field for chat-style commands (response/content/text/value). Useful for piping to another tool.
  • yaml — fallback when output is not a TTY and -f is not explicit.
  • table — color-coded, site-grouped; meant for humans.
  • md, csv — straightforward tabular dumps.

A few commands override the default via cmd.defaultFormat (e.g. chat commands default to plain), so don't assume without reading --help.

Environment variables

variabledefaultpurpose
OPENCLI_BROWSER_CONNECT_TIMEOUT45Seconds to wait for the browser bridge.
OPENCLI_BROWSER_COMMAND_TIMEOUT60Per-command timeout.
OPENCLI_CDP_ENDPOINT—Manual CDP endpoint override (dev / remote Chrome / Electron).
OPENCLI_CACHE_DIR~/.opencli/cacheNetwork capture + browser-state cache.
OPENCLI_WINDOWcommand-specificforeground or background browser window mode.
OPENCLI_VERBOSEfalseVerbose logging (also triggered by -v).

Self-repair

When an adapter command fails because the site changed (selectors drifted, API rotated, response schema shifted), re-run with --trace retain-on-failure. The error envelope includes a trace block pointing at summary.md; patch only the adapterSourcePath from that summary and retry. Max 3 repair rounds. The full flow is in opencli-autofix.

Writing your own adapter

Two-path storage:

  • Private: ~/.opencli/clis/<site>/<command>.js — no build step, hot-available, not visible in the public package.
  • Public / PR: clis/<site>/<command>.js — for upstream contribution; requires build.

Scaffolding & verification:

opencli browser init <site>/<command>   # generates a skeleton
opencli validate [target]               # semantic checks on the loaded registry (description, domain, pipeline step names, func|pipeline|_lazy presence, arg duplicates) — no network, no browser
opencli verify [target] [--smoke]       # run the command with synthetic args
opencli browser verify <site>/<command> # end-to-end smoke inside the bridge

Adapters import only @jackwener/opencli/registry and @jackwener/opencli/errors. columns must align 1:1 (in name and order) with keys of the object returned by func. For the full workflow see opencli-adapter-author.

Plugins

Plugins are third-party extensions pulled from git, separate from the main adapter registry:

opencli plugin install github:user/repo    # install
opencli plugin list [-f json]              # see installed
opencli plugin update [name] | --all       # keep current
opencli plugin uninstall <name>
opencli plugin create <name>               # scaffold a new plugin

External CLI passthrough

Wraps external command-line tools so you can discover + invoke them through the same opencli … entrypoint:

opencli external install gh    # auto-install via brew/apt/npm per external-clis.yaml
opencli external register my-tool \
    --binary my-tool \
    --install "npm i -g my-tool" \
    --desc "My internal CLI"
opencli external list
opencli gh pr list --limit 5   # passthrough; stdio is inherited, exit code propagated
opencli docker ps

Built-in entries live in src/external-clis.yaml; user overrides and additions in ~/.opencli/external-clis.yaml. Commonly shipped: gh, docker, vercel, lark-cli, longbridge, dws, wecom-cli, obsidian, ntn, tg(tg-cli), discord(discord-cli), wx(wx-cli).

Some official CLIs use shell-script installers instead of a shell-free package-manager command. Entries without an install config, such as ntn, must be installed manually from their homepage before passthrough use.

Shell completion

opencli completion bash   # also: zsh, fish
# -> script on stdout; source or save per your shell's convention

Where to go next

If you're about to…Load this skill
Drive a live browser ad-hoc (no adapter available, or prototyping)opencli-browser
Write a new adapter, or add a command to an existing siteopencli-adapter-author
Fix a broken adapter after a command failureopencli-autofix
Route a search / lookup / research request to the right adaptersmart-search

Commands that used to exist

The following were removed in the PR #1094 consolidation — don't try to invoke them:

  • opencli explore <url> — superseded by opencli browser network + opencli browser find for live API discovery, and by the opencli-adapter-author workflow for capture.
  • opencli record <url> — removed; manual capture now lives in opencli browser network --detail.
  • opencli web read / opencli desktop * as top-level groups — folded into their respective adapters (opencli web read still exists as the web adapter's read command, but there is no standalone web / desktop top-level group command).

Don't

  • Don't paste this skill's command list into your plan; it will rot. Call opencli list -f json at the start of a task instead.
  • Don't assume every adapter needs a browser — strategy PUBLIC and LOCAL don't. Check the strategy field.
  • Don't silently fall back from a failing adapter to a hand-rolled fetch — --trace retain-on-failure gives you the browser evidence and adapter source path. Do that first.

Вставить в README

Ссылка на карточку для вашего README — без картинок и счётчиков.

[DarkPlay: opencli-usage](https://darkplay.ru/ai/skills/jackwener-opencli-opencli-usage)

Похожие скиллы и другие разделы каталога

Популярное в разделе «Скиллы»

Самые востребованные скиллов раздела по установкам и звёздам.

find-skillsvercel-labs · Помогает находить и устанавливать навыки агентов по запросам вроде «как сделать X»…
4 400 000 устан.
grill-memattpocock · Настойчивое интервью для доработки плана или дизайна.
1 600 000 устан.
hyperframesheygen-com · Обязательная точка входа для любых задач по видео, анимации и motion-графике в…
1 600 000 устан.
hyperframes-cliheygen-com · Цикл разработки HyperFrames CLI: init, add, render, preview, publish и другие команды.
1 600 000 устан.
agent-browservercel-labs · CLI для автоматизации браузера для ИИ-агентов: навигация по страницам, заполнение форм…
1 600 000 устан.
media-useheygen-com · Agent Media OS: единый навык для медиа в HyperFrames — BGM, SFX, изображения, голос, LUT.
1 500 000 устан.
hyperframes-registryheygen-com · Установка и подключение блоков реестра в композиции HyperFrames через add и catalog.
1 400 000 устан.
grill-with-docsmattpocock · Настойчивое интервью для доработки плана или дизайна, попутно создающее документацию (ADR…
1 300 000 устан.
improve-codebase-architecturemattpocock · Поиск в кодовой базе возможностей для углубления, визуальный HTML-отчёт о них и детальный…
1 300 000 устан.
tddmattpocock · Разработка через тестирование (TDD): red-green-refactor и интеграционные тесты.
1 300 000 устан.
Похожее в других разделах каталога

Соседние разделы каталога: возможно, нужный инструмент живёт там.

Harmonyos App Resolveraffaan-m · Эксперт по HarmonyOS на ArkTS и ArkUI: состояние V2, навигация, API и производительность.
225 587 ★
Rust Revieweraffaan-m · Ревьюер Rust: владение, времена жизни, ошибки, unsafe и идиомы.
225 587 ★
ruflo-cost-trackerruvnet · Отслеживание расхода токенов, атрибуция затрат на модели по агентам, оповещения о бюджете…
240 комп.
dash0anthropics · Наблюдаемость OpenTelemetry для сессий Claude Code. Записывает вызовы инструментов…
100 комп.
qdrant-skillsanthropics · Навыки для векторного поиска Qdrant: масштабирование, оптимизация производительности…
100 комп.
receiptsanthropics · Личный отчёт о работе с Claude Code для обоснования использования перед руководителем или…
100 комп.
session-reportanthropics · Генерация интерактивного HTML-отчёта об использовании сессий Claude Code — токены…
100 комп.
qdrant-skillsanthropics · Навыки агентов для векторного поиска Qdrant: масштабирование, оптимизация…
233 комп.
Blueprint Modegithub · Выполняет структурированные рабочие процессы (Debug, Express, Main, Loop) со строгим…
36 140 ★
Droidgithub · Даёт рекомендации по установке, примеры использования и шаблоны автоматизации для Droid…
36 140 ★

Лучшие ИИ-инструменты для генерации изображений

Генерация изображений

Подборка нейросетей для генерации изображений от фотореализма до концепт-арта. Сервисы, которые экономят часы ручной работы, создавая визуал для блогов, рекламы и дизайна за минуты

MagviMagvi
По запросу
5.0
DALL-E 3OpenAI
По подписке
5.0
SupaLabSupalab
По запросу
5.0
Freestyling.aiFreestyling
Есть бесплатный тариф
4.9
ArtGeneration.meArtgeneration
Есть бесплатный тариф
4.9
BigjpgBigjpg
По запросу
4.9
Художник от VKVK
Бесплатно
4.9
Wonderink — ИИ-книги
Есть бесплатный тариф
4.8
Avato AI12ai
По запросу
4.8
Virton AIVirton
По запросу
4.8

Лучшие ИИ-инструменты для автоматизации и ассистентов

Ассистенты и автоматизация

Подборка ИИ-ассистентов для автоматизации рутины и ускорения рабочих процессов. Сервисы, которые берут на себя переписку, анализ данных, ведение базы знаний и подготовку продаж, эк

Give Me Public
Есть бесплатный тариф
5.0
AITunnelAitunnel
По запросу
5.0
STIVAStiva
По запросу
5.0
Wikibot (Викибот)Wikibot
По запросу
4.9
mymeet.aiMymeet
По запросу
4.9
InsighterInsighter
По запросу
4.9
TGHuntTghunt
Есть бесплатный тариф
4.9
LegiscanLegiscan
По запросу
4.9
RouterAIRouterai
По запросу
4.9
Wikibot 1.0 (Викибот)Wikibot
По запросу
4.9

Лучшие ИИ-инструменты для генерации видео

Генерация видео

Подборка нейросетей для генерации и монтажа видео. Инструменты, которые превращают текст в готовые ролики, экономят часы на съемках и постпродакшне. Подходит для SMM-специалистов,

VEED.IOVeed
По запросу
5.0
MootionMootion
По запросу
5.0
FlyviFlyvi
Есть бесплатный тариф
4.9
Google Veo 3.1Google
Платно
4.9
Sora (OpenAI)OpenAI
Платно
4.9
PikaPika
Платно
4.9
captions space
Есть бесплатный тариф
4.8
Клайп
Есть бесплатный тариф
4.8
viralpulse.appViralpulse
По запросу
4.8
Viral Maker AIViral-maker
Есть бесплатный тариф
4.8