opencli  by jackwener

Browser automation and web data extraction via an AI-native runtime

Created 1 week ago

New!

6,802 stars

Top 7.5% on SourcePulse

GitHubView on GitHub
Project Summary

OpenCLI transforms any website into a command-line interface, enabling seamless browser automation and dynamic web data extraction. It targets developers and AI agents seeking to interact with web services programmatically without complex scraping setups. The primary benefit is turning complex web interactions into simple CLI commands, leveraging existing browser sessions for security and convenience.

How It Works

OpenCLI employs a dual-engine architecture, supporting both YAML-declarative data pipelines and robust TypeScript injections for custom logic. Its core innovation lies in AI-native discovery: explore functions analyze websites to discover APIs and capabilities, synthesize generates adapter configurations from these findings, and cascade automatically determines authentication strategies. This approach allows for rapid development of new site integrations and intelligent data extraction.

Quick Start & Requirements

  • Primary install: npm install -g @jackwener/opencli
  • Prerequisites: Node.js (>= 18.0.0), Google Chrome installed and logged into the target website, and the Playwright MCP Bridge extension installed in Chrome.
  • Setup: Run opencli setup for an interactive TUI to discover and configure the Playwright MCP extension token. Alternatively, manual token configuration is supported. Use opencli doctor to verify the setup.
  • Links: README provides detailed guides for AI Agents (CLI-ONESHOT.md, CLI-EXPLORER.md) and Testing (TESTING.md).

Highlighted Details

  • Account-safe: Reuses Chrome's logged-in state; credentials remain within the browser.
  • AI Agent Ready: Features commands like explore, synthesize, and cascade for AI-driven API discovery and adapter generation.
  • Dynamic Loader: Supports auto-registration of .ts or .yaml adapters placed in the clis/ folder.
  • Extensive Site Support: Offers built-in commands for numerous platforms including Bilibili, Zhihu, Twitter, Reddit, GitHub, and more.
  • Flexible Output: Commands support output formats such as table, json, yaml, md, and csv.

Maintenance & Community

No specific details regarding maintainers, community channels (like Discord/Slack), or sponsorships are present in the provided README. The release process is automated via CI/CD upon version bumps.

Licensing & Compatibility

The project is licensed under the BSD-3-Clause license. This is a permissive license that generally allows for commercial use and integration into closed-source projects without significant restrictions.

Limitations & Caveats

The tool's functionality is critically dependent on a running Chrome instance with the Playwright MCP Bridge extension installed and correctly configured. Users must ensure they are logged into the target websites within Chrome before executing commands. Potential issues may arise from expired login sessions or conflicts with the browser extension.

Health Check
Last Commit

18 hours ago

Responsiveness

Inactive

Pull Requests (30d)
359
Issues (30d)
102
Star History
6,995 stars in the last 12 days

Explore Similar Projects

Starred by Will Brown Will Brown(Research Lead at Prime Intellect), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
16 more.

stagehand by browserbase

0.5%
22k
AI browser automation framework for production
Created 2 years ago
Updated 18 hours ago
Feedback? Help us improve.