29c135b656
* refactor(notion): replace built-in CDP adapter with external ntn CLI Notion has shipped an official CLI at https://ntn.dev. It uses the public Notion API (blocks / databases / properties / comments) instead of reverse-engineering the Desktop UI, so it survives Notion app updates and exposes a wider command surface than the in-tree adapter could. Changes: - `src/external-clis.yaml` — register `ntn` as first-class external CLI (binary `ntn`, homepage ntn.dev, install via the shell-pipe script on mac/linux) - `clis/notion/` — entire directory removed (8 commands: status / search / read / new / write / sidebar / favorites / export) - `docs/adapters/desktop/notion.md` — removed - `docs/.vitepress/config.mts` — drop nav entry - `docs/adapters/index.md` — drop adapter row - `README.md` / `README.zh-CN.md` — drop notion from feature lines, drop adapter table row, add `ntn` to CLI hub examples - `docs/index.md` / `docs/zh/index.md` / `docs/guide/getting-started.md` — drop notion from electron-control feature copy - `skills/opencli-usage/SKILL.md` — drop notion from electron list - `cli-manifest.json` — rebuilt with --allow-removals=8 Migration for users: `curl -fsSL https://ntn.dev | bash` (or `opencli external install ntn`) Then use `opencli ntn <command>` in place of `opencli notion <command>`. Rationale: the in-tree adapter was reverse-engineered against Notion Desktop CDP and shipped only 8 commands. The official CLI gives users the full Notion API surface and reduces our maintenance burden to zero. Same pattern as gh / obsidian / lark-cli / tg-cli / discord-cli / wx-cli. Verification: - `npx tsc --noEmit` clean - `npx vitest run --project unit` → 1091/1 skipped - `npm run build` (with --allow-removals=8) — manifest 809 entries - grep notion in user-facing docs (README / docs / skills) — only descriptive mentions remain in non-blocking places (comparison / site-recon / electron how-to / design doc), no broken adapter references * fix(notion): align ntn external migration * docs(notion): clarify ntn manual install
3.5 KiB
3.5 KiB
Getting Started
Make any website or Electron App your CLI. Zero risk · Reuse Chrome login · AI-powered discovery · Browser + Desktop automation
OpenCLI turns any website or Electron app into a command-line interface — Bilibili, Zhihu, 小红书, Twitter/X, Reddit, YouTube, Antigravity, and many more — powered by browser session reuse and AI-native discovery.
Highlights
- Desktop App Control — Drive Electron apps (Cursor, Codex, ChatGPT, etc.) directly from the terminal via CDP.
- Browser Automation —
browsergives AI agents direct browser control: click, type/fill, extract, screenshot — fully scriptable. - Website → CLI — Turn any website into a deterministic CLI: 100+ site surfaces are already registered, or author your own with the
opencli-adapter-authorskill. - Account-safe — Reuses Chrome's logged-in state; your credentials never leave the browser.
- AI Agent ready —
opencli browser *primitives (open/network/state/eval/init/verify) drive the adapter-authoring loop. - Zero LLM cost — No tokens consumed at runtime. Run 10,000 times and pay nothing.
- Deterministic — Same command, same output schema, every time. Pipeable, scriptable, CI-friendly.
Quick Start
Install via npm
npm install -g @jackwener/opencli
Basic Usage
opencli list # See all commands
opencli hackernews top --limit 5 # Public API, no browser
opencli bilibili hot --limit 5 # Browser command
opencli zhihu hot -f json # JSON output
Output Formats
All built-in commands support --format / -f:
opencli bilibili hot -f table # Default: rich terminal table
opencli bilibili hot -f json # JSON (pipe to jq or LLMs)
opencli bilibili hot -f yaml # YAML (human-readable)
opencli bilibili hot -f md # Markdown
opencli bilibili hot -f csv # CSV
opencli bilibili hot -v # Verbose: show pipeline debug
Tab Completion
OpenCLI supports intelligent tab completion to speed up command input:
# Add shell completion to your startup config
echo 'eval "$(opencli completion zsh)"' >> ~/.zshrc # Zsh
echo 'eval "$(opencli completion bash)"' >> ~/.bashrc # Bash
echo 'opencli completion fish | source' >> ~/.config/fish/config.fish # Fish
# Restart your shell, then press Tab to complete:
opencli [Tab] # Complete site names (bilibili, zhihu, twitter...)
opencli bilibili [Tab] # Complete commands (hot, search, me, download...)
The completion includes:
- All available sites and adapters
- Built-in commands (list, validate, verify, browser, doctor, plugin...)
- Command aliases
- Real-time updates as you add new adapters