publishport-opencli 1.0.0 → 1.0.2
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/README.md +61 -61
- package/README.zh-CN.md +68 -68
- package/cli-manifest.json +954 -61
- package/clis/1688/shared.js +2 -2
- package/clis/36kr/news.js +1 -1
- package/clis/_atlassian/shared.js +1 -1
- package/clis/_shared/article/auth.js +1 -1
- package/clis/_shared/article/publish.js +1 -1
- package/clis/_shared/content-guard.js +1 -1
- package/clis/_shared/self-hosted-sites.js +2 -0
- package/clis/_shared/site-auth.js +1 -1
- package/clis/_shared/token-auth.js +2 -2
- package/clis/_shared/video-publish.js +1 -1
- package/clis/aibase/news.js +1 -1
- package/clis/amazon/shared.js +2 -2
- package/clis/antigravity/SKILL.md +12 -12
- package/clis/antigravity/storage.js +1 -1
- package/clis/apple-podcasts/episodes.js +1 -1
- package/clis/archive/item.js +1 -1
- package/clis/archive/search.js +1 -1
- package/clis/archive/snapshots.js +1 -1
- package/clis/archive/wayback.js +1 -1
- package/clis/arxiv/author.js +1 -1
- package/clis/baijiahao/publish.js +1 -1
- package/clis/bbc/utils.js +1 -1
- package/clis/bloomberg/businessweek.js +1 -1
- package/clis/bloomberg/utils.js +1 -1
- package/clis/booking/search.js +1 -1
- package/clis/boss/utils.js +1 -1
- package/clis/chatgpt/ask.js +1 -1
- package/clis/chatgpt/detail.js +1 -1
- package/clis/chatgpt/history.js +1 -1
- package/clis/chatgpt/project-file-add.js +1 -1
- package/clis/chatgpt/project-list.js +1 -1
- package/clis/chatgpt/utils.js +2 -2
- package/clis/chess/utils.js +1 -1
- package/clis/claude/ask.js +1 -1
- package/clis/claude/history.js +1 -1
- package/clis/claude/utils.js +1 -1
- package/clis/codex/extract-diff.js +1 -1
- package/clis/coingecko/coin.js +1 -1
- package/clis/crates/utils.js +1 -1
- package/clis/csdn/stats.js +1 -1
- package/clis/dblp/utils.js +1 -1
- package/clis/defillama/utils.js +1 -1
- package/clis/devto/publish.js +1 -1
- package/clis/discord-app/utils.js +1 -1
- package/clis/dockerhub/utils.js +1 -1
- package/clis/douban/utils.js +1 -1
- package/clis/douyin/_shared/tos-upload.js +1 -1
- package/clis/douyin/hashtag.js +1 -1
- package/clis/douyin/publish-image.js +1 -1
- package/clis/douyin/publish.js +1 -1
- package/clis/eastmoney/announcement.js +1 -1
- package/clis/eastmoney/rank.js +1 -1
- package/clis/eastmoney/sectors.js +1 -1
- package/clis/endoflife/utils.js +1 -1
- package/clis/flathub/utils.js +1 -1
- package/clis/gemini/detail.js +1 -1
- package/clis/gemini/read.js +1 -1
- package/clis/geogebra/add-circle.js +1 -1
- package/clis/geogebra/add-line.js +1 -1
- package/clis/geogebra/add-point.js +1 -1
- package/clis/geogebra/add-polygon.js +1 -1
- package/clis/geogebra/eval.js +1 -1
- package/clis/geogebra/hexagon.js +1 -1
- package/clis/geogebra/info.js +1 -1
- package/clis/geogebra/triangle.js +1 -1
- package/clis/ghost/login.js +1 -0
- package/clis/ghost/publish.js +1 -1
- package/clis/ghost/shared.js +24 -1
- package/clis/ghost/sites.js +1 -0
- package/clis/ghost/whoami.js +1 -1
- package/clis/gitee/user.js +2 -2
- package/clis/github-trending/repos.js +1 -1
- package/clis/goproxy/utils.js +1 -1
- package/clis/grok/export-all.js +1 -1
- package/clis/grok/export.js +1 -1
- package/clis/hashnode/publish.js +1 -1
- package/clis/hf/datasets.js +1 -1
- package/clis/hf/models.js +1 -1
- package/clis/hf/paper.js +1 -1
- package/clis/hf/spaces.js +1 -1
- package/clis/homebrew/utils.js +1 -1
- package/clis/instagram/note.js +1 -1
- package/clis/jimeng/generate.js +1 -1
- package/clis/juejin/utils.js +1 -1
- package/clis/kuaishou/publish.js +1 -1
- package/clis/lesswrong/tag.js +1 -1
- package/clis/lichess/utils.js +1 -1
- package/clis/linkedin/search.js +2 -2
- package/clis/linux-do/feed.js +2 -2
- package/clis/lobsters/domain.js +1 -1
- package/clis/mastodon/login.js +1 -0
- package/clis/mastodon/post.js +1 -1
- package/clis/mastodon/shared.js +10 -10
- package/clis/mastodon/sites.js +1 -0
- package/clis/mastodon/whoami.js +1 -1
- package/clis/maven/utils.js +1 -1
- package/clis/mdn/search.js +1 -1
- package/clis/medium/tag.js +1 -1
- package/clis/notebooklm/current.js +1 -1
- package/clis/notebooklm/get.js +1 -1
- package/clis/notebooklm/history.js +1 -1
- package/clis/notebooklm/note-list.js +1 -1
- package/clis/notebooklm/notes-get.js +1 -1
- package/clis/notebooklm/open.js +1 -1
- package/clis/notebooklm/source-fulltext.js +1 -1
- package/clis/notebooklm/source-get.js +1 -1
- package/clis/notebooklm/source-guide.js +1 -1
- package/clis/notebooklm/source-list.js +1 -1
- package/clis/notebooklm/summary.js +1 -1
- package/clis/notebooklm/utils.js +1 -1
- package/clis/npm/utils.js +1 -1
- package/clis/nuget/utils.js +1 -1
- package/clis/nvd/cve.js +1 -1
- package/clis/oeis/utils.js +1 -1
- package/clis/ones/common.js +2 -2
- package/clis/ones/me.js +1 -1
- package/clis/ones/tasks.js +1 -1
- package/clis/ones/token-info.js +1 -1
- package/clis/ones/worklog.js +1 -1
- package/clis/openalex/utils.js +1 -1
- package/clis/oschina/stats.js +1 -1
- package/clis/osv/utils.js +1 -1
- package/clis/packagist/utils.js +1 -1
- package/clis/pixiv/detail.js +1 -1
- package/clis/pixiv/user.js +1 -1
- package/clis/producthunt/utils.js +1 -1
- package/clis/pypi/utils.js +1 -1
- package/clis/qiita/gql.js +2 -2
- package/clis/quora/__fixtures__/dom.html +39 -0
- package/clis/quora/answer-comments.js +9 -0
- package/clis/quora/answer-detail.js +1 -0
- package/clis/quora/answer-queue.js +1 -0
- package/clis/quora/comment.js +23 -0
- package/clis/quora/create-answer.js +4 -4
- package/clis/quora/create-question.js +3 -3
- package/clis/quora/follow.js +15 -0
- package/clis/quora/followers.js +1 -0
- package/clis/quora/question.js +1 -0
- package/clis/quora/search.js +1 -0
- package/clis/quora/shared.js +26 -11
- package/clis/quora/stats.js +1 -0
- package/clis/quora/upvote.js +14 -0
- package/clis/quora/user-answers.js +1 -0
- package/clis/quora/user.js +1 -0
- package/clis/rest-countries/utils.js +1 -1
- package/clis/rfc/utils.js +1 -1
- package/clis/rubygems/utils.js +1 -1
- package/clis/semanticscholar/utils.js +1 -1
- package/clis/slock/errors.js +1 -1
- package/clis/spotify/spotify.js +1 -1
- package/clis/spotify/utils.js +1 -1
- package/clis/stackoverflow/utils.js +1 -1
- package/clis/steam/utils.js +1 -1
- package/clis/substack/auth.js +2 -2
- package/clis/suno/generate.js +2 -2
- package/clis/suno/list.js +3 -3
- package/clis/telegram/send.js +1 -1
- package/clis/tiktok/creator-videos.js +1 -1
- package/clis/tiktok/publish.js +1 -1
- package/clis/tiktok/utils.js +1 -1
- package/clis/trae-cn/activity.js +1 -1
- package/clis/trae-cn/approve.js +1 -1
- package/clis/trae-cn/ask.js +1 -1
- package/clis/trae-cn/dump.js +1 -1
- package/clis/trae-cn/export.js +1 -1
- package/clis/trae-cn/model.js +1 -1
- package/clis/trae-cn/new.js +1 -1
- package/clis/trae-cn/read.js +1 -1
- package/clis/trae-cn/screenshot.js +1 -1
- package/clis/trae-cn/select-model.js +1 -1
- package/clis/trae-cn/send.js +1 -1
- package/clis/trae-cn/setup.js +1 -1
- package/clis/trae-cn/status.js +1 -1
- package/clis/trae-cn/targets.js +1 -1
- package/clis/trae-cn/watch.js +1 -1
- package/clis/trae-solo/state-fs.js +1 -1
- package/clis/tumblr/publish.js +1 -1
- package/clis/tvmaze/utils.js +1 -1
- package/clis/twitter/bookmark-folder.js +1 -1
- package/clis/twitter/download.js +1 -1
- package/clis/twitter/followers.js +2 -2
- package/clis/twitter/following.js +2 -2
- package/clis/twitter/likes.js +1 -1
- package/clis/twitter/list-add-batch.js +1 -1
- package/clis/twitter/list-add-core.js +1 -1
- package/clis/twitter/list-add.js +1 -1
- package/clis/twitter/list-create.js +1 -1
- package/clis/twitter/list-delete.js +3 -3
- package/clis/twitter/list-remove-batch.js +1 -1
- package/clis/twitter/list-remove.js +1 -1
- package/clis/twitter/list-tweets.js +1 -1
- package/clis/twitter/profile.js +1 -1
- package/clis/twitter/search.js +1 -1
- package/clis/twitter/shared.js +1 -1
- package/clis/twitter/tweets.js +1 -1
- package/clis/uisdc/news.js +1 -1
- package/clis/v2ex/daily.js +2 -2
- package/clis/v2ex/me.js +2 -2
- package/clis/v2ex/notifications.js +1 -1
- package/clis/wikidata/utils.js +1 -1
- package/clis/wikipedia/page.js +2 -2
- package/clis/wikipedia/summary.js +1 -1
- package/clis/wikipedia/utils.js +1 -1
- package/clis/wordpress/login.js +1 -1
- package/clis/wordpress/publish.js +1 -1
- package/clis/wordpress/shared.js +3 -3
- package/clis/wordpress/sites.js +1 -0
- package/clis/wordpress/whoami.js +1 -1
- package/clis/woshipm/stats.js +1 -1
- package/clis/xiaoe/content.js +1 -1
- package/clis/xiaohongshu/draft-delete.js +1 -1
- package/clis/xiaohongshu/draft-open.js +1 -1
- package/clis/xiaohongshu/draft-utils.js +2 -2
- package/clis/xiaohongshu/publish-video.js +1 -1
- package/clis/xiaohongshu/publish.js +1 -1
- package/clis/xiaoyuzhou/auth.js +1 -1
- package/clis/xiaoyuzhou/transcript.js +1 -1
- package/clis/yollomi/background.js +1 -1
- package/clis/yollomi/edit.js +1 -1
- package/clis/yollomi/generate.js +1 -1
- package/clis/yollomi/try-on.js +1 -1
- package/clis/youtube/publish.js +1 -1
- package/clis/zhihu/answer-comments.js +1 -1
- package/clis/zhihu/answer-detail.js +1 -1
- package/clis/zhihu/collection.js +2 -2
- package/clis/zhihu/collections.js +1 -1
- package/clis/zhihu/question.js +1 -1
- package/clis/zhihu/search.js +1 -1
- package/clis/zhihu/target.js +1 -1
- package/clis/zhihu/user-arg.js +1 -1
- package/dist/src/adapter-shadow.js +1 -1
- package/dist/src/browser/analyze.js +1 -1
- package/dist/src/browser/article-extract.d.ts +1 -1
- package/dist/src/browser/base-page.js +3 -3
- package/dist/src/browser/cdp.js +1 -1
- package/dist/src/browser/daemon-client.d.ts +1 -1
- package/dist/src/browser/daemon-lifecycle.js +6 -6
- package/dist/src/browser/daemon-version.js +1 -1
- package/dist/src/browser/dom-snapshot.d.ts +1 -1
- package/dist/src/browser/dom-snapshot.js +2 -2
- package/dist/src/browser/errors.js +2 -2
- package/dist/src/browser/network-cache.js +1 -1
- package/dist/src/browser/profile.js +1 -1
- package/dist/src/browser/target-resolver.js +4 -4
- package/dist/src/browser/verify-fixture.js +1 -1
- package/dist/src/browser-session-lock.js +1 -1
- package/dist/src/build-manifest.d.ts +1 -1
- package/dist/src/build-manifest.js +1 -1
- package/dist/src/cli-argv-preprocess.d.ts +4 -4
- package/dist/src/cli-argv-preprocess.js +1 -1
- package/dist/src/cli.d.ts +1 -1
- package/dist/src/cli.js +19 -19
- package/dist/src/commanderAdapter.js +1 -1
- package/dist/src/commands/auth.js +2 -2
- package/dist/src/commands/daemon.d.ts +4 -4
- package/dist/src/commands/daemon.js +1 -1
- package/dist/src/completion-shared.js +12 -12
- package/dist/src/completion.d.ts +2 -2
- package/dist/src/constants.d.ts +1 -1
- package/dist/src/constants.js +1 -1
- package/dist/src/daemon-utils.d.ts +1 -1
- package/dist/src/daemon-utils.js +1 -1
- package/dist/src/daemon.d.ts +2 -2
- package/dist/src/daemon.js +1 -1
- package/dist/src/discovery.d.ts +7 -7
- package/dist/src/discovery.js +2 -2
- package/dist/src/doctor.d.ts +1 -1
- package/dist/src/doctor.js +6 -6
- package/dist/src/electron-apps.d.ts +1 -1
- package/dist/src/electron-apps.js +1 -1
- package/dist/src/errors.d.ts +2 -2
- package/dist/src/errors.js +1 -1
- package/dist/src/execution.js +1 -1
- package/dist/src/external.d.ts +1 -1
- package/dist/src/external.js +1 -1
- package/dist/src/help.d.ts +1 -1
- package/dist/src/help.js +3 -3
- package/dist/src/hooks.d.ts +1 -1
- package/dist/src/launcher.js +2 -2
- package/dist/src/logger.d.ts +1 -1
- package/dist/src/main.d.ts +1 -1
- package/dist/src/main.js +1 -1
- package/dist/src/observation/artifact.js +2 -2
- package/dist/src/package-paths.js +1 -1
- package/dist/src/package-paths.test.d.ts +1 -0
- package/dist/src/plugin-manifest.d.ts +12 -3
- package/dist/src/plugin-manifest.js +1 -1
- package/dist/src/plugin-scaffold.d.ts +2 -2
- package/dist/src/plugin-scaffold.js +9 -9
- package/dist/src/plugin.d.ts +4 -4
- package/dist/src/plugin.js +10 -10
- package/dist/src/rate-limit.js +1 -1
- package/dist/src/registry-api.d.ts +1 -1
- package/dist/src/runtime-detect.d.ts +1 -1
- package/dist/src/serialization.js +1 -1
- package/dist/src/skills.js +6 -6
- package/dist/src/user-runtime.d.ts +8 -0
- package/dist/src/user-runtime.js +1 -0
- package/dist/src/user-runtime.test.d.ts +1 -0
- package/dist/src/validate.js +1 -1
- package/dist/src/validate.test.d.ts +1 -1
- package/docs/guide/browser-bridge.md +23 -23
- package/docs/guide/electron-app-cli.md +3 -3
- package/docs/guide/exit-codes.md +3 -3
- package/docs/guide/extending-opencli.md +37 -37
- package/docs/guide/getting-started.md +19 -19
- package/docs/guide/installation.md +6 -6
- package/docs/guide/plugins.md +32 -32
- package/docs/guide/remote-orchestration.md +5 -5
- package/docs/guide/troubleshooting.md +9 -9
- package/package.json +3 -2
- package/scripts/fetch-adapters.js +6 -6
- package/scripts/postinstall.js +14 -14
- package/skills/opencli-adapter-author/SKILL.md +24 -24
- package/skills/opencli-adapter-author/references/adapter-template.md +13 -13
- package/skills/opencli-adapter-author/references/api-discovery.md +25 -25
- package/skills/opencli-adapter-author/references/coverage-matrix.md +3 -3
- package/skills/opencli-adapter-author/references/field-decode-playbook.md +10 -10
- package/skills/opencli-adapter-author/references/jsdom-fixture-pattern.md +2 -2
- package/skills/opencli-adapter-author/references/site-memory.md +11 -11
- package/skills/opencli-adapter-author/references/site-recon.md +7 -7
- package/skills/opencli-adapter-author/references/strategy-selection.md +3 -3
- package/skills/opencli-adapter-author/references/success-rate-pitfalls.md +4 -4
- package/skills/opencli-adapter-author/references/typed-errors.md +2 -2
- package/skills/opencli-autofix/SKILL.md +29 -29
- package/skills/opencli-browser/SKILL.md +55 -55
- package/skills/opencli-browser-sitemap/SKILL.md +7 -7
- package/skills/opencli-sitemap-author/SKILL.md +11 -11
- package/skills/opencli-sitemap-author/references/sitemap-schema.md +19 -19
- package/skills/opencli-usage/SKILL.md +43 -43
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: opencli-usage
|
|
3
|
-
description: Use at the start of any
|
|
4
|
-
allowed-tools: Bash(
|
|
3
|
+
description: Use at the start of any ppcli session — this is the top-level map of what `opencli` can do, how to discover adapters, what flags and output formats are universal, and which specialized skill to load next. Point here when an agent asks "what can ppcli do?" or "how do I find the right command?".
|
|
4
|
+
allowed-tools: Bash(ppcli:*), Read
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# opencli-usage
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
ppcli turns any website, Electron desktop app, or external CLI into a uniform `ppcli <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.
|
|
10
10
|
|
|
11
11
|
## The three pillars
|
|
12
12
|
|
|
13
|
-
- **Adapter commands** — `
|
|
14
|
-
- **Browser driving** — `
|
|
15
|
-
- **Current-tab binding** — `
|
|
16
|
-
- **External CLI passthrough** — `
|
|
13
|
+
- **Adapter commands** — `ppcli <site> <command> [...]`. Built-in adapters live in `clis/`, user adapters in `~/.ppcli/clis/`. Each is backed by a strategy (`PUBLIC | COOKIE | INTERCEPT | UI | LOCAL`) that tells you whether a Chrome session is needed.
|
|
14
|
+
- **Browser driving** — `ppcli 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`.
|
|
15
|
+
- **Current-tab binding** — `ppcli browser <session> bind` attaches the Chrome tab the user already opened/logged into to that browser session. Follow-up commands use `ppcli browser <session> ...`. See `opencli-browser` before using it; bound sessions still block tab mutation.
|
|
16
|
+
- **External CLI passthrough** — `ppcli gh`, `ppcli docker`, `ppcli vercel`, etc. Managed via `ppcli external install <name>` (auto-install from `external-clis.yaml`) or `ppcli external register <name>` (bring your own).
|
|
17
17
|
|
|
18
18
|
## Install
|
|
19
19
|
|
|
20
20
|
```bash
|
|
21
21
|
# npm global
|
|
22
|
-
npm install -g @jackwener/opencli # binary:
|
|
23
|
-
|
|
22
|
+
npm install -g @jackwener/opencli # binary: ppcli, requires Node >= 21
|
|
23
|
+
ppcli doctor # run before browser-dependent work (see below)
|
|
24
24
|
|
|
25
25
|
# From source
|
|
26
26
|
git clone git@github.com:jackwener/OpenCLI.git
|
|
27
|
-
cd
|
|
27
|
+
cd ppcli && npm install
|
|
28
28
|
npx tsx src/main.ts <command> # same surface, no global install
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
-
`
|
|
31
|
+
`ppcli 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, `ppcli list`, `validate`, `verify`, plugin commands, and external-CLI passthrough don't need it to be green — only `COOKIE` / `INTERCEPT` / `UI` adapters and the `ppcli browser *` subcommands do. Flag: `-v` (verbose).
|
|
32
32
|
|
|
33
33
|
## Prerequisites by command type
|
|
34
34
|
|
|
35
|
-
| Strategy tag on `
|
|
35
|
+
| Strategy tag on `ppcli list` | What it needs |
|
|
36
36
|
|--------------------------------|---------------|
|
|
37
37
|
| `PUBLIC` | Nothing — pure HTTP, no browser. |
|
|
38
|
-
| `COOKIE` | Chrome logged into the target site + **
|
|
39
|
-
| `INTERCEPT` | Same as COOKIE, plus
|
|
38
|
+
| `COOKIE` | Chrome logged into the target site + **ppcli** extension installed from the [Chrome Web Store](https://chromewebstore.google.com/detail/opencli/ildkmabpimmkaediidaifkhjpohdnifk). Command captures the credential from your live session — no re-login. |
|
|
39
|
+
| `INTERCEPT` | Same as COOKIE, plus ppcli opens an automation window to capture a signed request. |
|
|
40
40
|
| `UI` | Same as COOKIE, full DOM interaction. |
|
|
41
41
|
| `LOCAL` | No browser; talks to a local/dev endpoint. |
|
|
42
42
|
|
|
@@ -45,14 +45,14 @@ Electron desktop apps (cursor, codex, chatwise, discord-app, doubao-app, antigra
|
|
|
45
45
|
## Discover what's installed — don't read this file, run a command
|
|
46
46
|
|
|
47
47
|
```bash
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
48
|
+
ppcli list # table, grouped by site
|
|
49
|
+
ppcli list -f json # machine-readable; pipe to jq or your agent
|
|
50
|
+
ppcli list | grep -i twitter # find commands for a specific site
|
|
51
|
+
ppcli <site> --help # see that site's commands + flags
|
|
52
|
+
ppcli <site> <command> --help # see positional args and command-specific flags
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
-
Do not hard-code adapter lists — there are 100+ sites and the count moves every week. `
|
|
55
|
+
Do not hard-code adapter lists — there are 100+ sites and the count moves every week. `ppcli 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.
|
|
56
56
|
|
|
57
57
|
## Universal flags (work on every adapter command)
|
|
58
58
|
|
|
@@ -80,7 +80,7 @@ A few commands override the default via `cmd.defaultFormat` (e.g. chat commands
|
|
|
80
80
|
| `OPENCLI_BROWSER_CONNECT_TIMEOUT` | `45` | Seconds to wait for the browser bridge. |
|
|
81
81
|
| `OPENCLI_BROWSER_COMMAND_TIMEOUT` | `60` | Per-command timeout. |
|
|
82
82
|
| `OPENCLI_CDP_ENDPOINT` | — | Manual CDP endpoint override (dev / remote Chrome / Electron). |
|
|
83
|
-
| `OPENCLI_CACHE_DIR` | `~/.
|
|
83
|
+
| `OPENCLI_CACHE_DIR` | `~/.ppcli/cache` | Network capture + browser-state cache. |
|
|
84
84
|
| `OPENCLI_WINDOW` | command-specific | `foreground` or `background` browser window mode. |
|
|
85
85
|
| `OPENCLI_VERBOSE` | `false` | Verbose logging (also triggered by `-v`). |
|
|
86
86
|
|
|
@@ -92,16 +92,16 @@ When an adapter command fails because the site changed (selectors drifted, API r
|
|
|
92
92
|
|
|
93
93
|
Two-path storage:
|
|
94
94
|
|
|
95
|
-
- **Private**: `~/.
|
|
95
|
+
- **Private**: `~/.ppcli/clis/<site>/<command>.js` — no build step, hot-available, not visible in the public package.
|
|
96
96
|
- **Public / PR**: `clis/<site>/<command>.js` — for upstream contribution; requires build.
|
|
97
97
|
|
|
98
98
|
Scaffolding & verification:
|
|
99
99
|
|
|
100
100
|
```bash
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
101
|
+
ppcli browser init <site>/<command> # generates a skeleton
|
|
102
|
+
ppcli validate [target] # semantic checks on the loaded registry (description, domain, pipeline step names, func|pipeline|_lazy presence, arg duplicates) — no network, no browser
|
|
103
|
+
ppcli verify [target] [--smoke] # run the command with synthetic args
|
|
104
|
+
ppcli browser verify <site>/<command> # end-to-end smoke inside the bridge
|
|
105
105
|
```
|
|
106
106
|
|
|
107
107
|
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`.
|
|
@@ -111,36 +111,36 @@ Adapters import only `@jackwener/opencli/registry` and `@jackwener/opencli/error
|
|
|
111
111
|
Plugins are third-party extensions pulled from git, separate from the main adapter registry:
|
|
112
112
|
|
|
113
113
|
```bash
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
114
|
+
ppcli plugin install github:user/repo # install
|
|
115
|
+
ppcli plugin list [-f json] # see installed
|
|
116
|
+
ppcli plugin update [name] | --all # keep current
|
|
117
|
+
ppcli plugin uninstall <name>
|
|
118
|
+
ppcli plugin create <name> # scaffold a new plugin
|
|
119
119
|
```
|
|
120
120
|
|
|
121
121
|
## External CLI passthrough
|
|
122
122
|
|
|
123
|
-
Wraps external command-line tools so you can discover + invoke them through the same `
|
|
123
|
+
Wraps external command-line tools so you can discover + invoke them through the same `ppcli …` entrypoint:
|
|
124
124
|
|
|
125
125
|
```bash
|
|
126
|
-
|
|
127
|
-
|
|
126
|
+
ppcli external install gh # auto-install via brew/apt/npm per external-clis.yaml
|
|
127
|
+
ppcli external register my-tool \
|
|
128
128
|
--binary my-tool \
|
|
129
129
|
--install "npm i -g my-tool" \
|
|
130
130
|
--desc "My internal CLI"
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
131
|
+
ppcli external list
|
|
132
|
+
ppcli gh pr list --limit 5 # passthrough; stdio is inherited, exit code propagated
|
|
133
|
+
ppcli docker ps
|
|
134
134
|
```
|
|
135
135
|
|
|
136
|
-
Built-in entries live in `src/external-clis.yaml`; user overrides and additions in `~/.
|
|
136
|
+
Built-in entries live in `src/external-clis.yaml`; user overrides and additions in `~/.ppcli/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)`.
|
|
137
137
|
|
|
138
138
|
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.
|
|
139
139
|
|
|
140
140
|
## Shell completion
|
|
141
141
|
|
|
142
142
|
```bash
|
|
143
|
-
|
|
143
|
+
ppcli completion bash # also: zsh, fish
|
|
144
144
|
# -> script on stdout; source or save per your shell's convention
|
|
145
145
|
```
|
|
146
146
|
|
|
@@ -157,12 +157,12 @@ opencli completion bash # also: zsh, fish
|
|
|
157
157
|
|
|
158
158
|
The following were removed in the PR #1094 consolidation — don't try to invoke them:
|
|
159
159
|
|
|
160
|
-
- `
|
|
161
|
-
- `
|
|
162
|
-
- `
|
|
160
|
+
- `ppcli explore <url>` — superseded by `ppcli browser network` + `ppcli browser find` for live API discovery, and by the `opencli-adapter-author` workflow for capture.
|
|
161
|
+
- `ppcli record <url>` — removed; manual capture now lives in `ppcli browser network --detail`.
|
|
162
|
+
- `ppcli web read` / `ppcli desktop *` as top-level groups — folded into their respective adapters (`ppcli web read` still exists as the `web` adapter's `read` command, but there is no standalone `web` / `desktop` top-level group command).
|
|
163
163
|
|
|
164
164
|
## Don't
|
|
165
165
|
|
|
166
|
-
- Don't paste this skill's command list into your plan; it will rot. Call `
|
|
166
|
+
- Don't paste this skill's command list into your plan; it will rot. Call `ppcli list -f json` at the start of a task instead.
|
|
167
167
|
- Don't assume every adapter needs a browser — strategy `PUBLIC` and `LOCAL` don't. Check the `strategy` field.
|
|
168
168
|
- 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.
|