AutoCLI
AutoCLI is a Blazing fast, memory-safe command-line tool — Fetch information from any website with a single command. Covers Twitter/X, Reddit, YouTube, HackerNews, Bilibili, Zhihu, Xiaohongshu, and 55+ sites, with support for controlling Electron desktop apps, integrating local CLI tools (gh, docker, kubectl), now powered by AutoCLI.ai .
Install / Use
/learn @nashsu/AutoCLIREADME
AutoCLI
<p align="center"> <img src="title_screen.png" alt="autocli" width="800" /> </p> <p align="center"> <a href="https://autocli.ai"><b>https://autocli.ai</b></a> — AI-powered adapter marketplace & cloud API </p>Formerly known as opencli-rs. Renamed to AutoCLI starting from v0.2.4.
Blazing fast, memory-safe command-line tool — Fetch information from any website with a single command. Covers Twitter/X, Reddit, YouTube, HackerNews, Bilibili, Zhihu, Xiaohongshu, and 55+ sites, with support for controlling Electron desktop apps, integrating local CLI tools (gh, docker, kubectl), powered by browser session reuse and AI-native discovery capabilities.
A complete rewrite in pure Rust based on OpenCLI (TypeScript). Feature-equivalent, up to 12x faster, 10x less memory, single 4.7MB binary, zero runtime dependencies.
The perfect companion for OpenClaw/Agent — Give your AI Agent the ability to reach information across the entire web, fetching real-time data from 55+ sites with a single command.
Built for AI Agents: Configure autocli list in AGENT.md or .cursorrules, and AI can automatically discover all available tools. Register your local CLI (autocli register mycli), and AI can seamlessly invoke all your tools.
🚀 Performance Comparison
| Metric | 🦀 autocli (Rust) | 📦 opencli (Node.js) | Improvement | |------|:-----------------:|:-----------------:|:----:| | 💾 Memory Usage (Public Commands) | 15 MB | 99 MB | 6.6x | | 💾 Memory Usage (Browser Commands) | 9 MB | 95 MB | 10.6x | | 📏 Binary Size | 4.7 MB | ~50 MB (node_modules) | 10x | | 🔗 Runtime Dependencies | None | Node.js 20+ | Zero deps | | ✅ Test Pass Rate | 103/122 (84%) | 104/122 (85%) | Near parity |
⚡ Real-world Command Timing Comparison:
| Command | 🦀 autocli | 📦 opencli | Speedup |
|------|:----------:|:-------:|:------:|
| bilibili hot | 1.66s | 20.1s | 🔥 12x |
| zhihu hot | 1.77s | 20.5s | 🔥 11.6x |
| xueqiu search 茅台 | 1.82s | 9.2s | ⚡ 5x |
| xiaohongshu search | 5.1s | 14s | ⚡ 2.7x |
Based on automated testing of 122 commands (55 sites), macOS Apple Silicon environment.
Features
- 55 sites, 333 commands — Covers Bilibili, Twitter, Reddit, Zhihu, Xiaohongshu, YouTube, Hacker News, and more
- Browser session reuse — Reuse logged-in sessions via Chrome extension, no need to manage tokens
- Declarative YAML Pipeline — Describe data scraping workflows in YAML, add new adapters with zero code
- AI-native discovery —
exploreanalyzes website APIs,generateauto-creates adapters with one command,cascadeprobes authentication strategies - AI-powered generation —
generate --aiuses LLM to analyze any website and create working adapters automatically, with cloud sharing via autocli.ai - Download media & articles — Download videos (via yt-dlp), articles as Markdown with images localized
- External CLI passthrough — Integrate GitHub CLI, Docker, Kubernetes, and other tools
- Multi-format output — table, JSON, YAML, CSV, Markdown
- Single binary — Compiles to a 4MB static binary with zero runtime dependencies
Installation
Just one file, download and use. No Node.js, Python, or any runtime needed — just put it in your PATH and go.
One-line Install Script (macOS / Linux)
curl -fsSL https://raw.githubusercontent.com/nashsu/autocli/main/scripts/install.sh | sh
Automatically detects your system and architecture, downloads the corresponding binary, and installs to /usr/local/bin/.
Windows (PowerShell)
Invoke-WebRequest -Uri "https://github.com/nashsu/autocli/releases/latest/download/autocli-x86_64-pc-windows-msvc.zip" -OutFile autocli.zip
Expand-Archive autocli.zip -DestinationPath .
Move-Item autocli.exe "$env:LOCALAPPDATA\Microsoft\WindowsApps\"
Manual Download (Simplest)
Download the file for your platform from GitHub Releases:
| Platform | File |
|------|------|
| macOS (Apple Silicon) | autocli-aarch64-apple-darwin.tar.gz |
| macOS (Intel) | autocli-x86_64-apple-darwin.tar.gz |
| Linux (x86_64) | autocli-x86_64-unknown-linux-musl.tar.gz |
| Linux (ARM64) | autocli-aarch64-unknown-linux-musl.tar.gz |
| Windows (x64) | autocli-x86_64-pc-windows-msvc.zip |
After extracting, place autocli (or autocli.exe on Windows) in your system PATH.
Build from Source
git clone https://github.com/nashsu/autocli.git
cd autocli
cargo build --release
cp target/release/autocli /usr/local/bin/ # macOS / Linux
Update
Simply re-run the install command or download the latest release to overwrite the existing binary.
Chrome Extension Setup (required for browser commands)
- Download
autocli-chrome-extension.zipfrom GitHub Releases - Extract to any directory
- Open Chrome and go to
chrome://extensions - Enable "Developer mode" (top right toggle)
- Click "Load unpacked" and select the extracted folder
- The extension will automatically connect to the autocli daemon
Public mode commands (hackernews, devto, lobsters, etc.) work without the extension.
Skill Install
One-click install autocli skill for your AI Agent:
npx skills add https://github.com/nashsu/autocli-skill
Quick Start
# View all available commands
autocli --help
# View commands for a specific site
autocli hackernews --help
# Get Hacker News top stories (public API, no browser needed)
autocli hackernews top --limit 10
# JSON format output
autocli hackernews top --limit 5 --format json
# Get Bilibili trending videos (requires browser + Cookie)
autocli bilibili hot --limit 20
# Search Twitter (requires browser + login)
autocli twitter search "rust lang" --limit 10
# Run diagnostics
autocli doctor
# Generate shell completions
autocli completion bash >> ~/.bashrc
autocli completion zsh >> ~/.zshrc
autocli completion fish > ~/.config/fish/completions/autocli.fish
AI Commands
Powered by autocli.ai — Get your API token, share adapters with the community, and let AI generate adapters for any website.
Step 1: Authenticate
autocli auth
This will:
- Open your browser to https://autocli.ai/get-token
- Prompt you to enter the token
- Verify the token with the server
- Save it to
~/.autocli/config.json
Step 2: Generate Adapter with AI
# AI analyzes the page and generates a working adapter
autocli generate https://www.moltbook.com/ --goal 'list' --ai
# Search for products
autocli generate https://www.amazon.com/ --goal 'search' --ai
How it works:
- Searches autocli.ai for existing adapters matching the URL
- If found, shows an interactive list for you to choose:
? Existing adapters found, please select: > [exact] example hot (by alice) - Get trending posts [domain] example search (by bob) - Search articles 🔄 Regenerate (using AI) - If no match or you choose "Regenerate", AI analyzes the page (DOM structure + API requests) and generates a new YAML adapter
- The generated adapter is saved locally and uploaded to autocli.ai for the community
Step 3: Search Existing Adapters
# Search by URL
autocli search https://www.example.com
# Domain name also works (auto-prepends https://)
autocli search example.com
Searches autocli.ai for community-shared adapters matching the URL. Select one from the interactive list to download and save it locally — ready to use immediately.
Environment Variables
| Variable | Description | Default |
|----------|-------------|---------|
| AUTOCLI_API_BASE | Override server URL | https://www.autocli.ai |
Built-in Commands
Run autocli --help to see all available commands.
| Site | Commands | Mode |
|------|------|------|
| hackernews | top new best ask show jobs search user | Public |
| devto | top tag user | Public |
| lobsters | hot newest active tag | Public |
| stackoverflow | hot search bounties unanswered | Public |
| steam | top-sellers | Public |
| linux-do | hot latest search categories category topic | Public |
| arxiv | search paper | Public |
| wikipedia | search summary random trending | Public |
| apple-podcasts | search episodes top | Public |
| xiaoyuzhou | podcast podcast-episodes episode | Public |
| bbc | news | Public |
| hf | top | Public |
| sinafinance | news | Public |
| google | news search suggest trends | Public / Browser |
| v2ex | hot latest topic node user member replies nodes daily me notifications | Public / Browser |
| bloomberg | main markets economics industries tech politics businessweek opinions feeds news | Public / Browser |
| twitter | trending bookmarks profile search timeline thread following followers notifications post reply delete like article follow unfollow bookmark unbookmark download accept reply-dm block unblock hide-reply | Browser |
| bilibili | hot search me favorite history feed subtitle dynamic ranking following user-videos download | Browser |
| reddit | hot frontpage popular search subreddit read user user-posts user-comments upvote save comment subscribe saved upvoted | Browser |
| zhihu | hot search question download | Browser |
| xiaohongshu | search notifications `fee
