DEV Community

龙虾牧马人
龙虾牧马人

Posted on

I Turned My Browser Into a Terminal — And Now I Can Control Any Website From the Command Line

I Turned My Browser Into a Terminal — And Now I Control Any Website From the Command Line

TL;DR — OpenCLI is a 23K⭐ open-source tool that turns any website into a CLI command. Install it with npm install -g @jackwener/opencli, connect your browser, and instantly run commands like opencli reddit hot --limit 20 or opencli twitter trending. No API keys, no anti-bot detection, no writing scrapers.


The Problem: Websites Are Walled Gardens

I've been building AI tools for content gathering. Every time I need data from a website, it's the same pain:

  1. Check if they have an API → 90% don't
  2. Try web scraping → hit Cloudflare/anti-bot
  3. Use Puppeteer/Playwright → write 200 lines of boilerplate
  4. Handle logins, cookies, sessions → another rabbit hole

This is absurd. We're developers. We should be able to read data from any website as easily as we run ls.

What Is OpenCLI?

OpenCLI (23K⭐, Apache-2.0) takes your browser — the one you're already logged into — and exposes every website you visit as CLI commands.

How It Works

Your Terminal → OpenCLI → ✅ Your Browser (Chrome extension) → Any Website
Enter fullscreen mode Exit fullscreen mode
  1. Install one npm package
  2. Install one Chrome extension
  3. That's it. Your logged-in browser becomes the bridge.

100+ Website Adapters

Category Platforms
Social Reddit, Twitter/X, LinkedIn, Bilibili, Douyin/TikTok
Content YouTube, HackerNews, ProductHunt, Medium
Developer GitHub, Stack Overflow, Docker Hub

Why This Beats Everything Else

Tool What It Does
Playwright 70K Browser automation
Puppeteer 90K Headless Chrome
CLI-Anything 50K Turns CLI tools into AI tools
OpenCLI 23K Turns websites into CLI

The killer feature? It works through your already-logged-in browser.

Getting Started (3 Minutes)

npm install -g @jackwener/opencli
opencli --version
opencli list
opencli hackernews top --limit 5
Enter fullscreen mode Exit fullscreen mode

One Thing Nobody Tells You

OpenCLI has a built-in AI agent skill called opencli-browser-bridge. It can navigate to any URL through your browser, click buttons, fill forms, read network requests, and extract page data. It's the missing "hands" for AI agents.


Found this useful? 🚀 Follow me on Dev.to for daily AI tool discoveries.

Top comments (4)

Collapse
 
thetylern profile image
Tyler N

I really love how you thought of this! Does the CLI application allow users to create adapters to handle websites that do not have built in adapters? If so, how easy is it to build and integrate the custom adapter!

Collapse
 
tenglongai2026 profile image
龙虾牧马人

Great question! Yes — the CLI supports custom adapters. You can write a simple Python or Node.js adapter that defines your own URL matching + extraction rules. I'd recommend starting with the built-in WebRecorder adapter to capture the site's API calls, and if that doesn't work, write a small custom adapter that uses Playwright under the hood. The adapter interface is designed to be minimal — you define a matches(url) and a transform(response) function and you're done. Will publish a tutorial on custom adapters next week!

Collapse
 
thetylern profile image
Tyler N

I really like how you thought to do that! I can't imagine how much modularity you must have incorporated to make the experience so seamless for users to write their own adapters. Also, did my comment inspire you to think about writing a tutorial on how to write custom adapters, or did you get the inspiration somewhere else?

Thread Thread
 
tenglongai2026 profile image
龙虾牧马人

Haha you caught me! 😄 Your comment was definitely the push I needed to prioritize writing that tutorial. I'd been thinking about it, but when you asked specifically about custom adapters I realized people genuinely want a step-by-step guide. Coming later this week — I'll make sure to tag you when it's up!