Commit Graph

50 Commits

Author SHA1 Message Date
jakevin 89a20e11bc docs: sync command references with current registry (#318) 2026-03-24 01:13:55 +08:00
jakevin 8bf750c4ea docs(SKILL.md): sync command reference — add missing sites and desktop adapters (#314)
- Remove hardcoded '150+ commands across 30+ sites' from description
- Fix verify → validate command name
- Add 15+ missing site command references: douban, facebook, instagram,
  tiktok, medium, substack, sinablog, lobsters, google, devto, steam, wikipedia
- Add Desktop Adapter Commands section with 7 adapters: cursor, codex,
  chatgpt, chatwise, notion, discord-app, doubao-app
2026-03-24 00:37:42 +08:00
jakevin c9b3568594 chore: pre-release cleanup — fix dependencies, sync docs, reduce code duplication (#311)
* chore: pre-release cleanup — fix dependencies, sync docs, reduce code duplication

- fix: move @types/turndown from dependencies to devDependencies
- docs: backfill CHANGELOG for v1.2.0 through v1.3.1
- docs: remove internal release reminder from READMEs
- docs: update SKILL.md version to 1.3.1
- refactor: extract getErrorMessage() to errors.ts (was duplicated 5x)
- refactor: introduce CommandArgs type alias in registry.ts
- refactor: eliminate as-any in runtime.ts and cli.ts
- refactor: parallelize site directory scanning in discovery.ts
- refactor: add declare global for registry globalThis access
- fix: strengthen isBooleanRecord type guard in explore.ts
- fix: replace empty catch with log.debug in explore.ts
- fix: daemon now accepts timeout from request body
- chore: remove unused REGISTRY_KEY constant
- chore: update generate.ts TODO to stub annotation

* docs: add doubao-app desktop adapter doc (fixes docs-build dead link)
2026-03-24 00:33:40 +08:00
AniChikage ea8324257d feat(yollomi): add new commands and update documentation in README files (#235)
* feat(yollomi): add new commands and update documentation in README files

- Added yollomi commands for generating images, videos, and editing capabilities.
- Updated README.md and README.zh-CN.md to include yollomi in the command list.
- Enhanced SKILL.md with yollomi-related tags and usage examples.

* feat(yollomi): add yollomi adapter to documentation

- Included yollomi in the VitePress configuration for browser adapters.
- Updated adapters index documentation to reflect yollomi's capabilities and commands.

* fix(yollomi): bug fixes, tests & improvements

- models.ts: add browser: false (no browser connection needed for hardcoded data)
- edit.ts: remove unused resolveImageInput import
- upload.ts: lower video upload limit from 100MB to 20MB (base64 OOM risk)
- generate.ts: improve file extension detection using URL.pathname
- upscale.ts: use choices for scale arg, improve extension detection
- object-remover.ts: make image/mask args positional
- Add yollomi models tests to public-commands.test.ts
- Add yollomi generate/video graceful-failure tests to browser-auth.test.ts

---------

Co-authored-by: anichikage <hanzhishuai@bytedance.com>
Co-authored-by: jackwener <jakevingoo@gmail.com>
2026-03-23 23:04:01 +08:00
Yee dff0fe510c feat(record): add live recording command for API capture (#300)
* feat(record): add live recording command for API capture

- Add `opencli record <url>` command that injects fetch/XHR interceptors
  into all tabs in the automation window, polls captured requests, and
  auto-generates YAML candidate adapters
- Support multi-tab recording: new tabs discovered during polling are
  automatically injected
- Add --timeout (default 60s) for agent-friendly non-blocking operation;
  stops on Enter, timeout, or SIGINT — whichever comes first
- Fix idempotent re-injection: restores original fetch/XHR before
  re-patching so guard flag no longer blocks subsequent record runs
- Add --poll interval option (default 2000ms)
- Expand SKILL.md with full Record Workflow section: interceptor
  internals, page-type capture expectations, YAML→TS conversion guide,
  and troubleshooting table

* fix(record): fix XHR listener leak, pathChain syntax error, readline hang & args interpolation

- XHR send(): add __rec_listener_added guard to prevent duplicate event
  listeners when XHR is reused (abort → open → send)
- pathChain: when findArrayPath returns '' (root-level array), data access
  is just 'data' not 'data?.' which was invalid JS syntax
- waitForEnter(): return cleanup fn so timeout path can close readline.Interface
  preventing the process from hanging on stdin after auto-timeout
- buildRecordedYaml: replace search/page query param values with template
  vars ({{args.keyword}}, {{args.page}}) so generated YAML actually uses
  the declared args instead of hardcoding the recorded URL

---------

Co-authored-by: yee.wang <yee.wang@lazada.com>
Co-authored-by: jackwener <jakevingoo@gmail.com>
2026-03-23 19:19:54 +08:00
jakevin b4a8089224 refactor: doctor defaults to live mode, remove setup command entirely (#263)
- Remove setup command completely (no backward compat needed)
- Doctor now runs live connectivity test by default
- Add --no-live flag to skip if needed
- Update SKILL.md docs
2026-03-22 22:51:28 +08:00
jakevin 428b831f85 refactor: deprecate opencli setup, enhance doctor with daemon auto-start (#262)
- Delete setup.ts (fully redundant with doctor)
- opencli setup now prints deprecation warning and delegates to doctor
- doctor auto-starts daemon if not running (no more false 'not connected')
- Update all doc references (README, SKILL.md, docs/)
2026-03-22 22:49:14 +08:00
jakevin 1ecac25df5 fix: correct SKILL.md github reference and add missing adapter docs (#230)
- SKILL.md: replace non-existent 'opencli github search' with correct
  'opencli gh' external CLI passthrough examples
- SKILL.md: remove 'github search' from public API commands list
- Add missing docs for douban, sinablog, substack adapters (fixes
  doc-check CI failure: 47/50 → 50/50)
- Add new adapter pages to VitePress sidebar config
2026-03-22 10:54:03 +08:00
jakevin 7776db83d7 docs: consolidate adapter docs and discovery loading (#212) 2026-03-22 00:24:45 +08:00
Kasumi fcff2e40be feat(grok): add opt-in --web flow for grok ask (#193) 2026-03-21 23:00:10 +08:00
jakevin 5de920a994 docs: fix additional issues found in deep review (#181)
- Add missing codex/dump to README command tables
- Fix reddit subreddit --name → positional
- Update architecture.md for PR #152 engine.ts split:
  engine.ts → discovery.ts + execution.ts + commanderAdapter.ts
- Add intercept and ui strategies to auth table
2026-03-21 03:10:05 +08:00
jakevin 8d45019119 docs: sync documentation with PR #150 arg renames and positional changes (#179) 2026-03-21 02:59:22 +08:00
jackwener 46d0f00aa6 chore: bump SKILL.md version to 1.1.0 2026-03-20 20:37:29 +08:00
jackwener b3e32d8a05 feat: add external CLI hub for discovery, auto-installation, and execution of external tools. 2026-03-20 20:30:40 +08:00
jackwener 02793e990e feat: add sinafinance 7x24 news adapter (#131)
Based on PR #131 by larria, with fixes applied:
- Renamed command 724 → news for clarity
- Fixed indentation to 2-space project standard
- Added SinaNewsItem type (removed item: any)
- Added res.ok check + CliError for HTTP failures
- Added stripHtml() for rich_text content
- Updated README, README.zh-CN, SKILL.md

Co-authored-by: larria <1115524+larria@users.noreply.github.com>
2026-03-20 17:22:42 +08:00
jackwener 10af754c89 docs: align CDP release notes 2026-03-20 00:51:55 +08:00
jackwener 3b6f72ca08 docs: fix extension install instructions — no store yet, no restart needed
- Remove 'Chrome Web Store' references (not published yet)
- Add detailed unpacked extension install steps (chrome://extensions)
- Remove 'restart Chrome' advice (Service Worker activates immediately)
- Direct users to chrome://extensions for troubleshooting
2026-03-19 16:57:40 +08:00
jackwener 3b33ade214 docs: update README, README.zh-CN, SKILL.md for new Browser Bridge architecture
- Replace all Playwright MCP Bridge references with opencli Browser Bridge
- Remove token setup, MCP config, and manual setup sections
- Simplify prerequisites: just install extension, zero config
- Update troubleshooting: daemon status/logs commands
- Update env vars: add OPENCLI_DAEMON_PORT, OPENCLI_VERBOSE
- Update SKILL.md tags: mcp,playwright → chrome-extension,cdp
2026-03-19 16:49:10 +08:00
jackwener abac070ce4 docs: update root README and SKILL with electron app marketing copy 2026-03-18 16:51:18 +08:00
jackwener 6024af3aa0 docs: split doctor --fix into interactive and non-interactive examples 2026-03-17 15:58:53 +08:00
jackwener 375beaa744 docs: polish README and SKILL
- Sort command table by count (descending), add Count column
- Add xiaohongshu `me`, boss `detail` to command references
- Add Self-healing setup highlight for doctor/setup workflow
- Document `doctor --live` and `doctor --fix` options
- Bump SKILL version to 0.7.3, expand tags
- Fix site count to 19, update descriptions
2026-03-17 14:50:14 +08:00
jackwener c714254d8f docs: add YouTube video and transcript commands to README and SKILL 2026-03-17 13:30:42 +08:00
jackwener a7c367a61b docs: update README and SKILL for new Reddit adapters
- Reddit: 4 → 15 commands (popular, read, user, user-posts,
  user-comments, upvote, save, comment, subscribe, saved, upvoted)
- Twitter: add thread command
- Xiaohongshu: remove non-existent me command
- SKILL.md: expand Reddit examples with full 15-command reference
2026-03-17 01:33:43 +08:00
jackwener 34e20d33f2 docs: bump version in SKILL.md to 0.7.0 2026-03-16 20:29:27 +08:00
jackwener 1c496bb85f docs: add new twitter commands (article, follow, unfollow, bookmark, unbookmark)
Also update profile example to use positional argument.
2026-03-16 20:18:50 +08:00
jackwener 6c64f617c6 docs: add opencli setup to READMEs, remove hardcoded counts, update SKILL.md to v0.6.0 2026-03-16 14:13:38 +08:00
jackwener 34a9bff2b3 refactor: eliminate code duplication, improve type safety, add tests
- NEW: src/interceptor.ts — unified XHR/Fetch interceptor (was duplicated 3x)
- NEW: src/version.ts — centralized PKG_VERSION (was duplicated 2x)
- NEW: src/constants.ts — shared VOLATILE_PARAMS, FIELD_ROLES etc.
- NEW: src/engine.test.ts, src/registry.test.ts — 14 new unit tests

- browser.ts: use shared normalizeEval, interceptor, withTimeoutMs, PKG_VERSION
- intercept.ts, tap.ts: use shared interceptor generators
- cascade.ts: extract shared buildFetchProbeJs (90% dedup)
- engine.ts: use InternalCliCommand (no more 'as any' casts)
- executor.ts: remove all 15 'as StepHandler' type casts
- runtime.ts: add withTimeoutMs, IBrowserFactory interface
- registry.ts: add InternalCliCommand type for internal fields
- validate.ts: add pipeline step name validation
- output.ts: remove 'null as any' and '.filter(() => true)' hacks
- explore.ts, synthesize.ts: use shared constants
- docs: fix V2EX commands (3→6), SKILL.md version, verify example

Tests: 88 passed (was 74), tsc --noEmit: 0 errors
2026-03-16 13:22:12 +08:00
jackwener 08ae9c3fed chore: sync SKILL.md version to 0.5.0 2026-03-16 12:46:30 +08:00
jackwener 7a24e8d74b fix: add engines field for Node badge, sync SKILL.md version, fix zh-CN intro 2026-03-16 12:46:15 +08:00
jackwener 95fb841fc7 refactor: remove all CDP code, keep extension-only mode
- Remove CDP auto-discovery (discoverChromeEndpoint, isCdpApiAvailable, isPortReachable)
- Remove CDP readiness probe and autoAllowCdpDialog
- Remove forceExtension plumbing from registry, runtime, main, and adapters
- Remove CDP diagnostics from doctor (extractTokenViaCdp, remoteDebugging fields)
- Simplify connect() to always use --extension mode
- Remove CDP env vars (OPENCLI_USE_CDP, OPENCLI_CDP_ENDPOINT, OPENCLI_FORCE_EXTENSION)
- Update README.md, README.zh-CN.md, SKILL.md to remove CDP sections
- Update tests to remove CDP-related assertions

Current state preserved in extension-and-cdp branch.
2026-03-16 12:44:09 +08:00
jackwener e2192a2e8d docs: rename CLI-CREATOR → CLI-EXPLORER, add CLI-ONESHOT refs to READMEs
- Rename CLI-CREATOR.md → CLI-EXPLORER.md (explorer better reflects its purpose)
- Update all references across SKILL.md, README.md, README.zh-CN.md, CLI-ONESHOT.md
- Add quick-mode (CLI-ONESHOT) and full-mode (CLI-EXPLORER) entries in both READMEs
2026-03-15 23:58:10 +08:00
jackwener 8e5a61458d docs: add CLI-ONESHOT.md — lightweight one-shot CLI generator guide
- CLI-ONESHOT.md: ~150 lines, 4-step flow for single-URL adapter generation
- Update SKILL.md: add quick-mode tip pointing to CLI-ONESHOT.md
- Update CLI-CREATOR.md: add tip pointing to lightweight alternative
2026-03-15 23:30:13 +08:00
jackwener ee6669f45d feat(core): support YAML format output and optimize manifest builder 2026-03-15 21:05:36 +08:00
jackwener a6e9c3b611 feat(browser): enhance CDP auto-discovery with port probe & opt-in priority
- Add TCP port reachability check to handle stale DevToolsActivePort files
- Make discoverChromeEndpoint() async with port probe before returning
- Change connection priority: extension mode is default, CDP is opt-in
  - OPENCLI_CDP_ENDPOINT: explicit CDP endpoint
  - OPENCLI_USE_CDP=1: enable DevToolsActivePort auto-discovery
  - Default: --extension mode (Playwright MCP Bridge)
- Add verbose logging for CDP discovery when -v flag is used
- Fix indentation inconsistency in connect() method
- Update README.md, README.zh-CN.md, SKILL.md with new connection docs
2026-03-15 19:44:27 +08:00
jackwener da155e96f0 feat: add forceExtension to bypass CDP detection for anti-bot sites
- Added forceExtension flag to CliCommand, CliOptions, browserSession, and PlaywrightMCP.connect()
- BOSS Zhipin detects CDP mode and drops connections; marked boss/search with forceExtension: true
- Also supports OPENCLI_FORCE_EXTENSION=1 env var for global override
- Fixed async discoverChromeEndpoint() placement outside Promise constructor
- Enhanced boss search with city names, experience, degree, salary, etc.
2026-03-15 19:39:39 +08:00
jackwener 3ac5aa3023 docs: reduce excessive emoji usage across markdown files 2026-03-15 19:30:32 +08:00
jackwener 9a6e157af6 docs: add strong AI Agent prompts to read CLI-CREATOR.md before creating adapters 2026-03-15 19:28:05 +08:00
jackwener 7ec04c66cb docs: deep review fixes — sync command tables to actual 47 commands
- Command count 46 → 47 (added following)
- bilibili row: add 'following' command
- github row: remove non-existent 'trending', change mode to Public
- SKILL.md: add following, xueqiu hot/search commands
- Fix github section from 'trending=browser' to 'public'
2026-03-15 18:41:14 +08:00
jackwener ee2e0a3bfc docs: update command tables to 46 commands, add subtitle/dynamic/ranking/frontpage/subreddit/profile/timeline/me/user, update SKILL.md version 2026-03-15 18:16:26 +08:00
jackwener 790c94d644 feat: Add Xueqiu site with 6 new commands and a Twitter bookmarks command, updating documentation. 2026-03-15 16:03:45 +08:00
jackwener 829172fc59 feat: introduce browser interception and auto-scroll utilities, enable dynamic loading of TypeScript CLIs, and add a JSON template filter 2026-03-15 15:42:19 +08:00
jackwener 0fd9adf0f5 feat: add 8 new sites — bbc, weibo, boss, yahoo-finance, reuters, smzdm, ctrip, youtube
New adapters ported from bb-sites:
- bbc/news: BBC News RSS headlines (public API)
- weibo/hot: 微博热搜 (browser)
- boss/search: BOSS直聘搜索职位 (browser)
- yahoo-finance/quote: 股票行情 (browser)
- reuters/search: 路透社新闻搜索 (browser)
- smzdm/search: 什么值得买搜索好价 (browser)
- ctrip/search: 携程旅行搜索 (browser)
- youtube/search: YouTube视频搜索 (browser)

Also: build script adds clean-yaml step, docs updated to 28 commands / 16 sites
2026-03-15 08:46:13 +08:00
jackwener 999d340a34 refactor: remove xiaohongshu me, add lessons learned, fix docs
- Remove xiaohongshu/me (profile page async loading too unreliable)
- CLI-CREATOR: add 4 lessons to 常见陷阱 (stale dist YAML, TS IIFE
  format, async polling, YAML vs TS threshold)
- Fix build: clean-yaml before copy to prevent stale overrides
- Fix docs: MCP token is configured via MCP config, not env var
- Update all command lists (README, README.zh-CN, SKILL.md)
2026-03-15 08:10:40 +08:00
jackwener fd94a5d27b fix: auto-close tabs after command, add login requirement reminders
- browser.ts: close all tabs opened during session (not just extension tabs)
  uses _initialTabCount to restore Chrome to pre-command state
- README/README.zh-CN: add ⚠️ login requirement warning with examples
- SKILL.md: add login note and tab auto-close mention
2026-03-15 07:57:12 +08:00
jackwener 9df96db598 refactor: pipeline error propagation, me.yaml→me.ts, docs overhaul
Code:
- pipeline.ts: warn on stderr when step returns {error} object
- xiaohongshu/me.yaml → me.ts (evaluate code belongs in TS)
- index.ts: register xiaohongshu/me.ts

Docs:
- CLI-CREATOR: YAML vs TS decision tree, tap step docs with
  real example, 'explore store first' debugging workflow
- SKILL.md: add tap to Pipeline Steps table, update XHS commands
- README + README.zh-CN: update xiaohongshu command list
2026-03-15 07:51:20 +08:00
jackwener 7c88c603c8 docs: add CLI-CREATOR.md + fix MCP token config instructions
- CLI-CREATOR.md: comprehensive adapter development guide with
  5-tier strategy decision tree, YAML/TS templates, XHR interception
  pattern, common pitfalls, and AI Agent auto-generation workflow
- Fix all docs: MCP Bridge connects via PLAYWRIGHT_MCP_EXTENSION_TOKEN
  in MCP config (not by clicking to approve)
2026-03-15 07:23:16 +08:00
jackwener 81c8ad522b docs: add npm install, update guide, Chinese README
- README.md: npm install -g as primary, update instructions, release guide
- README.zh-CN.md: full Chinese version with same structure
- SKILL.md: updated install section with npm global install
- Both READMEs link to each other
2026-03-15 07:20:27 +08:00
jackwener d35d78d836 docs: polish README and SKILL for v0.1.0
README:
- Cleaner structure, accurate 25 commands / 13 sites
- Correct strategy labels (v2ex=public, not cookie)
- Explore artifacts documentation
- Better formatting and English/Chinese mix

SKILL:
- 5-tier authentication strategy table
- Public API YAML pattern example
- TS escape hatch guidance
- intercept pipeline step docs
- Troubleshooting section
2026-03-15 07:18:17 +08:00
jackwener 1ee4919a24 docs: update README and SKILL with new features
- Fix directory path: ai-native-cli → opencli
- Add reddit, zhihu/question to command tables
- Add AI Agent workflow section with cascade command
- Add intercept pipeline step to reference
- Add reddit examples to SKILL.md
2026-03-15 07:01:01 +08:00
jackwener d4133f955b feat: opencli TypeScript rewrite with 20 commands across 11 sites 2026-03-15 06:23:17 +08:00