opencli ai
Turn any website into a CLI by reusing your Chrome login sessions
opencli converts websites into CLI interfaces by reusing your Chrome login sessions. Access 28+ commands across 16 platforms — no separate credentials needed.
Features
- Reuses Chrome’s logged-in state for zero-risk credential handling
- Supports 16 platforms: Bilibili, Zhihu, Xiaohongshu, Twitter, Reddit, Weibo, BOSS, YouTube, and more
- AI-powered
exploreandsynthesizecommands to discover APIs and generate adapters - YAML declarative engine for simple adapters (~30 lines)
- TypeScript browser injection engine with XHR hijacking and GraphQL support
- Multiple output formats: table, JSON, Markdown, CSV
- Auto-registers new adapters dropped into the
clis/folder
Install
npm: npm install -g @jackwener/opencli Commands
| Command | Syntax | Description |
|---|---|---|
list | opencli list | View all available commands and platforms |
explore | opencli explore <url> | AI-powered API discovery for a website |
synthesize | opencli synthesize <url> | Generate YAML adapter from discovered APIs |
generate | opencli generate <url> | One-shot exploration-to-registration workflow |
hackernews top | opencli hackernews top --limit 5 | Fetch top Hacker News stories (public API) |
bilibili hot | opencli bilibili hot --limit 5 | Browse Bilibili trending videos (browser) |
zhihu hot | opencli zhihu hot -f json | Fetch Zhihu hot topics in JSON format |
Links
Agent Usage Example
Use cases:
- Access any website as a CLI using existing browser sessions
- Discover and generate adapters for new platforms via AI
- Extract structured data from websites in JSON/CSV format
Example workflow:
opencli hackernews top --limit 10 -f json | jq '.[].title'