T
traeai
Sign in
返回首页
量子位

Don't Let the Model Burn Tokens! GitHub's 20k Star Masterpiece: Turn the Entire Web into a Command Line

8.5Score
Don't Let the Model Burn Tokens! GitHub's 20k Star Masterpiece: Turn the Entire Web into a Command Line

TL;DR · AI Summary

OpenCLI is an open-source project on GitHub that structures web pages and chat records through the command line, completing operations without model inference.

Key Takeaways

  • OpenCLI can convert private domain chat records from WeChat, Telegram, etc., int
  • The CLI commands of OpenCLI are executed directly in the local browser, not pass
  • OpenCLI supports over 100 site adapters, covering major domestic and internation

Outline

Jump quickly between sections.

  1. Introduce the OpenCLI project and the problem it solves: allowing AI to directly access external website information.

  2. OpenCLI can convert web pages and private domain chat records into structured data and provide a unified command-line interface.

  3. OpenCLI is easy to install and supports Chrome browser extensions, reusing login status without manually configuring cookies.

  4. OpenCLI supports searching and exporting private domain chat records from WeChat, Telegram, Discord, etc., with output formats of JSON or CSV.

  5. Through the wx-cli tool, you can initialize and search WeChat chat records, supporting keyword searches and historical conversation exports.

  6. OpenCLI has wide applications in office, e-commerce, and academic fields, significantly improving data processing efficiency and reducing token consumption.

Mindmap

See how the topics connect at a glance.

查看大纲文本(无障碍 / 无 JS 友好)
  • OpenCLI 开源项目
    • 功能特点
      • 私域聊天记录处理
      • 网页数据抓取
      • 本地浏览器执行
    • 应用场景
      • 办公自动化
      • 电商客服管理
      • 学术研究
    • 技术优势
      • 零 Token 消耗
      • 结构化数据输出
      • 支持多种平台

Highlights

Key sentences worth saving and sharing.

  • OpenCLI unifies private domain chat records into the command line, enabling them to be searchable, filterable, exportable, and automated.

    Paragraph 4

    ⬇︎ 下载 PNG𝕏 分享到 X
  • OpenCLI's CLI commands are executed directly in the local browser, not passing through large model inference, resulting in zero token consumption during execution.

    Paragraph 6

    ⬇︎ 下载 PNG𝕏 分享到 X
  • OpenCLI includes over 100 site adapters, covering major domestic and international platforms such as Zhihu, Reddit, and Bilibili.

    Paragraph 7

    ⬇︎ 下载 PNG𝕏 分享到 X
#OpenCLI#Command Line Tool#Data Scraping#AI Agent#Open Source Project
Open original article

< img id="wx_img" src="https://www.qbitai.com/wp-content/uploads/imgs/qbitai-logo-1.png" width="400" height="400">

2026-05-16 14:35:05 Source: QbitAI

"Sorry, I cannot directly access these websites."

Every time you want an AI to read information from an external site, seeing this phrase is enough to make your head explode.

Image 1

However, a GitHub open-source project called OpenCLI has solved this problem: Turn websites into command lines.

Currently boasting 20k+ Stars, and still growing!!

Image 2

Reddit discussions, Bilibili trending topics, Arxiv papers – things you used to browse one by one in a browser – now yield structured data directly from a single terminal command.

Image 3

And it's not just web pages; now OpenCLI has even integrated private chat records from WeChat, Telegram, Discord, and others.

Yes, you read that correctly. You can search WeChat chat history too.

Image 4

So, by installing the accompanying skills into your Agent, whether it's public or private domains, websites or Apps, you can basically invoke them directly in the terminal via commands.

Image 5

Furthermore, the CLI commands themselves are executed directly in your local browser, bypassing large model inference.

This means many operations that previously required an Agent to "look and click" can now be handled by the browser itself, running any number of times without costing a single Token.

Chat History Becomes a Personal Information Stream

First, let's talk about installation. One command does the trick (Node.js 21+):

npm install -g @jackwener/opencli

After installation, run opencli list to see all available commands – there are a ton.

Image 6

Then, go to the Chrome Web Store and download the OpenCLI extension, enabling Developer mode.

Image 7

No manual cookie configuration is needed. OpenCLI can directly reuse your Chrome's login state. Any site you're already logged into in the browser, it can use directly.

At least you don't have to copy cookies manually, craft request headers, or hardcode credentials into scripts anymore, and it's somewhat safer.

OpenCLI integrates private chat domains, providing unified access under the opencli command:

  • opencli wx search searches WeChat chat history;
  • opencli tg search searches Telegram messages (based on the MTProto protocol);
  • opencli discord recent checks recent Discord messages.

So I tried it with our national app, WeChat.

WeChat uses a separate wx-cli tool. The installation command is:

npm install -g @jackwener/wx-cli

Image 8

First use requires wx init for initialization. It automatically detects the WeChat data directory and then scans the database key from the WeChat process memory.

This process requires root permissions (sudo wx init on macOS), and WeChat must be logged in.

After initialization is complete, you can use it directly. I first used the wx session command to pull the conversation list.

Image 9

wx history can accurately search the history of a specific contact.

Image 10

wx history can also search keywords directly.

Image 11

Chat history, which was once just fragmented information scattered across various apps, suddenly becomes searchable, filterable, exportable, and automatable once unified under CLI control.

Output formats support JSON and CSV, allowing direct feeding into knowledge bases or data analysis pipelines, and integration with tools like Obsidian becomes straightforward.

Thus, the chat history previously stored in WeChat now increasingly resembles a continuously updating personal information stream.

One could even argue this enables Agents to truly start possessing the ability to continuously read the latest information from your real digital life.

Because chat history isn't static documents; it updates in real-time.

It contains your workflows, relationship networks, collaboration history, long-term preferences, and even a wealth of "tacit knowledge" that AI previously couldn't access.

Beyond social apps, office scenarios aren't neglected either. They have unified interfaces: opencli lark-cli covers 200+ Feishu commands for messages, docs, calendars, tasks; opencli wecom-cli manages WeCom (Enterprise WeChat); opencli dws manages DingTalk – a full office suite package.

No wonder some netizens call this a boon for e-commerce folks.

Customer service chat logs exported with one command, user feedback batched for archiving – tasks that previously required manual screenshots, copying, and pasting are now done with a single command.

Image 12

Of course, regarding chat records, it's important to mention:

As an open-source project, OpenCLI provides tools and ideas. The actual access and deployment involving private data are personal actions. Be sure to carefully assess compliance risks and privacy boundaries before use.

In short, don't do everything just because it's technically possible (doge).

Scrape Data, Download Videos, Extract Content – All with One Click

The biggest difference between OpenCLI and "letting large models operate the browser themselves" is that CLI commands are executed directly in the local browser, bypassing large model inference. This means if you don't analyze the results, runtime incurs zero Token cost.

Image 13

Furthermore, because they are deterministic commands, the result structure from running the same command is consistent, making them pipeable, scriptable, and CI/CD friendly.

In a sense, it's pulling browser automation back from AI inference towards system calls, and Agents are starting to smell a bit like software infrastructure.

Now, about coverage.

OpenCLI comes with 100+ built-in site adapters. Major domestic platforms like Xiaohongshu, Bilibili, Zhihu, Douban, Hupu, Tieba are covered, as are international sites like Twitter/X, HackerNews, Pixiv.

Academics can search Google Scholar and Baidu Scholar; job seekers can check interview experiences and salaries on Niuke.

Let's see what it looks like in practice. For example, to search Zhihu for "AI Agent" and download articles:

opencli zhihu search “AI Agent”

opencli zhihu download —url “article_url” —output ./zhihu

Image 14

Want to see what's being discussed on Reddit today?

opencli reddit search “AI”

Image 15

One-click download of images/text/videos/audio; article export to Markdown/CSV/JSON; page clicking, pagination, form filling, batch data scraping; creator data, follower analysis, comment section crawling…

Tasks that used to require opening a browser and clicking around for ages are now done with a single line in the terminal.

Apart from video downloads requiring yt-dlp, everything else basically works out-of-the-box.

If you, dear friend, are particularly niche and don't find your desired site, don't worry.

OpenCLI provides an opencli-adapter-author skill for AI Agents.

Install it via npx skills add jackwener/opencli —skill opencli-adapter-author, and the Agent can help you automatically write adapters;

Image 16

There's also a community plugin system; opencli plugin install can install adapters written by others with one click – the ecosystem is gradually expanding.

There's another pretty powerful feature.

Via the CDP protocol, OpenCLI can directly control the UI of Electron desktop applications, without manual mouse clicking.

It can control Cursor's Composer, chats, and code extraction; automate the ChatGPT macOS desktop client; search, read, and write Notion pages; headlessly drive the OpenAI Codex CLI; and operate messages, channels, and servers in the Discord desktop client.

Image 17

It even covers multi-model clients like Doubao AI and ChatWise.

Well, well, well. OpenCLI's approach here is: for operations that can be executed locally, avoid model inference whenever possible;

For places where you can get things for free, don't spend a single cent on models (doge).

Project Address: https://github.com/jackwener/OpenCLI

_All rights reserved. Unauthorized reproduction or use in any form is prohibited._

AI may generate inaccurate information. Please verify important content.