@jackwener/opencli 1.0.1 โ 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/build-extension.yml +80 -0
- package/.github/workflows/ci.yml +6 -6
- package/.github/workflows/docs.yml +52 -0
- package/.github/workflows/e2e-headed.yml +2 -2
- package/.github/workflows/pkg-pr-new.yml +2 -2
- package/.github/workflows/release.yml +2 -5
- package/.github/workflows/security.yml +2 -2
- package/CDP.md +1 -1
- package/CDP.zh-CN.md +1 -1
- package/README.md +42 -34
- package/README.zh-CN.md +42 -34
- package/SKILL.md +3 -5
- package/dist/browser/cdp.d.ts +42 -0
- package/dist/browser/cdp.js +339 -0
- package/dist/browser/daemon-client.d.ts +3 -1
- package/dist/browser/daemon-client.js +4 -0
- package/dist/browser/dom-helpers.d.ts +20 -0
- package/dist/browser/dom-helpers.js +109 -0
- package/dist/browser/index.d.ts +3 -0
- package/dist/browser/index.js +4 -0
- package/dist/browser/mcp.d.ts +1 -0
- package/dist/browser/mcp.js +10 -5
- package/dist/browser/page.d.ts +7 -0
- package/dist/browser/page.js +39 -123
- package/dist/browser/utils.d.ts +10 -0
- package/dist/browser/utils.js +27 -0
- package/dist/browser.test.js +49 -1
- package/dist/build-manifest.js +3 -1
- package/dist/build-manifest.test.js +34 -0
- package/dist/capabilityRouting.d.ts +2 -0
- package/dist/capabilityRouting.js +30 -0
- package/dist/capabilityRouting.test.d.ts +1 -0
- package/dist/capabilityRouting.test.js +42 -0
- package/dist/chaoxing.d.ts +58 -0
- package/dist/chaoxing.js +225 -0
- package/dist/chaoxing.test.d.ts +1 -0
- package/dist/chaoxing.test.js +45 -0
- package/dist/cli-manifest.json +885 -48
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +234 -0
- package/dist/clis/antigravity/serve.d.ts +14 -0
- package/dist/clis/antigravity/serve.js +263 -0
- package/dist/clis/bilibili/download.js +4 -14
- package/dist/clis/boss/chatlist.d.ts +1 -0
- package/dist/clis/boss/chatlist.js +50 -0
- package/dist/clis/boss/chatmsg.d.ts +1 -0
- package/dist/clis/boss/chatmsg.js +73 -0
- package/dist/clis/boss/resume.d.ts +1 -0
- package/dist/clis/boss/resume.js +249 -0
- package/dist/clis/boss/send.d.ts +1 -0
- package/dist/clis/boss/send.js +176 -0
- package/dist/clis/chaoxing/assignments.d.ts +1 -0
- package/dist/clis/chaoxing/assignments.js +74 -0
- package/dist/clis/chaoxing/exams.d.ts +1 -0
- package/dist/clis/chaoxing/exams.js +74 -0
- package/dist/clis/chatgpt/ask.js +15 -14
- package/dist/clis/chatgpt/ax.d.ts +1 -0
- package/dist/clis/chatgpt/ax.js +78 -0
- package/dist/clis/chatgpt/read.js +5 -6
- package/dist/clis/hf/top.d.ts +1 -0
- package/dist/clis/hf/top.js +119 -0
- package/dist/clis/jike/comment.d.ts +1 -0
- package/dist/clis/jike/comment.js +107 -0
- package/dist/clis/jike/create.d.ts +1 -0
- package/dist/clis/jike/create.js +106 -0
- package/dist/clis/jike/feed.d.ts +1 -0
- package/dist/clis/jike/feed.js +67 -0
- package/dist/clis/jike/like.d.ts +1 -0
- package/dist/clis/jike/like.js +61 -0
- package/dist/clis/jike/notifications.d.ts +1 -0
- package/dist/clis/jike/notifications.js +169 -0
- package/dist/clis/jike/post.yaml +58 -0
- package/dist/clis/jike/repost.d.ts +1 -0
- package/dist/clis/jike/repost.js +103 -0
- package/dist/clis/jike/search.d.ts +1 -0
- package/dist/clis/jike/search.js +67 -0
- package/dist/clis/jike/shared.d.ts +19 -0
- package/dist/clis/jike/shared.js +25 -0
- package/dist/clis/jike/topic.yaml +52 -0
- package/dist/clis/jike/user.yaml +51 -0
- package/dist/clis/smzdm/search.js +28 -39
- package/dist/clis/stackoverflow/bounties.yaml +29 -0
- package/dist/clis/stackoverflow/hot.yaml +28 -0
- package/dist/clis/stackoverflow/search.yaml +32 -0
- package/dist/clis/stackoverflow/unanswered.yaml +28 -0
- package/dist/clis/twitter/download.js +6 -16
- package/dist/clis/twitter/post.js +9 -2
- package/dist/clis/twitter/search.js +14 -33
- package/dist/clis/xiaohongshu/download.d.ts +1 -1
- package/dist/clis/xiaohongshu/download.js +4 -4
- package/dist/clis/zhihu/download.js +3 -3
- package/dist/doctor.d.ts +7 -0
- package/dist/doctor.js +16 -0
- package/dist/download/index.d.ts +12 -8
- package/dist/download/index.js +11 -3
- package/dist/download/index.test.d.ts +1 -0
- package/dist/download/index.test.js +14 -0
- package/dist/engine.js +25 -14
- package/dist/explore.d.ts +1 -0
- package/dist/explore.js +48 -103
- package/dist/generate.js +1 -0
- package/dist/interceptor.js +3 -2
- package/dist/main.js +4 -193
- package/dist/output.d.ts +2 -1
- package/dist/output.js +3 -1
- package/dist/pipeline/executor.test.js +1 -0
- package/dist/pipeline/steps/download.js +14 -18
- package/dist/registry.d.ts +4 -3
- package/dist/registry.js +5 -2
- package/dist/runtime.d.ts +4 -1
- package/dist/runtime.js +2 -2
- package/dist/scripts/framework.d.ts +4 -0
- package/dist/scripts/framework.js +21 -0
- package/dist/scripts/interact.d.ts +4 -0
- package/dist/scripts/interact.js +20 -0
- package/dist/scripts/store.d.ts +9 -0
- package/dist/scripts/store.js +44 -0
- package/dist/synthesize.js +1 -1
- package/dist/types.d.ts +12 -0
- package/dist/verify.d.ts +6 -1
- package/dist/verify.js +54 -2
- package/docs/.vitepress/config.mts +193 -0
- package/docs/adapters/browser/apple-podcasts.md +28 -0
- package/docs/adapters/browser/bbc.md +26 -0
- package/docs/adapters/browser/bilibili.md +38 -0
- package/docs/adapters/browser/boss.md +28 -0
- package/docs/adapters/browser/coupang.md +28 -0
- package/docs/adapters/browser/ctrip.md +27 -0
- package/docs/adapters/browser/github.md +26 -0
- package/docs/adapters/browser/hackernews.md +26 -0
- package/docs/adapters/browser/linkedin.md +27 -0
- package/docs/adapters/browser/reddit.md +41 -0
- package/docs/adapters/browser/reuters.md +27 -0
- package/docs/adapters/browser/smzdm.md +27 -0
- package/docs/adapters/browser/twitter.md +47 -0
- package/docs/adapters/browser/v2ex.md +32 -0
- package/docs/adapters/browser/weibo.md +27 -0
- package/docs/adapters/browser/xiaohongshu.md +32 -0
- package/docs/adapters/browser/xiaoyuzhou.md +28 -0
- package/docs/adapters/browser/xueqiu.md +32 -0
- package/docs/adapters/browser/yahoo-finance.md +26 -0
- package/docs/adapters/browser/youtube.md +29 -0
- package/docs/adapters/browser/zhihu.md +30 -0
- package/docs/adapters/desktop/antigravity.md +46 -0
- package/docs/adapters/desktop/chatgpt.md +43 -0
- package/docs/adapters/desktop/chatwise.md +38 -0
- package/docs/adapters/desktop/codex.md +32 -0
- package/docs/adapters/desktop/cursor.md +33 -0
- package/docs/adapters/desktop/discord.md +28 -0
- package/docs/adapters/desktop/feishu.md +20 -0
- package/docs/adapters/desktop/neteasemusic.md +31 -0
- package/docs/adapters/desktop/notion.md +29 -0
- package/docs/adapters/desktop/wechat.md +28 -0
- package/docs/adapters/index.md +49 -0
- package/docs/advanced/cdp.md +103 -0
- package/docs/advanced/download.md +63 -0
- package/docs/advanced/electron.md +125 -0
- package/docs/advanced/remote-chrome.md +72 -0
- package/docs/developer/ai-workflow.md +66 -0
- package/docs/developer/architecture.md +90 -0
- package/docs/developer/contributing.md +136 -0
- package/docs/developer/testing.md +237 -0
- package/docs/developer/ts-adapter.md +87 -0
- package/docs/developer/yaml-adapter.md +108 -0
- package/docs/guide/browser-bridge.md +38 -0
- package/docs/guide/getting-started.md +56 -0
- package/docs/guide/installation.md +37 -0
- package/docs/guide/troubleshooting.md +56 -0
- package/docs/index.md +35 -0
- package/docs/zh/adapters/index.md +5 -0
- package/docs/zh/advanced/cdp.md +3 -0
- package/docs/zh/developer/contributing.md +24 -0
- package/docs/zh/guide/browser-bridge.md +25 -0
- package/docs/zh/guide/getting-started.md +40 -0
- package/docs/zh/guide/installation.md +37 -0
- package/docs/zh/index.md +29 -0
- package/extension/dist/background.js +386 -438
- package/extension/manifest.json +2 -2
- package/extension/package-lock.json +1156 -0
- package/extension/src/background.test.ts +151 -0
- package/extension/src/background.ts +124 -53
- package/extension/src/protocol.ts +3 -1
- package/package.json +7 -3
- package/src/browser/cdp.ts +367 -0
- package/src/browser/daemon-client.ts +7 -1
- package/src/browser/dom-helpers.ts +116 -0
- package/src/browser/index.ts +4 -0
- package/src/browser/mcp.ts +14 -6
- package/src/browser/page.ts +47 -124
- package/src/browser/utils.ts +27 -0
- package/src/browser.test.ts +56 -0
- package/src/build-manifest.test.ts +36 -0
- package/src/build-manifest.ts +2 -1
- package/src/capabilityRouting.test.ts +47 -0
- package/src/capabilityRouting.ts +28 -0
- package/src/chaoxing.test.ts +53 -0
- package/src/chaoxing.ts +268 -0
- package/src/cli.ts +205 -0
- package/src/clis/antigravity/SKILL.md +5 -0
- package/src/clis/antigravity/serve.ts +329 -0
- package/src/clis/bilibili/download.ts +4 -15
- package/src/clis/boss/chatlist.ts +50 -0
- package/src/clis/boss/chatmsg.ts +70 -0
- package/src/clis/boss/resume.ts +262 -0
- package/src/clis/boss/send.ts +193 -0
- package/src/clis/chaoxing/README.md +36 -0
- package/src/clis/chaoxing/README.zh-CN.md +35 -0
- package/src/clis/chaoxing/assignments.ts +88 -0
- package/src/clis/chaoxing/exams.ts +88 -0
- package/src/clis/chatgpt/ask.ts +14 -15
- package/src/clis/chatgpt/ax.ts +81 -0
- package/src/clis/chatgpt/read.ts +5 -7
- package/src/clis/hf/top.ts +141 -0
- package/src/clis/jike/comment.ts +113 -0
- package/src/clis/jike/create.ts +113 -0
- package/src/clis/jike/feed.ts +74 -0
- package/src/clis/jike/like.ts +65 -0
- package/src/clis/jike/notifications.ts +185 -0
- package/src/clis/jike/post.yaml +58 -0
- package/src/clis/jike/repost.ts +114 -0
- package/src/clis/jike/search.ts +74 -0
- package/src/clis/jike/shared.ts +36 -0
- package/src/clis/jike/topic.yaml +52 -0
- package/src/clis/jike/user.yaml +51 -0
- package/src/clis/smzdm/search.ts +30 -39
- package/src/clis/stackoverflow/bounties.yaml +29 -0
- package/src/clis/stackoverflow/hot.yaml +28 -0
- package/src/clis/stackoverflow/search.yaml +32 -0
- package/src/clis/stackoverflow/unanswered.yaml +28 -0
- package/src/clis/twitter/download.ts +6 -17
- package/src/clis/twitter/post.ts +9 -2
- package/src/clis/twitter/search.ts +15 -33
- package/src/clis/xiaohongshu/download.ts +4 -4
- package/src/clis/zhihu/download.ts +3 -3
- package/src/doctor.ts +18 -2
- package/src/download/index.test.ts +16 -0
- package/src/download/index.ts +22 -4
- package/src/engine.ts +20 -13
- package/src/explore.ts +54 -103
- package/src/generate.ts +1 -0
- package/src/interceptor.ts +3 -2
- package/src/main.ts +4 -180
- package/src/output.ts +15 -13
- package/src/pipeline/executor.test.ts +1 -0
- package/src/pipeline/steps/download.ts +14 -17
- package/src/registry.ts +9 -5
- package/src/runtime.ts +3 -2
- package/src/scripts/framework.ts +20 -0
- package/src/scripts/interact.ts +22 -0
- package/src/scripts/store.ts +40 -0
- package/src/synthesize.ts +1 -1
- package/src/types.ts +9 -0
- package/src/verify.ts +64 -3
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Injected script for detecting frontend frameworks (Vue, React, Next, Nuxt, etc.)
|
|
3
|
+
*/
|
|
4
|
+
export function detectFramework() {
|
|
5
|
+
const r = {};
|
|
6
|
+
try {
|
|
7
|
+
const app = document.querySelector('#app');
|
|
8
|
+
r.vue3 = !!(app && app.__vue_app__);
|
|
9
|
+
r.vue2 = !!(app && app.__vue__);
|
|
10
|
+
r.react = !!window.__REACT_DEVTOOLS_GLOBAL_HOOK__ || !!document.querySelector('[data-reactroot]');
|
|
11
|
+
r.nextjs = !!window.__NEXT_DATA__;
|
|
12
|
+
r.nuxt = !!window.__NUXT__;
|
|
13
|
+
if (r.vue3 && app.__vue_app__) {
|
|
14
|
+
const gp = app.__vue_app__.config?.globalProperties;
|
|
15
|
+
r.pinia = !!(gp && gp.$pinia);
|
|
16
|
+
r.vuex = !!(gp && gp.$store);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
catch { }
|
|
20
|
+
return r;
|
|
21
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Injected script for interactive fuzzing (clicking elements to trigger lazy loading)
|
|
3
|
+
*/
|
|
4
|
+
export async function interactFuzz() {
|
|
5
|
+
const sleep = (ms) => new Promise(r => setTimeout(r, ms));
|
|
6
|
+
const clickables = Array.from(document.querySelectorAll('button, [role="button"], [role="tab"], .tab, .btn, a[href="javascript:void(0)"], a[href="#"]')).slice(0, 15); // limit to a small number to avoid endless loops
|
|
7
|
+
let clicked = 0;
|
|
8
|
+
for (const el of clickables) {
|
|
9
|
+
try {
|
|
10
|
+
const rect = el.getBoundingClientRect();
|
|
11
|
+
if (rect.width > 0 && rect.height > 0) {
|
|
12
|
+
el.dispatchEvent(new MouseEvent('click', { bubbles: true, cancelable: true, view: window }));
|
|
13
|
+
clicked++;
|
|
14
|
+
await sleep(300); // give it time to trigger network
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
catch { }
|
|
18
|
+
}
|
|
19
|
+
return clicked;
|
|
20
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Injected script for discovering Pinia or Vuex stores and their actions/state representations
|
|
3
|
+
*/
|
|
4
|
+
export function discoverStores() {
|
|
5
|
+
const stores = [];
|
|
6
|
+
try {
|
|
7
|
+
const app = document.querySelector('#app');
|
|
8
|
+
if (!app?.__vue_app__)
|
|
9
|
+
return stores;
|
|
10
|
+
const gp = app.__vue_app__.config?.globalProperties;
|
|
11
|
+
// Pinia stores
|
|
12
|
+
const pinia = gp?.$pinia;
|
|
13
|
+
if (pinia?._s) {
|
|
14
|
+
pinia._s.forEach((store, id) => {
|
|
15
|
+
const actions = [];
|
|
16
|
+
const stateKeys = [];
|
|
17
|
+
for (const k in store) {
|
|
18
|
+
try {
|
|
19
|
+
if (k.startsWith('$') || k.startsWith('_'))
|
|
20
|
+
continue;
|
|
21
|
+
if (typeof store[k] === 'function')
|
|
22
|
+
actions.push(k);
|
|
23
|
+
else
|
|
24
|
+
stateKeys.push(k);
|
|
25
|
+
}
|
|
26
|
+
catch { }
|
|
27
|
+
}
|
|
28
|
+
stores.push({ type: 'pinia', id, actions: actions.slice(0, 20), stateKeys: stateKeys.slice(0, 15) });
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
// Vuex store modules
|
|
32
|
+
const vuex = gp?.$store;
|
|
33
|
+
if (vuex?._modules?.root?._children) {
|
|
34
|
+
const children = vuex._modules.root._children;
|
|
35
|
+
for (const [modName, mod] of Object.entries(children)) {
|
|
36
|
+
const actions = Object.keys(mod._rawModule?.actions ?? {}).slice(0, 20);
|
|
37
|
+
const stateKeys = Object.keys(mod.state ?? {}).slice(0, 15);
|
|
38
|
+
stores.push({ type: 'vuex', id: modName, actions, stateKeys });
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
catch { }
|
|
43
|
+
return stores;
|
|
44
|
+
}
|
package/dist/synthesize.js
CHANGED
|
@@ -108,7 +108,7 @@ function buildEvaluateScript(url, itemPath, endpoint) {
|
|
|
108
108
|
}
|
|
109
109
|
return [
|
|
110
110
|
'(async () => {',
|
|
111
|
-
` const res = await fetch(
|
|
111
|
+
` const res = await fetch(${JSON.stringify(url)}, {`,
|
|
112
112
|
` credentials: 'include'`,
|
|
113
113
|
' });',
|
|
114
114
|
' const data = await res.json();',
|
package/dist/types.d.ts
CHANGED
|
@@ -7,6 +7,18 @@
|
|
|
7
7
|
export interface IPage {
|
|
8
8
|
goto(url: string): Promise<void>;
|
|
9
9
|
evaluate(js: string): Promise<any>;
|
|
10
|
+
getCookies(opts?: {
|
|
11
|
+
domain?: string;
|
|
12
|
+
url?: string;
|
|
13
|
+
}): Promise<Array<{
|
|
14
|
+
name: string;
|
|
15
|
+
value: string;
|
|
16
|
+
domain: string;
|
|
17
|
+
path?: string;
|
|
18
|
+
secure?: boolean;
|
|
19
|
+
httpOnly?: boolean;
|
|
20
|
+
expirationDate?: number;
|
|
21
|
+
}>>;
|
|
10
22
|
snapshot(opts?: {
|
|
11
23
|
interactive?: boolean;
|
|
12
24
|
compact?: boolean;
|
package/dist/verify.d.ts
CHANGED
|
@@ -15,7 +15,12 @@ export interface VerifyOptions {
|
|
|
15
15
|
export interface VerifyReport {
|
|
16
16
|
ok: boolean;
|
|
17
17
|
validation: ValidationReport;
|
|
18
|
-
smoke: null
|
|
18
|
+
smoke: null | {
|
|
19
|
+
requested: boolean;
|
|
20
|
+
executed: boolean;
|
|
21
|
+
ok: boolean;
|
|
22
|
+
summary: string;
|
|
23
|
+
};
|
|
19
24
|
}
|
|
20
25
|
export declare function verifyClis(opts: VerifyOptions): Promise<VerifyReport>;
|
|
21
26
|
export declare function renderVerifyReport(report: VerifyReport): string;
|
package/dist/verify.js
CHANGED
|
@@ -6,10 +6,62 @@
|
|
|
6
6
|
* to the `opencli test` command or CI pipelines.
|
|
7
7
|
*/
|
|
8
8
|
import { validateClisWithTarget, renderValidationReport } from './validate.js';
|
|
9
|
+
import { spawn } from 'node:child_process';
|
|
10
|
+
import * as fs from 'node:fs';
|
|
11
|
+
import * as path from 'node:path';
|
|
9
12
|
export async function verifyClis(opts) {
|
|
10
13
|
const report = validateClisWithTarget([opts.builtinClis, opts.userClis], opts.target);
|
|
11
|
-
|
|
14
|
+
let smoke = null;
|
|
15
|
+
if (opts.smoke) {
|
|
16
|
+
smoke = await runSmokeTests(opts.builtinClis);
|
|
17
|
+
}
|
|
18
|
+
return { ok: report.ok && (smoke?.ok ?? true), validation: report, smoke };
|
|
12
19
|
}
|
|
13
20
|
export function renderVerifyReport(report) {
|
|
14
|
-
|
|
21
|
+
const base = renderValidationReport(report.validation);
|
|
22
|
+
if (!report.smoke)
|
|
23
|
+
return base;
|
|
24
|
+
const status = report.smoke.ok ? 'PASS' : 'FAIL';
|
|
25
|
+
const mode = report.smoke.executed ? 'executed' : 'skipped';
|
|
26
|
+
return `${base}\nSmoke: ${status} (${mode}) โ ${report.smoke.summary}`;
|
|
27
|
+
}
|
|
28
|
+
async function runSmokeTests(builtinClis) {
|
|
29
|
+
const projectRoot = path.resolve(builtinClis, '..', '..');
|
|
30
|
+
const smokeDir = path.join(projectRoot, 'tests', 'smoke');
|
|
31
|
+
if (!fs.existsSync(smokeDir)) {
|
|
32
|
+
return {
|
|
33
|
+
requested: true,
|
|
34
|
+
executed: false,
|
|
35
|
+
ok: false,
|
|
36
|
+
summary: 'Smoke tests are unavailable in this package/environment.',
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
const npx = process.platform === 'win32' ? 'npx.cmd' : 'npx';
|
|
40
|
+
return new Promise((resolve) => {
|
|
41
|
+
const child = spawn(npx, ['vitest', 'run', 'tests/smoke/', '--reporter=dot'], {
|
|
42
|
+
cwd: projectRoot,
|
|
43
|
+
env: { ...process.env },
|
|
44
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
45
|
+
});
|
|
46
|
+
let stderr = '';
|
|
47
|
+
child.stderr.on('data', (chunk) => {
|
|
48
|
+
stderr += chunk.toString();
|
|
49
|
+
});
|
|
50
|
+
child.on('error', (error) => {
|
|
51
|
+
resolve({
|
|
52
|
+
requested: true,
|
|
53
|
+
executed: false,
|
|
54
|
+
ok: false,
|
|
55
|
+
summary: `Failed to start smoke tests: ${error.message}`,
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
child.on('close', (code) => {
|
|
59
|
+
resolve({
|
|
60
|
+
requested: true,
|
|
61
|
+
executed: true,
|
|
62
|
+
ok: code === 0,
|
|
63
|
+
summary: code === 0 ? 'tests/smoke passed' : (stderr.trim() || `vitest exited with code ${code}`),
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
});
|
|
15
67
|
}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import { defineConfig } from 'vitepress'
|
|
2
|
+
|
|
3
|
+
export default defineConfig({
|
|
4
|
+
title: 'OpenCLI',
|
|
5
|
+
description: 'Make any website or Electron App your CLI โ AI-powered, account-safe, self-healing.',
|
|
6
|
+
|
|
7
|
+
head: [
|
|
8
|
+
['meta', { property: 'og:title', content: 'OpenCLI Documentation' }],
|
|
9
|
+
['meta', { property: 'og:description', content: 'Make any website or Electron App your CLI.' }],
|
|
10
|
+
['meta', { name: 'twitter:card', content: 'summary_large_image' }],
|
|
11
|
+
],
|
|
12
|
+
|
|
13
|
+
locales: {
|
|
14
|
+
root: {
|
|
15
|
+
label: 'English',
|
|
16
|
+
lang: 'en',
|
|
17
|
+
themeConfig: {
|
|
18
|
+
nav: [
|
|
19
|
+
{ text: 'Guide', link: '/guide/getting-started' },
|
|
20
|
+
{ text: 'Adapters', link: '/adapters/' },
|
|
21
|
+
{ text: 'Developer', link: '/developer/contributing' },
|
|
22
|
+
{ text: 'Advanced', link: '/advanced/cdp' },
|
|
23
|
+
],
|
|
24
|
+
sidebar: {
|
|
25
|
+
'/guide/': [
|
|
26
|
+
{
|
|
27
|
+
text: 'Guide',
|
|
28
|
+
items: [
|
|
29
|
+
{ text: 'Getting Started', link: '/guide/getting-started' },
|
|
30
|
+
{ text: 'Installation', link: '/guide/installation' },
|
|
31
|
+
{ text: 'Browser Bridge', link: '/guide/browser-bridge' },
|
|
32
|
+
{ text: 'Troubleshooting', link: '/guide/troubleshooting' },
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
'/adapters/': [
|
|
37
|
+
{
|
|
38
|
+
text: 'Adapters Overview',
|
|
39
|
+
items: [
|
|
40
|
+
{ text: 'All Adapters', link: '/adapters/' },
|
|
41
|
+
],
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
text: 'Browser Adapters',
|
|
45
|
+
collapsed: false,
|
|
46
|
+
items: [
|
|
47
|
+
{ text: 'Twitter / X', link: '/adapters/browser/twitter' },
|
|
48
|
+
{ text: 'Reddit', link: '/adapters/browser/reddit' },
|
|
49
|
+
{ text: 'Bilibili', link: '/adapters/browser/bilibili' },
|
|
50
|
+
{ text: 'Zhihu', link: '/adapters/browser/zhihu' },
|
|
51
|
+
{ text: 'Xiaohongshu', link: '/adapters/browser/xiaohongshu' },
|
|
52
|
+
{ text: 'Weibo', link: '/adapters/browser/weibo' },
|
|
53
|
+
{ text: 'YouTube', link: '/adapters/browser/youtube' },
|
|
54
|
+
{ text: 'Xueqiu', link: '/adapters/browser/xueqiu' },
|
|
55
|
+
{ text: 'V2EX', link: '/adapters/browser/v2ex' },
|
|
56
|
+
{ text: 'LinkedIn', link: '/adapters/browser/linkedin' },
|
|
57
|
+
{ text: 'Coupang', link: '/adapters/browser/coupang' },
|
|
58
|
+
{ text: 'BOSS Zhipin', link: '/adapters/browser/boss' },
|
|
59
|
+
{ text: 'Ctrip', link: '/adapters/browser/ctrip' },
|
|
60
|
+
{ text: 'Reuters', link: '/adapters/browser/reuters' },
|
|
61
|
+
{ text: 'SMZDM', link: '/adapters/browser/smzdm' },
|
|
62
|
+
],
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
text: 'Public API Adapters',
|
|
66
|
+
collapsed: false,
|
|
67
|
+
items: [
|
|
68
|
+
{ text: 'HackerNews', link: '/adapters/browser/hackernews' },
|
|
69
|
+
{ text: 'GitHub', link: '/adapters/browser/github' },
|
|
70
|
+
{ text: 'BBC', link: '/adapters/browser/bbc' },
|
|
71
|
+
{ text: 'Apple Podcasts', link: '/adapters/browser/apple-podcasts' },
|
|
72
|
+
{ text: 'Xiaoyuzhou', link: '/adapters/browser/xiaoyuzhou' },
|
|
73
|
+
{ text: 'Yahoo Finance', link: '/adapters/browser/yahoo-finance' },
|
|
74
|
+
],
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
text: 'Desktop Adapters',
|
|
78
|
+
collapsed: false,
|
|
79
|
+
items: [
|
|
80
|
+
{ text: 'Cursor', link: '/adapters/desktop/cursor' },
|
|
81
|
+
{ text: 'Codex', link: '/adapters/desktop/codex' },
|
|
82
|
+
{ text: 'Antigravity', link: '/adapters/desktop/antigravity' },
|
|
83
|
+
{ text: 'ChatGPT', link: '/adapters/desktop/chatgpt' },
|
|
84
|
+
{ text: 'ChatWise', link: '/adapters/desktop/chatwise' },
|
|
85
|
+
{ text: 'Notion', link: '/adapters/desktop/notion' },
|
|
86
|
+
{ text: 'Discord', link: '/adapters/desktop/discord' },
|
|
87
|
+
{ text: 'Feishu', link: '/adapters/desktop/feishu' },
|
|
88
|
+
{ text: 'WeChat', link: '/adapters/desktop/wechat' },
|
|
89
|
+
{ text: 'NeteaseMusic', link: '/adapters/desktop/neteasemusic' },
|
|
90
|
+
],
|
|
91
|
+
},
|
|
92
|
+
],
|
|
93
|
+
'/developer/': [
|
|
94
|
+
{
|
|
95
|
+
text: 'Developer Guide',
|
|
96
|
+
items: [
|
|
97
|
+
{ text: 'Contributing', link: '/developer/contributing' },
|
|
98
|
+
{ text: 'Testing', link: '/developer/testing' },
|
|
99
|
+
{ text: 'Architecture', link: '/developer/architecture' },
|
|
100
|
+
{ text: 'YAML Adapter Guide', link: '/developer/yaml-adapter' },
|
|
101
|
+
{ text: 'TypeScript Adapter Guide', link: '/developer/ts-adapter' },
|
|
102
|
+
{ text: 'AI Workflow', link: '/developer/ai-workflow' },
|
|
103
|
+
],
|
|
104
|
+
},
|
|
105
|
+
],
|
|
106
|
+
'/advanced/': [
|
|
107
|
+
{
|
|
108
|
+
text: 'Advanced',
|
|
109
|
+
items: [
|
|
110
|
+
{ text: 'Chrome DevTools Protocol', link: '/advanced/cdp' },
|
|
111
|
+
{ text: 'Electron Apps', link: '/advanced/electron' },
|
|
112
|
+
{ text: 'Remote Chrome', link: '/advanced/remote-chrome' },
|
|
113
|
+
{ text: 'Download Support', link: '/advanced/download' },
|
|
114
|
+
],
|
|
115
|
+
},
|
|
116
|
+
],
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
zh: {
|
|
121
|
+
label: 'ไธญๆ',
|
|
122
|
+
lang: 'zh-CN',
|
|
123
|
+
link: '/zh/',
|
|
124
|
+
themeConfig: {
|
|
125
|
+
nav: [
|
|
126
|
+
{ text: 'ๆๅ', link: '/zh/guide/getting-started' },
|
|
127
|
+
{ text: '้้
ๅจ', link: '/zh/adapters/' },
|
|
128
|
+
{ text: 'ๅผๅ่
', link: '/zh/developer/contributing' },
|
|
129
|
+
{ text: '่ฟ้ถ', link: '/zh/advanced/cdp' },
|
|
130
|
+
],
|
|
131
|
+
sidebar: {
|
|
132
|
+
'/zh/guide/': [
|
|
133
|
+
{
|
|
134
|
+
text: 'ๆๅ',
|
|
135
|
+
items: [
|
|
136
|
+
{ text: 'ๅฟซ้ๅผๅง', link: '/zh/guide/getting-started' },
|
|
137
|
+
{ text: 'ๅฎ่ฃ
', link: '/zh/guide/installation' },
|
|
138
|
+
{ text: 'Browser Bridge', link: '/zh/guide/browser-bridge' },
|
|
139
|
+
{ text: '้ฎ้ขๆๆฅ', link: '/zh/guide/troubleshooting' },
|
|
140
|
+
],
|
|
141
|
+
},
|
|
142
|
+
],
|
|
143
|
+
'/zh/adapters/': [
|
|
144
|
+
{
|
|
145
|
+
text: '้้
ๅจๆฆ่ง',
|
|
146
|
+
items: [
|
|
147
|
+
{ text: 'ๆๆ้้
ๅจ', link: '/zh/adapters/' },
|
|
148
|
+
],
|
|
149
|
+
},
|
|
150
|
+
],
|
|
151
|
+
'/zh/developer/': [
|
|
152
|
+
{
|
|
153
|
+
text: 'ๅผๅ่
ๆๅ',
|
|
154
|
+
items: [
|
|
155
|
+
{ text: '่ดก็ฎๆๅ', link: '/zh/developer/contributing' },
|
|
156
|
+
{ text: 'ๆต่ฏ', link: '/zh/developer/testing' },
|
|
157
|
+
],
|
|
158
|
+
},
|
|
159
|
+
],
|
|
160
|
+
'/zh/advanced/': [
|
|
161
|
+
{
|
|
162
|
+
text: '่ฟ้ถ',
|
|
163
|
+
items: [
|
|
164
|
+
{ text: 'Chrome DevTools Protocol', link: '/zh/advanced/cdp' },
|
|
165
|
+
],
|
|
166
|
+
},
|
|
167
|
+
],
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
},
|
|
172
|
+
|
|
173
|
+
themeConfig: {
|
|
174
|
+
search: {
|
|
175
|
+
provider: 'local',
|
|
176
|
+
},
|
|
177
|
+
|
|
178
|
+
socialLinks: [
|
|
179
|
+
{ icon: 'github', link: 'https://github.com/jackwener/opencli' },
|
|
180
|
+
{ icon: 'npm', link: 'https://www.npmjs.com/package/@jackwener/opencli' },
|
|
181
|
+
],
|
|
182
|
+
|
|
183
|
+
editLink: {
|
|
184
|
+
pattern: 'https://github.com/jackwener/opencli/edit/main/docs/:path',
|
|
185
|
+
text: 'Edit this page on GitHub',
|
|
186
|
+
},
|
|
187
|
+
|
|
188
|
+
footer: {
|
|
189
|
+
message: 'Released under the Apache-2.0 License.',
|
|
190
|
+
copyright: 'Copyright ยฉ 2024-present jackwener',
|
|
191
|
+
},
|
|
192
|
+
},
|
|
193
|
+
})
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Apple Podcasts
|
|
2
|
+
|
|
3
|
+
**Mode**: ๐ Public ยท **Domain**: `podcasts.apple.com`
|
|
4
|
+
|
|
5
|
+
## Commands
|
|
6
|
+
|
|
7
|
+
| Command | Description |
|
|
8
|
+
|---------|-------------|
|
|
9
|
+
| `opencli apple-podcasts search` | |
|
|
10
|
+
| `opencli apple-podcasts episodes` | |
|
|
11
|
+
| `opencli apple-podcasts top` | |
|
|
12
|
+
|
|
13
|
+
## Usage Examples
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
# Quick start
|
|
17
|
+
opencli apple-podcasts search --limit 5
|
|
18
|
+
|
|
19
|
+
# JSON output
|
|
20
|
+
opencli apple-podcasts search -f json
|
|
21
|
+
|
|
22
|
+
# Verbose mode
|
|
23
|
+
opencli apple-podcasts search -v
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Prerequisites
|
|
27
|
+
|
|
28
|
+
- No browser required โ uses public API
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# BBC News
|
|
2
|
+
|
|
3
|
+
**Mode**: ๐ Public ยท **Domain**: `bbc.com`
|
|
4
|
+
|
|
5
|
+
## Commands
|
|
6
|
+
|
|
7
|
+
| Command | Description |
|
|
8
|
+
|---------|-------------|
|
|
9
|
+
| `opencli bbc news` | |
|
|
10
|
+
|
|
11
|
+
## Usage Examples
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
# Quick start
|
|
15
|
+
opencli bbc news --limit 5
|
|
16
|
+
|
|
17
|
+
# JSON output
|
|
18
|
+
opencli bbc news -f json
|
|
19
|
+
|
|
20
|
+
# Verbose mode
|
|
21
|
+
opencli bbc news -v
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Prerequisites
|
|
25
|
+
|
|
26
|
+
- No browser required โ uses public API
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Bilibili
|
|
2
|
+
|
|
3
|
+
**Mode**: ๐ Browser ยท **Domain**: `bilibili.com`
|
|
4
|
+
|
|
5
|
+
## Commands
|
|
6
|
+
|
|
7
|
+
| Command | Description |
|
|
8
|
+
|---------|-------------|
|
|
9
|
+
| `opencli bilibili hot` | |
|
|
10
|
+
| `opencli bilibili search` | |
|
|
11
|
+
| `opencli bilibili me` | |
|
|
12
|
+
| `opencli bilibili favorite` | |
|
|
13
|
+
| `opencli bilibili history` | |
|
|
14
|
+
| `opencli bilibili feed` | |
|
|
15
|
+
| `opencli bilibili subtitle` | |
|
|
16
|
+
| `opencli bilibili dynamic` | |
|
|
17
|
+
| `opencli bilibili ranking` | |
|
|
18
|
+
| `opencli bilibili following` | |
|
|
19
|
+
| `opencli bilibili user-videos` | |
|
|
20
|
+
| `opencli bilibili download` | |
|
|
21
|
+
|
|
22
|
+
## Usage Examples
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
# Quick start
|
|
26
|
+
opencli bilibili hot --limit 5
|
|
27
|
+
|
|
28
|
+
# JSON output
|
|
29
|
+
opencli bilibili hot -f json
|
|
30
|
+
|
|
31
|
+
# Verbose mode
|
|
32
|
+
opencli bilibili hot -v
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Prerequisites
|
|
36
|
+
|
|
37
|
+
- Chrome running and **logged into** bilibili.com
|
|
38
|
+
- [Browser Bridge extension](/guide/browser-bridge) installed
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# BOSS Zhipin
|
|
2
|
+
|
|
3
|
+
**Mode**: ๐ Browser ยท **Domain**: `zhipin.com`
|
|
4
|
+
|
|
5
|
+
## Commands
|
|
6
|
+
|
|
7
|
+
| Command | Description |
|
|
8
|
+
|---------|-------------|
|
|
9
|
+
| `opencli boss search` | |
|
|
10
|
+
| `opencli boss detail` | |
|
|
11
|
+
|
|
12
|
+
## Usage Examples
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
# Quick start
|
|
16
|
+
opencli boss search --limit 5
|
|
17
|
+
|
|
18
|
+
# JSON output
|
|
19
|
+
opencli boss search -f json
|
|
20
|
+
|
|
21
|
+
# Verbose mode
|
|
22
|
+
opencli boss search -v
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Prerequisites
|
|
26
|
+
|
|
27
|
+
- Chrome running and **logged into** zhipin.com
|
|
28
|
+
- [Browser Bridge extension](/guide/browser-bridge) installed
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Coupang
|
|
2
|
+
|
|
3
|
+
**Mode**: ๐ Browser ยท **Domain**: `coupang.com`
|
|
4
|
+
|
|
5
|
+
## Commands
|
|
6
|
+
|
|
7
|
+
| Command | Description |
|
|
8
|
+
|---------|-------------|
|
|
9
|
+
| `opencli coupang search` | |
|
|
10
|
+
| `opencli coupang add-to-cart` | |
|
|
11
|
+
|
|
12
|
+
## Usage Examples
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
# Quick start
|
|
16
|
+
opencli coupang search --limit 5
|
|
17
|
+
|
|
18
|
+
# JSON output
|
|
19
|
+
opencli coupang search -f json
|
|
20
|
+
|
|
21
|
+
# Verbose mode
|
|
22
|
+
opencli coupang search -v
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Prerequisites
|
|
26
|
+
|
|
27
|
+
- Chrome running and **logged into** coupang.com
|
|
28
|
+
- [Browser Bridge extension](/guide/browser-bridge) installed
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Ctrip (ๆบ็จ)
|
|
2
|
+
|
|
3
|
+
**Mode**: ๐ Browser ยท **Domain**: `ctrip.com`
|
|
4
|
+
|
|
5
|
+
## Commands
|
|
6
|
+
|
|
7
|
+
| Command | Description |
|
|
8
|
+
|---------|-------------|
|
|
9
|
+
| `opencli ctrip search` | |
|
|
10
|
+
|
|
11
|
+
## Usage Examples
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
# Quick start
|
|
15
|
+
opencli ctrip search --limit 5
|
|
16
|
+
|
|
17
|
+
# JSON output
|
|
18
|
+
opencli ctrip search -f json
|
|
19
|
+
|
|
20
|
+
# Verbose mode
|
|
21
|
+
opencli ctrip search -v
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Prerequisites
|
|
25
|
+
|
|
26
|
+
- Chrome running and **logged into** ctrip.com
|
|
27
|
+
- [Browser Bridge extension](/guide/browser-bridge) installed
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# GitHub
|
|
2
|
+
|
|
3
|
+
**Mode**: ๐ Public ยท **Domain**: `github.com`
|
|
4
|
+
|
|
5
|
+
## Commands
|
|
6
|
+
|
|
7
|
+
| Command | Description |
|
|
8
|
+
|---------|-------------|
|
|
9
|
+
| `opencli github search` | |
|
|
10
|
+
|
|
11
|
+
## Usage Examples
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
# Quick start
|
|
15
|
+
opencli github search --limit 5
|
|
16
|
+
|
|
17
|
+
# JSON output
|
|
18
|
+
opencli github search -f json
|
|
19
|
+
|
|
20
|
+
# Verbose mode
|
|
21
|
+
opencli github search -v
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Prerequisites
|
|
25
|
+
|
|
26
|
+
- No browser required โ uses public API
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# HackerNews
|
|
2
|
+
|
|
3
|
+
**Mode**: ๐ Public ยท **Domain**: `news.ycombinator.com`
|
|
4
|
+
|
|
5
|
+
## Commands
|
|
6
|
+
|
|
7
|
+
| Command | Description |
|
|
8
|
+
|---------|-------------|
|
|
9
|
+
| `opencli hackernews top` | |
|
|
10
|
+
|
|
11
|
+
## Usage Examples
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
# Quick start
|
|
15
|
+
opencli hackernews top --limit 5
|
|
16
|
+
|
|
17
|
+
# JSON output
|
|
18
|
+
opencli hackernews top -f json
|
|
19
|
+
|
|
20
|
+
# Verbose mode
|
|
21
|
+
opencli hackernews top -v
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Prerequisites
|
|
25
|
+
|
|
26
|
+
- No browser required โ uses public API
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# LinkedIn
|
|
2
|
+
|
|
3
|
+
**Mode**: ๐ Browser ยท **Domain**: `linkedin.com`
|
|
4
|
+
|
|
5
|
+
## Commands
|
|
6
|
+
|
|
7
|
+
| Command | Description |
|
|
8
|
+
|---------|-------------|
|
|
9
|
+
| `opencli linkedin search` | |
|
|
10
|
+
|
|
11
|
+
## Usage Examples
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
# Quick start
|
|
15
|
+
opencli linkedin search --limit 5
|
|
16
|
+
|
|
17
|
+
# JSON output
|
|
18
|
+
opencli linkedin search -f json
|
|
19
|
+
|
|
20
|
+
# Verbose mode
|
|
21
|
+
opencli linkedin search -v
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Prerequisites
|
|
25
|
+
|
|
26
|
+
- Chrome running and **logged into** linkedin.com
|
|
27
|
+
- [Browser Bridge extension](/guide/browser-bridge) installed
|