2026-03-15 06:23:17 +08:00
|
|
|
{
|
2026-03-15 06:38:16 +08:00
|
|
|
"name": "@jackwener/opencli",
|
chore: release v1.4.0 (#413)
* chore: release v1.4.0
* docs: sync command references across SKILL.md, README, and docs
SKILL.md:
- Add 12 missing sites: apple-podcasts, arxiv, bloomberg, coupang,
dictionary, doubao, jd, linkedin, pixiv, web, weixin, xiaoyuzhou
- Add 36 missing commands across 6 existing sites (twitter, hackernews,
yollomi, xueqiu, linux-do, v2ex)
README (EN + zh-CN):
- Add linkedin timeline command
docs/:
- Add 13 missing adapters to vitepress sidebar navigation
- Add 6 missing adapters to docs/adapters/index.md overview table
- Update xueqiu commands with fund-holdings, fund-snapshot
2026-03-25 14:48:46 +08:00
|
|
|
"version": "1.4.0",
|
2026-03-15 06:38:16 +08:00
|
|
|
"publishConfig": {
|
|
|
|
|
"access": "public"
|
|
|
|
|
},
|
2026-03-15 06:23:17 +08:00
|
|
|
"description": "Make any website your CLI. AI-powered.",
|
2026-03-16 12:46:15 +08:00
|
|
|
"engines": {
|
2026-03-18 23:52:49 +08:00
|
|
|
"node": ">=20.0.0"
|
2026-03-16 12:46:15 +08:00
|
|
|
},
|
2026-03-15 06:23:17 +08:00
|
|
|
"type": "module",
|
|
|
|
|
"main": "dist/main.js",
|
|
|
|
|
"bin": {
|
|
|
|
|
"opencli": "dist/main.js"
|
|
|
|
|
},
|
feat: plugin system (Stage 0-2)
* feat: plugin system (Stage 0-2)
- Stage 0: discoverPlugins() scans ~/.opencli/plugins/ at startup
- Stage 1: demo plugin repos (github-trending, hot-digest)
- Stage 2: opencli plugin install/uninstall/list commands
- package.json exports ./registry for TS plugin peerDep support
- 17 new/updated tests, tsc --noEmit clean
* fix: CDPBridge connect timeout unit mismatch (seconds vs ms)
opts.timeout is passed in seconds from runtime.ts but CDPBridge
was using it as milliseconds, causing instant timeout (30ms).
* feat: add registry-api public entry point for TS plugin peerDep support
- Add src/registry-api.ts: re-exports core registration API (cli, Strategy,
getRegistry) without transitive side-effects, safe for plugin imports
- Update package.json exports: './registry' -> './dist/registry-api.js'
- Update src/registry.ts: use globalThis shared registry to ensure single
instance across npm-linked plugin modules
- Update .gitignore for plugin-related artifacts
* fix: symlink host opencli into plugin node_modules on install
After npm install, replace the npm-installed @jackwener/opencli
with a symlink to the running host's package root. This ensures
TS plugins always resolve '@jackwener/opencli/registry' against
the host installation, avoiding version mismatches when the
published npm package lags behind.
* fix: transpile TS plugins to JS on install, deduplicate .ts/.js discovery
- installPlugin: after symlinking host opencli, transpile any .ts files
to .js using esbuild from the host's node_modules/.bin/
- discoverPluginDir: skip .ts files when a .js sibling exists (production
node cannot load .ts directly)
- scanPluginCommands: deduplicate basenames via Set to avoid showing
'aggregate, aggregate' when both .ts and .js exist
* docs: add plugin system user guide
- New docs/guide/plugins.md covering:
- Installation/uninstallation commands
- Creating YAML plugins (zero-dep)
- Creating TS plugins (with peerDep)
- TS plugin install lifecycle (clone → deps → symlink → transpile)
- Example plugins and troubleshooting
- Add Plugins to VitePress sidebar (EN + ZH)
- Link from getting-started.md Next Steps
* fix: address review issues in plugin system
- Security: replace execSync with execFileSync to prevent shell injection
- Replace deprecated npm --production with --omit=dev
- Tighten parseSource regex to [\w.-]+ to reject special chars
- Fix ZH sidebar plugin link (/guide/plugins → /zh/guide/plugins)
- Return plugin name from installPlugin() to avoid duplicated logic
- Use execFileSync for esbuild transpilation
- Fix misleading comment in linkHostOpencli
---------
Co-authored-by: jackwener <jakevingoo@gmail.com>
2026-03-21 19:41:15 +08:00
|
|
|
"exports": {
|
|
|
|
|
".": "./dist/main.js",
|
|
|
|
|
"./registry": "./dist/registry-api.js"
|
|
|
|
|
},
|
2026-03-15 06:23:17 +08:00
|
|
|
"scripts": {
|
|
|
|
|
"dev": "tsx src/main.ts",
|
2026-03-22 04:14:07 +08:00
|
|
|
"build": "npm run clean-dist && tsc && npm run clean-yaml && npm run copy-yaml && npm run build-manifest",
|
2026-03-16 18:14:27 +08:00
|
|
|
"build-manifest": "node dist/build-manifest.js",
|
2026-03-22 04:14:07 +08:00
|
|
|
"clean-dist": "node scripts/clean-dist.cjs",
|
2026-03-17 17:01:51 +08:00
|
|
|
"clean-yaml": "node scripts/clean-yaml.cjs",
|
|
|
|
|
"copy-yaml": "node scripts/copy-yaml.cjs",
|
2026-03-15 06:23:17 +08:00
|
|
|
"start": "node dist/main.js",
|
2026-03-17 16:33:19 +08:00
|
|
|
"postinstall": "node scripts/postinstall.js || true",
|
2026-03-15 06:23:17 +08:00
|
|
|
"typecheck": "tsc --noEmit",
|
|
|
|
|
"lint": "tsc --noEmit",
|
2026-03-15 08:46:13 +08:00
|
|
|
"prepublishOnly": "npm run build",
|
2026-03-22 00:11:51 +08:00
|
|
|
"test": "vitest run --project unit",
|
2026-03-24 12:03:26 +08:00
|
|
|
"test:adapter": "vitest run --project adapter",
|
2026-03-22 00:11:51 +08:00
|
|
|
"test:all": "vitest run",
|
|
|
|
|
"test:e2e": "vitest run --project e2e",
|
docs: add VitePress documentation site (#112)
- Add VitePress with full navigation, sidebar, i18n (en/zh), local search
- Create 50+ doc pages: guide, adapters (browser + desktop), developer, advanced
- Migrate content from README.md, CONTRIBUTING.md, TESTING.md, CDP.md, CLI-ELECTRON.md
- Migrate all 11 adapter READMEs to structured documentation
- Add new pages: architecture, yaml-adapter guide, ts-adapter guide, ai-workflow
- Add GitHub Actions workflow for deploying to GitHub Pages
- Add Chinese locale pages (getting-started, installation, browser-bridge, etc.)
- Add docs:dev, docs:build, docs:preview npm scripts
2026-03-20 14:11:56 +08:00
|
|
|
"docs:dev": "vitepress dev docs",
|
|
|
|
|
"docs:build": "vitepress build docs",
|
|
|
|
|
"docs:preview": "vitepress preview docs"
|
2026-03-15 06:23:17 +08:00
|
|
|
},
|
2026-03-15 06:32:01 +08:00
|
|
|
"keywords": [
|
|
|
|
|
"cli",
|
|
|
|
|
"browser",
|
|
|
|
|
"web",
|
2026-03-19 16:36:06 +08:00
|
|
|
"ai"
|
2026-03-15 06:32:01 +08:00
|
|
|
],
|
2026-03-15 06:23:17 +08:00
|
|
|
"author": "jackwener",
|
2026-03-17 01:34:51 +08:00
|
|
|
"license": "Apache-2.0",
|
2026-03-15 06:23:17 +08:00
|
|
|
"repository": {
|
|
|
|
|
"type": "git",
|
|
|
|
|
"url": "git+https://github.com/jackwener/opencli.git"
|
|
|
|
|
},
|
|
|
|
|
"dependencies": {
|
|
|
|
|
"chalk": "^5.3.0",
|
|
|
|
|
"cli-table3": "^0.6.5",
|
2026-03-19 00:03:01 +08:00
|
|
|
"commander": "^14.0.3",
|
feat: replace @playwright/mcp with lightweight daemon + Chrome Extension
Architecture:
- Micro-daemon (HTTP + WebSocket bridge, ~190 lines, auto-start/idle-exit)
- Chrome MV3 Extension using chrome.debugger CDP (10KB build)
- 5 protocol actions: exec, navigate, tabs, cookies, screenshot
- All DOM ops via JS evaluate — no extension update needed for new features
Key features:
- CDP Runtime.evaluate for JS execution in page context
- Tab management, cookie access via Chrome APIs
- Auto-start daemon on cold boot, idle auto-exit (5min)
- Minimal permissions: debugger, tabs, cookies, activeTab, alarms
Tested: zhihu hot (14.3s), twitter timeline (9.3s)
2026-03-19 06:08:55 +08:00
|
|
|
"js-yaml": "^4.1.0",
|
2026-03-23 14:46:08 +08:00
|
|
|
"turndown": "^7.2.2",
|
feat: replace @playwright/mcp with lightweight daemon + Chrome Extension
Architecture:
- Micro-daemon (HTTP + WebSocket bridge, ~190 lines, auto-start/idle-exit)
- Chrome MV3 Extension using chrome.debugger CDP (10KB build)
- 5 protocol actions: exec, navigate, tabs, cookies, screenshot
- All DOM ops via JS evaluate — no extension update needed for new features
Key features:
- CDP Runtime.evaluate for JS execution in page context
- Tab management, cookie access via Chrome APIs
- Auto-start daemon on cold boot, idle auto-exit (5min)
- Minimal permissions: debugger, tabs, cookies, activeTab, alarms
Tested: zhihu hot (14.3s), twitter timeline (9.3s)
2026-03-19 06:08:55 +08:00
|
|
|
"ws": "^8.18.0"
|
2026-03-15 06:23:17 +08:00
|
|
|
},
|
|
|
|
|
"devDependencies": {
|
|
|
|
|
"@types/js-yaml": "^4.0.9",
|
|
|
|
|
"@types/node": "^22.13.10",
|
2026-03-24 00:33:40 +08:00
|
|
|
"@types/turndown": "^5.0.6",
|
docs: add VitePress documentation site (#112)
- Add VitePress with full navigation, sidebar, i18n (en/zh), local search
- Create 50+ doc pages: guide, adapters (browser + desktop), developer, advanced
- Migrate content from README.md, CONTRIBUTING.md, TESTING.md, CDP.md, CLI-ELECTRON.md
- Migrate all 11 adapter READMEs to structured documentation
- Add new pages: architecture, yaml-adapter guide, ts-adapter guide, ai-workflow
- Add GitHub Actions workflow for deploying to GitHub Pages
- Add Chinese locale pages (getting-started, installation, browser-bridge, etc.)
- Add docs:dev, docs:build, docs:preview npm scripts
2026-03-20 14:11:56 +08:00
|
|
|
"@types/ws": "^8.5.13",
|
2026-03-15 06:23:17 +08:00
|
|
|
"tsx": "^4.19.3",
|
2026-03-24 14:51:15 +08:00
|
|
|
"typescript": "^6.0.2",
|
docs: add VitePress documentation site (#112)
- Add VitePress with full navigation, sidebar, i18n (en/zh), local search
- Create 50+ doc pages: guide, adapters (browser + desktop), developer, advanced
- Migrate content from README.md, CONTRIBUTING.md, TESTING.md, CDP.md, CLI-ELECTRON.md
- Migrate all 11 adapter READMEs to structured documentation
- Add new pages: architecture, yaml-adapter guide, ts-adapter guide, ai-workflow
- Add GitHub Actions workflow for deploying to GitHub Pages
- Add Chinese locale pages (getting-started, installation, browser-bridge, etc.)
- Add docs:dev, docs:build, docs:preview npm scripts
2026-03-20 14:11:56 +08:00
|
|
|
"vitepress": "^1.6.4",
|
2026-03-15 08:46:13 +08:00
|
|
|
"vitest": "^4.1.0"
|
2026-03-15 06:23:17 +08:00
|
|
|
}
|
|
|
|
|
}
|