@jackwener/opencli 1.5.9 → 1.6.1
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/CHANGELOG.md +29 -0
- package/README.md +18 -0
- package/SKILL.md +59 -0
- package/autoresearch/baseline-browse.txt +1 -0
- package/autoresearch/baseline-skill.txt +1 -0
- package/autoresearch/browse-tasks.json +688 -0
- package/autoresearch/eval-browse.ts +185 -0
- package/autoresearch/eval-skill.ts +248 -0
- package/autoresearch/run-browse.sh +9 -0
- package/autoresearch/run-skill.sh +9 -0
- package/bun.lock +615 -0
- package/dist/browser/daemon-client.d.ts +20 -1
- package/dist/browser/daemon-client.js +37 -30
- package/dist/browser/daemon-client.test.d.ts +1 -0
- package/dist/browser/daemon-client.test.js +77 -0
- package/dist/browser/discover.js +8 -19
- package/dist/browser/page.d.ts +4 -0
- package/dist/browser/page.js +48 -1
- package/dist/cli-manifest.json +2 -2
- package/dist/cli.js +392 -0
- package/dist/clis/twitter/article.js +28 -1
- package/dist/clis/twitter/search.js +67 -5
- package/dist/clis/twitter/search.test.js +83 -5
- package/dist/clis/xiaohongshu/note.js +11 -0
- package/dist/clis/xiaohongshu/note.test.js +49 -0
- package/dist/commanderAdapter.js +1 -1
- package/dist/commanderAdapter.test.js +43 -0
- package/dist/commands/daemon.js +7 -46
- package/dist/commands/daemon.test.js +44 -69
- package/dist/discovery.js +27 -0
- package/dist/types.d.ts +8 -0
- package/docs/guide/getting-started.md +21 -0
- package/docs/superpowers/specs/2026-04-02-browse-skill-testing-design.md +144 -0
- package/docs/zh/guide/getting-started.md +21 -0
- package/extension/package-lock.json +2 -2
- package/extension/src/background.ts +51 -4
- package/extension/src/cdp.ts +77 -124
- package/extension/src/protocol.ts +5 -1
- package/package.json +1 -1
- package/skills/opencli-explorer/SKILL.md +6 -0
- package/skills/opencli-oneshot/SKILL.md +6 -0
- package/skills/opencli-operate/SKILL.md +213 -0
- package/skills/opencli-usage/SKILL.md +113 -32
- package/src/browser/daemon-client.test.ts +103 -0
- package/src/browser/daemon-client.ts +53 -30
- package/src/browser/discover.ts +8 -17
- package/src/browser/page.ts +48 -1
- package/src/cli.ts +392 -0
- package/src/clis/twitter/article.ts +31 -1
- package/src/clis/twitter/search.test.ts +88 -5
- package/src/clis/twitter/search.ts +68 -5
- package/src/clis/xiaohongshu/note.test.ts +51 -0
- package/src/clis/xiaohongshu/note.ts +18 -0
- package/src/commanderAdapter.test.ts +62 -0
- package/src/commanderAdapter.ts +1 -1
- package/src/commands/daemon.test.ts +49 -83
- package/src/commands/daemon.ts +7 -55
- package/src/discovery.ts +22 -0
- package/src/doctor.ts +1 -1
- package/src/types.ts +8 -0
- package/extension/dist/background.js +0 -681
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.6.1](https://github.com/jackwener/opencli/compare/v1.6.0...v1.6.1) (2026-04-02)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* sync package-lock.json version with package.json ([#698](https://github.com/jackwener/opencli/issues/698))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## [1.6.0](https://github.com/jackwener/opencli/compare/v1.5.9...v1.6.0) (2026-04-02)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* **opencli-operate:** add browser control commands for Claude Code skill ([#614](https://github.com/jackwener/opencli/issues/614))
|
|
17
|
+
* **docs:** add tab completion to getting started guides ([#658](https://github.com/jackwener/opencli/issues/658))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* **twitter:** resolve article ID to tweet ID before GraphQL query ([#688](https://github.com/jackwener/opencli/issues/688))
|
|
23
|
+
* **xiaohongshu:** clarify empty note shell hint ([#686](https://github.com/jackwener/opencli/issues/686))
|
|
24
|
+
* **skills:** add YAML frontmatter for discovery and improve descriptions ([#694](https://github.com/jackwener/opencli/issues/694))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Refactoring
|
|
28
|
+
|
|
29
|
+
* centralize daemon transport client ([#692](https://github.com/jackwener/opencli/issues/692))
|
|
30
|
+
|
|
31
|
+
|
|
3
32
|
## [1.5.9](https://github.com/jackwener/opencli/compare/v1.5.8...v1.5.9) (2026-04-02)
|
|
4
33
|
|
|
5
34
|
|
package/README.md
CHANGED
|
@@ -84,6 +84,24 @@ opencli hackernews top --limit 5 # Public API, no browser needed
|
|
|
84
84
|
opencli bilibili hot --limit 5 # Browser command (requires Extension)
|
|
85
85
|
```
|
|
86
86
|
|
|
87
|
+
### 4. Browser Automation — Make Websites Accessible for AI Agents
|
|
88
|
+
|
|
89
|
+
#### AI Agent Quickstart (1 step)
|
|
90
|
+
|
|
91
|
+
Point your AI agent (Claude Code, Cursor) to [`skills/opencli-operate/SKILL.md`](./skills/opencli-operate/SKILL.md). It has everything needed.
|
|
92
|
+
|
|
93
|
+
#### Human Quickstart (3 steps)
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
opencli operate open https://news.ycombinator.com # 1. Open a page
|
|
97
|
+
opencli operate state # 2. See interactive elements
|
|
98
|
+
opencli operate eval "document.title" # 3. Extract data
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
More commands: `click`, `type`, `select`, `keys`, `wait`, `get`, `screenshot`, `scroll`, `back`, `close`.
|
|
102
|
+
|
|
103
|
+
See [`skills/opencli-operate/SKILL.md`](./skills/opencli-operate/SKILL.md) for full documentation.
|
|
104
|
+
|
|
87
105
|
### Update
|
|
88
106
|
|
|
89
107
|
```bash
|
package/SKILL.md
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: opencli
|
|
3
|
+
description: "OpenCLI — Make any website or Electron App your CLI. Zero risk, AI-powered, reuse Chrome login."
|
|
4
|
+
version: 1.5.6
|
|
5
|
+
author: jackwener
|
|
6
|
+
tags: [cli, browser, web, chrome-extension, cdp, AI, agent, operate]
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# OpenCLI
|
|
10
|
+
|
|
11
|
+
> Make any website or Electron App your CLI. Reuse Chrome login, zero risk, AI-powered.
|
|
12
|
+
|
|
13
|
+
## Skills
|
|
14
|
+
|
|
15
|
+
OpenCLI has three specialized skills. Use the one that matches your task:
|
|
16
|
+
|
|
17
|
+
### 1. CLI Commands (`skills/cli/SKILL.md`)
|
|
18
|
+
Use existing CLI commands to fetch data, interact with websites and desktop apps.
|
|
19
|
+
```bash
|
|
20
|
+
opencli twitter trending --limit 10
|
|
21
|
+
opencli hackernews top --limit 5
|
|
22
|
+
opencli bilibili hot
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### 2. Browser Automation (`skills/opencli-operate/SKILL.md`)
|
|
26
|
+
Make websites accessible for AI agents. Navigate, click, type, extract, wait — with existing Chrome login sessions. No LLM API key needed.
|
|
27
|
+
```bash
|
|
28
|
+
opencli operate open https://example.com
|
|
29
|
+
opencli operate state # See interactive elements with [N] indices
|
|
30
|
+
opencli operate click 3 # Click element [3]
|
|
31
|
+
opencli operate network # Discover APIs
|
|
32
|
+
opencli operate init site/cmd # Generate adapter scaffold
|
|
33
|
+
opencli operate verify site/cmd # Test the adapter
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### 3. Adapter Development (`skills/adapter-dev/SKILL.md`)
|
|
37
|
+
Create new CLI commands from websites. Explore APIs, record traffic, write TypeScript adapters.
|
|
38
|
+
```bash
|
|
39
|
+
opencli explore https://example.com
|
|
40
|
+
opencli record https://example.com
|
|
41
|
+
opencli generate https://example.com --goal "hot"
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Quick Setup
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
npm install -g @jackwener/opencli
|
|
48
|
+
opencli doctor # Verify Chrome extension + daemon
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Configuration
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
# For AI agent (opencli operate)
|
|
55
|
+
export OPENCLI_PROVIDER=anthropic # or openai
|
|
56
|
+
export OPENCLI_MODEL=sonnet # model alias
|
|
57
|
+
export OPENCLI_API_KEY=sk-ant-... # API key
|
|
58
|
+
export OPENCLI_BASE_URL=https://... # optional proxy
|
|
59
|
+
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
56/59
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
31/31
|