Overview
OpenCLI is an open-source framework with over 26,700 GitHub stars that transforms any website into a command-line interface through browser automation and AI agents. It uses a headless browser combined with an LLM to interpret natural language commands and execute browser actions, making any website automatable without APIs.
Features
- ✓Natural language to browser actions
- ✓Persistent authenticated browser sessions
- ✓Scaffolded CLI with discoverable subcommands
- ✓Structured data extraction (JSON, CSV)
- ✓Reusable automation recipes
- ✓Multi-site simultaneous support
Installation
npm install -g opencliPros
- +Any website becomes automatable—no API required
- +Natural language reduces learning curve
- +Session persistence for auth workflows
- +Recipe sharing for team collaboration
Cons
- −Slower than direct API calls
- −Site UI changes can break recipes
- −Not suitable for high-frequency automation
Alternatives
Documentation
OpenCLI
Overview
OpenCLI is an open-source framework that transforms any website into a command-line interface through browser automation and AI agents. With over 26,700 GitHub stars, it enables developers to control web applications via terminal commands, bridging the gap between browser-based SaaS tools and CLI workflows.
Developed by jackwener, OpenCLI uses a headless browser combined with an AI agent to interpret natural language commands and execute corresponding browser actions. This eliminates the need for per-site API integrations—any website becomes automatable.
Features
- Natural Language to Browser Actions: Describe what you want; OpenCLI navigates, clicks, fills forms, and extracts data
- Session Persistence: Maintain browser sessions across commands with cookies and auth state
- Scaffolded CLI Interface: Each site gets a generated CLI with discoverable subcommands
- Data Extraction: Query web content and return structured data (JSON, CSV, tables)
- Automation Recipes: Share and reuse command sequences for common workflows
- Multi-Site Support: Connect to multiple websites simultaneously
- JavaScript/TypeScript Core: Built for Node.js environments
Installation
npm install -g opencli
# or
npx opencli connect https://example.com
Quick Start
# Connect to a website
opencli connect https://github.com
# Execute a natural language command
opencli run "Find repos with over 100k stars in TypeScript"
# Extract structured data
opencli extract "List all trending Python repos" --format json
Core Concepts
Browser Session
OpenCLI maintains a persistent browser instance with auth state, enabling authenticated interactions.
AI Interpreter
A language model parses natural language commands into browser actions (navigate, click, type, wait, extract).
Recipe
Reusable command sequences saved as recipes for team sharing.
Advanced Features
Custom Command Definitions
const command = {
name: 'create-issue',
description: 'Create a GitHub issue',
args: ['title', 'body'],
action: ({ title, body }) => `Create an issue with title "${title}"`,
};
Data Pipeline Integration
opencli extract "Get all open PRs" | jq '.[] | .title' | xargs opencli run "Review PR"
Examples
- GitHub CLI: Create issues, review PRs, manage repos from the terminal
- Jira Automation: Create tickets, update statuses, query boards
- E-commerce Research: Extract product prices, reviews, and specs from any store
- Sales Pipeline Management: Query and update Salesforce or HubSpot from CLI
Pros
- ✅ Any website becomes automatable—no API required
- ✅ Natural language interface reduces learning curve
- ✅ Session persistence for authenticated workflows
- ✅ Recipe sharing enables team collaboration
Cons
- ❌ Browser automation is slower than direct API calls
- ❌ Site UI changes can break automation recipes
- ❌ Requires active network and browser resources
- ❌ Not suitable for high-frequency automated operations
When to Use
Use OpenCLI when you need to automate websites that lack public APIs, or when building CLI wrappers around SaaS tools. Ideal for data extraction, administrative task automation, and prototyping browser-based workflows.
