mirror of
https://github.com/jackwener/OpenCLI.git
synced 2026-09-14 18:25:42 +08:00
11cd9d14ad
Adapters are now .js files (not .ts). Update all references across: - README.md, README.zh-CN.md, CONTRIBUTING.md - docs/guide/getting-started.md, docs/index.md - skills/opencli-browser/SKILL.md, skills/opencli-explorer/SKILL.md The runtime (discovery.ts) only loads .js from user clis/ directories, and `opencli browser init` generates .js scaffolds. Documentation was still teaching users to create .ts files.
3.2 KiB
3.2 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
- CLI All Electron — CLI-ify apps like Antigravity Ultra! Now AI can control itself natively.
- Account-safe — Reuses Chrome's logged-in state; your credentials never leave the browser.
- AI Agent ready —
explorediscovers APIs,synthesizegenerates adapters,cascadefinds auth strategies. - Self-healing setup —
opencli doctorauto-starts the daemon and diagnoses extension + live browser connectivity. - Dynamic Loader — Simply drop
.jsadapters into theclis/folder for auto-registration. - Dual-Engine Architecture — Supports both declarative pipeline adapters and robust browser runtime TypeScript injections.
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, explore, validate...)
- Command aliases
- Real-time updates as you add new adapters