[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-74666":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":23,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":26,"readmeContent":27,"aiSummary":28,"trendingCount":16,"starSnapshotCount":16,"syncStatus":29,"lastSyncTime":30,"discoverSource":31},74666,"AutoCLI","nashsu\u002FAutoCLI","nashsu","AutoCLI is a  Blazing fast, memory-safe command-line tool — Fetch information from any website with a single command. Covers Twitter\u002FX, 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 .","",null,"Rust",2770,264,16,29,0,15,46,150,45,29.27,"Apache License 2.0",false,"main",[],"2026-06-12 02:03:26","# AutoCLI\n> Formerly known as **opencli-rs**. Renamed to **AutoCLI** starting from v0.2.4.\n\n**[English](README.md) | [中文](README.zh.md) | [日本語](README.ja.md)**\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"assets\u002Ftitle_screen.jpg\" alt=\"autocli\" width=\"800\" \u002F>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fautocli.ai\">\u003Cb>https:\u002F\u002Fautocli.ai\u003C\u002Fb>\u003C\u002Fa> — AI-powered adapter marketplace & cloud API\n\u003C\u002Fp>\n\n---\n\n## What's New\n\n### v0.3.2\n- **Chrome Extension Selector Tool** — Just select the core data you need, visually pick elements from any page and build precise CSS selectors to target specific content\n- **AI-Powered Generation via AutoCLI.ai** — Based on your selected data, AI automatically expands and discovers related fields, generating complete scraping rules\n- **Seamless Local + Cloud Sync** — Generated adapters are saved locally and synced to AutoCLI.ai, ready to use immediately\n\n---\n\nBlazing fast, memory-safe command-line tool — **Fetch information from any website with a single command**. Covers Twitter\u002FX, Reddit, YouTube, HackerNews, Bilibili, Zhihu, Xiaohongshu, and [55+ sites](#built-in-commands), with support for controlling Electron desktop apps, integrating local CLI tools (`gh`, `docker`, `kubectl`), powered by browser session reuse and AI-native discovery capabilities.\n\nA **complete rewrite in pure Rust** based on [OpenCLI](https:\u002F\u002Fgithub.com\u002Fjackwener\u002Fopencli) (TypeScript). Feature-equivalent, **up to 12x faster**, **10x less memory**, **single 4.7MB binary**, zero runtime dependencies.\n\n**The perfect companion for OpenClaw\u002FAgent** — Give your AI Agent the ability to reach information across the entire web, fetching real-time data from 55+ sites with a single command.\n**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.\n\n\n## 🚀 Performance Comparison\n\n| Metric | 🦀 autocli (Rust) | 📦 opencli (Node.js) | Improvement |\n|------|:-----------------:|:-----------------:|:----:|\n| 💾 **Memory Usage (Public Commands)** | 15 MB | 99 MB | **6.6x** |\n| 💾 **Memory Usage (Browser Commands)** | 9 MB | 95 MB | **10.6x** |\n| 📏 **Binary Size** | 4.7 MB | ~50 MB (node_modules) | **10x** |\n| 🔗 **Runtime Dependencies** | None | Node.js 20+ | **Zero deps** |\n| ✅ **Test Pass Rate** | 103\u002F122 (84%) | 104\u002F122 (85%) | Near parity |\n\n**⚡ Real-world Command Timing Comparison:**\n\n| Command | 🦀 autocli | 📦 opencli | Speedup |\n|------|:----------:|:-------:|:------:|\n| `bilibili hot` | **1.66s** | 20.1s | 🔥 **12x** |\n| `zhihu hot` | **1.77s** | 20.5s | 🔥 **11.6x** |\n| `xueqiu search 茅台` | **1.82s** | 9.2s | ⚡ **5x** |\n| `xiaohongshu search` | **5.1s** | 14s | ⚡ **2.7x** |\n\n> Based on automated testing of 122 commands (55 sites), macOS Apple Silicon environment.\n\n## Features\n\n- **55 sites, 333 commands** — Covers Bilibili, Twitter, Reddit, Zhihu, Xiaohongshu, YouTube, Hacker News, and more\n- **Browser session reuse** — Reuse logged-in sessions via Chrome extension, no need to manage tokens\n- **Declarative YAML Pipeline** — Describe data scraping workflows in YAML, add new adapters with zero code\n- **AI-native discovery** — `explore` analyzes website APIs, `generate` auto-creates adapters with one command, `cascade` probes authentication strategies\n- **AI-powered generation** — `generate --ai` uses LLM to analyze any website and create working adapters automatically, with cloud sharing via [autocli.ai](https:\u002F\u002Fautocli.ai)\n- **Download media & articles** — Download videos (via yt-dlp), articles as Markdown with images localized\n- **External CLI passthrough** — Integrate GitHub CLI, Docker, Kubernetes, and other tools\n- **Multi-format output** — table, JSON, YAML, CSV, Markdown\n- **Single binary** — Compiles to a 4MB static binary with zero runtime dependencies\n\n## Installation\n> **Just one file, download and use.** No Node.js, Python, or any runtime needed — just put it in your PATH and go.\n\n### One-line Install Script (macOS \u002F Linux)\n\n```bash\ncurl -fsSL https:\u002F\u002Fraw.githubusercontent.com\u002Fnashsu\u002Fautocli\u002Fmain\u002Fscripts\u002Finstall.sh | sh\n```\n\nAutomatically detects your system and architecture, downloads the corresponding binary, and installs to `\u002Fusr\u002Flocal\u002Fbin\u002F`.\n\n### Windows (PowerShell)\n\n```powershell\nInvoke-WebRequest -Uri \"https:\u002F\u002Fgithub.com\u002Fnashsu\u002Fautocli\u002Freleases\u002Flatest\u002Fdownload\u002Fautocli-x86_64-pc-windows-msvc.zip\" -OutFile autocli.zip\nExpand-Archive autocli.zip -DestinationPath .\nMove-Item autocli.exe \"$env:LOCALAPPDATA\\Microsoft\\WindowsApps\\\"\n```\n\n\n### Manual Download (Simplest)\n\nDownload the file for your platform from [GitHub Releases](https:\u002F\u002Fgithub.com\u002Fnashsu\u002Fautocli\u002Freleases\u002Flatest):\n\n| Platform | File |\n|------|------|\n| macOS (Apple Silicon) | `autocli-aarch64-apple-darwin.tar.gz` |\n| macOS (Intel) | `autocli-x86_64-apple-darwin.tar.gz` |\n| Linux (x86_64) | `autocli-x86_64-unknown-linux-musl.tar.gz` |\n| Linux (ARM64) | `autocli-aarch64-unknown-linux-musl.tar.gz` |\n| Windows (x64) | `autocli-x86_64-pc-windows-msvc.zip` |\n\nAfter extracting, place `autocli` (or `autocli.exe` on Windows) in your system PATH.\n\n### Build from Source\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fnashsu\u002Fautocli.git\ncd autocli\ncargo build --release\ncp target\u002Frelease\u002Fautocli \u002Fusr\u002Flocal\u002Fbin\u002F   # macOS \u002F Linux\n```\n\n### Update\n\nSimply re-run the install command or download the latest release to overwrite the existing binary.\n\n### Chrome Extension Setup (required for browser commands)\n\n1. Download `autocli-chrome-extension.zip` from [GitHub Releases](https:\u002F\u002Fgithub.com\u002Fnashsu\u002Fautocli\u002Freleases\u002Flatest)\n2. Extract to any directory\n3. Open Chrome and go to `chrome:\u002F\u002Fextensions`\n4. Enable \"Developer mode\" (top right toggle)\n5. Click \"Load unpacked\" and select the extracted folder\n6. The extension will automatically connect to the autocli daemon\n\n> Public mode commands (hackernews, devto, lobsters, etc.) work without the extension.\n\n## Skill Install\n\nOne-click install autocli skill for your AI Agent:\n\n```bash\nnpx skills add https:\u002F\u002Fgithub.com\u002Fnashsu\u002Fautocli-skill\n```\n\n## Quick Start\n\n```bash\n# View all available commands\nautocli --help\n\n# View commands for a specific site\nautocli hackernews --help\n\n# Get Hacker News top stories (public API, no browser needed)\nautocli hackernews top --limit 10\n\n# JSON format output\nautocli hackernews top --limit 5 --format json\n\n# Get Bilibili trending videos (requires browser + Cookie)\nautocli bilibili hot --limit 20\n\n# Search Twitter (requires browser + login)\nautocli twitter search \"rust lang\" --limit 10\n\n# Run diagnostics\nautocli doctor\n\n# Generate shell completions\nautocli completion bash >> ~\u002F.bashrc\nautocli completion zsh >> ~\u002F.zshrc\nautocli completion fish > ~\u002F.config\u002Ffish\u002Fcompletions\u002Fautocli.fish\n```\n\n## AI Commands\n\n> **Powered by [autocli.ai](https:\u002F\u002Fautocli.ai)** — Get your API token, share adapters with the community, and let AI generate adapters for any website.\n\n### Step 1: Authenticate\n\n```bash\nautocli auth\n```\n\nThis will:\n1. Open your browser to [https:\u002F\u002Fautocli.ai\u002Fget-token](https:\u002F\u002Fautocli.ai\u002Fget-token)\n2. Prompt you to enter the token\n3. Verify the token with the server\n4. Save it to `~\u002F.autocli\u002Fconfig.json`\n\n### Step 2: Use the Chrome Extension to precisely select the data you need from any website. Click the Generate button, and AI will automatically analyze the page, expand related data, and generate an adapter:\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"assets\u002Fchrome_extension_demo.jpg\" alt=\"autocli\" width=\"800\" \u002F>\n\u003C\u002Fp>\n\nOnce generation is complete, you can use autocli with the newly generated command to retrieve the data you need.\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"assets\u002Fautocli_use.jpg\" alt=\"autocli\" width=\"800\" \u002F>\n\u003C\u002Fp>\n\n### Step 3: Search Existing Adapters\n\n```bash\n# Search by URL\nautocli search https:\u002F\u002Fwww.example.com\n\n# Domain name also works (auto-prepends https:\u002F\u002F)\nautocli search example.com\n```\n\nSearches [autocli.ai](https:\u002F\u002Fautocli.ai) for community-shared adapters matching the URL. Select one from the interactive list to download and save it locally — ready to use immediately.\n\n### Environment Variables\n\n| Variable | Description | Default |\n|----------|-------------|---------|\n| `AUTOCLI_API_BASE` | Override server URL | `https:\u002F\u002Fwww.autocli.ai` |\n\n## Built-in Commands\n\nRun `autocli --help` to see all available commands.\n\n| Site | Commands | Mode |\n|------|------|------|\n| **hackernews** | `top` `new` `best` `ask` `show` `jobs` `search` `user` | Public |\n| **devto** | `top` `tag` `user` | Public |\n| **lobsters** | `hot` `newest` `active` `tag` | Public |\n| **stackoverflow** | `hot` `search` `bounties` `unanswered` | Public |\n| **steam** | `top-sellers` | Public |\n| **linux-do** | `hot` `latest` `search` `categories` `category` `topic` | Public |\n| **arxiv** | `search` `paper` | Public |\n| **wikipedia** | `search` `summary` `random` `trending` | Public |\n| **apple-podcasts** | `search` `episodes` `top` | Public |\n| **xiaoyuzhou** | `podcast` `podcast-episodes` `episode` | Public |\n| **bbc** | `news` | Public |\n| **hf** | `top` | Public |\n| **sinafinance** | `news` | Public |\n| **google** | `news` `search` `suggest` `trends` | Public \u002F Browser |\n| **v2ex** | `hot` `latest` `topic` `node` `user` `member` `replies` `nodes` `daily` `me` `notifications` | Public \u002F Browser |\n| **bloomberg** | `main` `markets` `economics` `industries` `tech` `politics` `businessweek` `opinions` `feeds` `news` | Public \u002F Browser |\n| **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 |\n| **bilibili** | `hot` `search` `me` `favorite` `history` `feed` `subtitle` `dynamic` `ranking` `following` `user-videos` `download` | Browser |\n| **reddit** | `hot` `frontpage` `popular` `search` `subreddit` `read` `user` `user-posts` `user-comments` `upvote` `save` `comment` `subscribe` `saved` `upvoted` | Browser |\n| **zhihu** | `hot` `search` `question` `download` | Browser |\n| **xiaohongshu** | `search` `notifications` `feed` `user` `download` `publish` `creator-notes` `creator-note-detail` `creator-notes-summary` `creator-profile` `creator-stats` | Browser |\n| **xueqiu** | `feed` `hot-stock` `hot` `search` `stock` `watchlist` `earnings-date` | Browser |\n| **weibo** | `hot` `search` | Browser |\n| **douban** | `search` `top250` `subject` `marks` `reviews` `movie-hot` `book-hot` | Browser |\n| **weread** | `shelf` `search` `book` `highlights` `notes` `notebooks` `ranking` | Browser |\n| **youtube** | `search` `video` `transcript` | Browser |\n| **medium** | `feed` `search` `user` | Browser |\n| **substack** | `feed` `search` `publication` | Browser |\n| **sinablog** | `hot` `search` `article` `user` | Browser |\n| **boss** | `search` `detail` `recommend` `joblist` `greet` `batchgreet` `send` `chatlist` `chatmsg` `invite` `mark` `exchange` `resume` `stats` | Browser |\n| **jike** | `feed` `search` `create` `like` `comment` `repost` `notifications` `post` `topic` `user` | Browser |\n| **facebook** | `feed` `profile` `search` `friends` `groups` `events` `notifications` `memories` `add-friend` `join-group` | Browser |\n| **instagram** | `explore` `profile` `search` `user` `followers` `following` `follow` `unfollow` `like` `unlike` `comment` `save` `unsave` `saved` | Browser |\n| **tiktok** | `explore` `search` `profile` `user` `following` `follow` `unfollow` `like` `unlike` `comment` `save` `unsave` `live` `notifications` `friends` | Browser |\n| **yollomi** | `generate` `video` `edit` `upload` `models` `remove-bg` `upscale` `face-swap` `restore` `try-on` `background` `object-remover` | Browser |\n| **yahoo-finance** | `quote` | Browser |\n| **barchart** | `quote` `options` `greeks` `flow` | Browser |\n| **linkedin** | `search` | Browser |\n| **reuters** | `search` | Browser |\n| **smzdm** | `search` | Browser |\n| **ctrip** | `search` | Browser |\n| **coupang** | `search` `add-to-cart` | Browser |\n| **grok** | `ask` | Browser |\n| **jimeng** | `generate` `history` | Browser |\n| **chaoxing** | `assignments` `exams` | Browser |\n| **weixin** | `download` | Browser |\n| **doubao** | `status` `new` `send` `read` `ask` | Browser |\n| **cursor** | `status` `send` `read` `new` `dump` `composer` `model` `extract-code` `ask` `screenshot` `history` `export` | Desktop |\n| **codex** | `status` `send` `read` `new` `dump` `extract-diff` `model` `ask` `screenshot` `history` `export` | Desktop |\n| **chatwise** | `status` `new` `send` `read` `ask` `model` `history` `export` `screenshot` | Desktop |\n| **chatgpt** | `status` `new` `send` `read` `ask` | Desktop |\n| **doubao-app** | `status` `new` `send` `read` `ask` `screenshot` `dump` | Desktop |\n| **notion** | `status` `search` `read` `new` `write` `sidebar` `favorites` `export` | Desktop |\n| **discord-app** | `status` `send` `read` `channels` `servers` `search` `members` | Desktop |\n| **antigravity** | `status` `send` `read` `new` `dump` `extract-code` `model` `watch` | Desktop |\n\n> **Mode legend:** Public = No browser needed, calls API directly; Browser = Requires Chrome + extension; Desktop = Requires the desktop app to be running\n\n\n\n## AI Discovery Capabilities\n\nTwo approaches to auto-generate adapters:\n\n```bash\n# 🤖 AI-powered (recommended): LLM analyzes page and generates adapter\nautocli generate https:\u002F\u002Fwww.example.com --goal hot --ai\n# Searches autocli.ai for existing adapters first, then generates with AI if needed\n\n# 🔧 Rule-based: heuristic analysis without AI\nautocli generate https:\u002F\u002Fwww.example.com --goal hot\n\n# Explore website API surface (endpoints, framework, stores)\nautocli explore https:\u002F\u002Fwww.example.com --site mysite\n\n# With interactive fuzzing (click buttons to trigger hidden APIs)\nautocli explore https:\u002F\u002Fwww.example.com --auto --click \"Comments,CC\"\n\n# Auto-detect authentication strategy (PUBLIC → COOKIE → HEADER)\nautocli cascade https:\u002F\u002Fapi.example.com\u002Fhot\n```\n\n**Discovery features:**\n- `.json` suffix probing (Reddit-style REST discovery)\n- `__INITIAL_STATE__` extraction (SSR sites like Bilibili, Xiaohongshu)\n- Pinia\u002FVuex store discovery and action mapping\n- Auto search endpoint discovery with `--goal search`\n- Framework detection (Vue\u002FReact\u002FNext.js\u002FNuxt)\n\n## Download\n\nDownload media and articles from supported sites:\n\n```bash\n# Download Bilibili video (requires yt-dlp)\nautocli bilibili download BV1xxx --output .\u002Fvideos --quality 1080p\n\n# Download Zhihu article as Markdown with images\nautocli zhihu download \"https:\u002F\u002Fzhuanlan.zhihu.com\u002Fp\u002Fxxx\" --output .\u002Farticles\n\n# Download WeChat article as Markdown with images\nautocli weixin download \"https:\u002F\u002Fmp.weixin.qq.com\u002Fs\u002Fxxx\" --output .\u002Farticles\n\n# Download Twitter\u002FX media (images + videos)\nautocli twitter download nash_su --limit 10 --output .\u002Ftwitter\nautocli twitter download --tweet-url \"https:\u002F\u002Fx.com\u002Fuser\u002Fstatus\u002F123\" --output .\u002Ftwitter\n```\n\n**Download features:**\n- Videos via yt-dlp (cookies extracted from browser automatically, no Keychain prompt)\n- Articles as Markdown with YAML frontmatter (title, author, date, source)\n- Images downloaded and localized (remote URLs replaced with local `images\u002Fimg_001.jpg`)\n- Output directory structure: `output\u002Farticle_title\u002Ftitle.md` + `output\u002Farticle_title\u002Fimages\u002F`\n\n## External CLI Integration\n\nIntegrated external tools (passthrough execution):\n\n| Tool | Description |\n|------|------|\n| `gh` | GitHub CLI |\n| `docker` | Docker CLI |\n| `kubectl` | Kubernetes CLI |\n| `obsidian` | Obsidian note management |\n| `readwise` | Readwise reading management |\n| `gws` | Google Workspace CLI |\n\n```bash\n# Passthrough to GitHub CLI\nautocli gh repo list\n\n# Passthrough to kubectl\nautocli kubectl get pods\n```\n\n## Output Formats\n\nSwitch output format via the `--format` global flag:\n\n```bash\nautocli hackernews top --format table    # ASCII table (default)\nautocli hackernews top --format json     # JSON\nautocli hackernews top --format yaml     # YAML\nautocli hackernews top --format csv      # CSV\nautocli hackernews top --format md       # Markdown table\n```\n\n## Authentication Strategies\n\nEach command uses a different authentication strategy:\n\n| Strategy | Description | Requires Browser |\n|------|------|--------------|\n| `public` | Public API, no authentication needed | No |\n| `cookie` | Requires browser Cookie | Yes |\n| `header` | Requires specific request headers | Yes |\n| `intercept` | Requires network request interception | Yes |\n| `ui` | Requires UI interaction | Yes |\n\n## Custom Adapters\n\nAdd custom adapters by creating YAML files under `~\u002F.autocli\u002Fadapters\u002F`:\n\n```yaml\n# ~\u002F.autocli\u002Fadapters\u002Fmysite\u002Fhot.yaml\nsite: mysite\nname: hot\ndescription: My site hot posts\nstrategy: public\nbrowser: false\n\nargs:\n  limit:\n    type: int\n    default: 20\n    description: Number of items\n\ncolumns: [rank, title, score]\n\npipeline:\n  - fetch: https:\u002F\u002Fapi.mysite.com\u002Fhot\n  - select: data.posts\n  - map:\n      rank: \"${{ index + 1 }}\"\n      title: \"${{ item.title }}\"\n      score: \"${{ item.score }}\"\n  - limit: \"${{ args.limit }}\"\n```\n\n### Pipeline Steps\n\n| Step | Function | Example |\n|------|------|------|\n| `fetch` | HTTP request | `fetch: https:\u002F\u002Fapi.example.com\u002Fdata` |\n| `evaluate` | Execute JS in browser | `evaluate: \"document.title\"` |\n| `navigate` | Page navigation | `navigate: https:\u002F\u002Fexample.com` |\n| `click` | Click element | `click: \"#button\"` |\n| `type` | Type text | `type: { selector: \"#input\", text: \"hello\" }` |\n| `wait` | Wait | `wait: 2000` |\n| `select` | Select nested data | `select: data.items` |\n| `map` | Data mapping | `map: { title: \"${{ item.title }}\" }` |\n| `filter` | Data filtering | `filter: \"item.score > 10\"` |\n| `sort` | Sort | `sort: { by: score, order: desc }` |\n| `limit` | Truncate | `limit: \"${{ args.limit }}\"` |\n| `intercept` | Network interception | `intercept: { pattern: \"*\u002Fapi\u002F*\" }` |\n| `tap` | State management bridge | `tap: { action: \"store.fetch\", url: \"*\u002Fapi\u002F*\" }` |\n| `download` | Download | `download: { type: media }` |\n\n### Template Expressions\n\nPipelines use the `${{ expression }}` syntax:\n\n```yaml\n# Variable access\n\"${{ args.limit }}\"\n\"${{ item.title }}\"\n\"${{ index + 1 }}\"\n\n# Comparison and logic\n\"${{ item.score > 10 }}\"\n\"${{ item.title && !item.deleted }}\"\n\n# Ternary expressions\n\"${{ item.active ? 'yes' : 'no' }}\"\n\n# Pipe filters\n\"${{ item.title | truncate(30) }}\"\n\"${{ item.tags | join(', ') }}\"\n\"${{ item.name | lower | trim }}\"\n\n# String interpolation\n\"https:\u002F\u002Fapi.com\u002F${{ item.id }}.json\"\n\n# Fallback\n\"${{ item.subtitle || 'N\u002FA' }}\"\n\n# Math functions\n\"${{ Math.min(args.limit, 50) }}\"\n```\n\n**Built-in filters (16):** `default`, `join`, `upper`, `lower`, `trim`, `truncate`, `replace`, `keys`, `length`, `first`, `last`, `json`, `slugify`, `sanitize`, `ext`, `basename`\n\n## Configuration\n\n### Environment Variables\n\n| Variable | Default | Description |\n|------|--------|------|\n| `OPENCLI_VERBOSE` | - | Enable verbose output |\n| `OPENCLI_DAEMON_PORT` | `19825` | Daemon port |\n| `OPENCLI_CDP_ENDPOINT` | - | CDP direct endpoint (bypasses Daemon) |\n| `OPENCLI_BROWSER_COMMAND_TIMEOUT` | `60` | Command timeout (seconds) |\n| `OPENCLI_BROWSER_CONNECT_TIMEOUT` | `30` | Browser connection timeout (seconds) |\n| `OPENCLI_BROWSER_EXPLORE_TIMEOUT` | `120` | Explore timeout (seconds) |\n\n### File Paths\n\n| Path | Description |\n|------|------|\n| `~\u002F.autocli\u002Fadapters\u002F` | User custom adapters |\n| `~\u002F.autocli\u002Fplugins\u002F` | User plugins |\n| `~\u002F.autocli\u002Fexternal-clis.yaml` | User external CLI registry |\n\n## Architecture\n\n```\n┌─────────────────────────────────────────────────────────────────┐\n│                       User \u002F AI Agent                           │\n│                     autocli \u003Csite> \u003Ccommand>                  │\n└─────────────────────┬───────────────────────────────────────────┘\n                      │\n                      ▼\n┌─────────────────────────────────────────────────────────────────┐\n│                      CLI Layer (clap)                            │\n│  main.rs → discovery → clap dynamic subcommands → execution.rs  │\n│  ┌───────────┐  ┌───────────────┐  ┌──────────────────┐        │\n│  │ Built-in   │  │ Site adapter  │  │ External CLI     │        │\n│  │ commands   │  │ commands      │  │ passthrough      │        │\n│  │ explore    │  │ bilibili hot  │  │ gh, docker, k8s  │        │\n│  │ doctor     │  │ twitter feed  │  │                  │        │\n│  └───────────┘  └───────┬───────┘  └──────────────────┘        │\n└─────────────────────────┼───────────────────────────────────────┘\n                          │\n                          ▼\n┌─────────────────────────────────────────────────────────────────┐\n│                   Execution Engine (execution.rs)                │\n│             Arg validation → Capability routing → Timeout ctrl  │\n│                    ┌─────────┼─────────┐                        │\n│                    ▼         ▼         ▼                        │\n│              YAML Pipeline  Rust Func  External CLI              │\n└────────────────┬────────────────────────────────────────────────┘\n                 │\n                 ▼\n┌──────────────────────────────────────────────────────────────────┐\n│  Pipeline Engine                    Browser Bridge                │\n│  ┌────────────┐                      ┌─────────────────────┐    │\n│  │ fetch      │                      │ BrowserBridge       │    │\n│  │ evaluate   │  ──── IPage ────▶    │ DaemonClient (HTTP) │    │\n│  │ navigate   │                      │ CdpPage (WebSocket) │    │\n│  │ map\u002Ffilter │                      └──────────┬──────────┘    │\n│  │ sort\u002Flimit │                                 │               │\n│  │ intercept  │                      Daemon (axum:19825)        │\n│  │ tap        │                        HTTP + WebSocket          │\n│  └────────────┘                                 │               │\n│                                                 ▼               │\n│  Expression Engine (pest)            Chrome Extension (CDP)      │\n│  ${{ expr | filter }}                chrome.debugger API         │\n└──────────────────────────────────────────────────────────────────┘\n```\n\n### Workspace Structure\n\n```\nautocli\u002F\n├── crates\u002F\n│   ├── autocli-core\u002F        # Core data models: Strategy, CliCommand, Registry, IPage trait, Error\n│   ├── autocli-pipeline\u002F    # Pipeline engine: pest expressions, executor, 14 step types\n│   ├── autocli-browser\u002F     # Browser bridge: Daemon, DaemonPage, CdpPage, DOM helpers\n│   ├── autocli-output\u002F      # Output rendering: table, json, yaml, csv, markdown\n│   ├── autocli-discovery\u002F   # Adapter discovery: YAML parsing, build.rs compile-time embedding\n│   ├── autocli-external\u002F    # External CLI: loading, detection, passthrough execution\n│   ├── autocli-ai\u002F          # AI capabilities: explore, synthesize, cascade, generate\n│   └── autocli-cli\u002F         # CLI entry point: clap, execution orchestration, doctor, completion\n├── adapters\u002F                   # 333 YAML adapter definitions\n│   ├── hackernews\u002F\n│   ├── bilibili\u002F\n│   ├── twitter\u002F\n│   └── ...(55 sites)\n└── resources\u002F\n    └── external-clis.yaml      # External CLI registry\n```\n\n### Improvements over the TypeScript Original\n\n| Improvement | Original (TypeScript) | autocli (Rust) |\n|--------|-------------------|-------------------|\n| Distribution | Node.js + npm install (~100MB) | Single binary (4.1MB) |\n| Startup speed | Read manifest JSON → parse → register | Compile-time embedding, zero file I\u002FO |\n| Template engine | JS eval (security risk) | pest PEG parser (type-safe) |\n| Concurrent fetch | Non-browser mode pool=5 | FuturesUnordered, concurrency=10 |\n| Error system | Single hint string | Structured error chain + multiple suggestions |\n| HTTP connections | New fetch each time | reqwest connection pool reuse |\n| Memory safety | GC | Ownership system, zero GC pauses |\n\n## Development\n\n```bash\n# Build\ncargo build\n\n# Test (166 tests)\ncargo test --workspace\n\n# Release build (with LTO, ~4MB)\ncargo build --release\n\n# Add a new adapter\n# 1. Create a YAML file under adapters\u002F\u003Csite>\u002F\n# 2. Recompile (build.rs auto-embeds)\ncargo build\n```\n\n## Supported Sites\n\n\u003Cdetails>\n\u003Csummary>Click to expand all 55 sites\u003C\u002Fsummary>\n\n| Site | Commands | Strategy |\n|------|--------|------|\n| hackernews | 8 | public |\n| bilibili | 12 | cookie |\n| twitter | 24 | cookie\u002Fintercept |\n| reddit | 15 | public\u002Fcookie |\n| zhihu | 2 | cookie |\n| xiaohongshu | 11 | cookie |\n| douban | 7 | cookie |\n| weibo | 2 | cookie |\n| v2ex | 11 | public\u002Fcookie |\n| bloomberg | 10 | cookie |\n| youtube | 4 | cookie |\n| wikipedia | 4 | public |\n| google | 4 | public\u002Fcookie |\n| facebook | 10 | cookie |\n| instagram | 14 | cookie |\n| tiktok | 15 | cookie |\n| notion | 8 | ui |\n| cursor | 12 | ui |\n| chatgpt | 6 | public |\n| stackoverflow | 4 | public |\n| devto | 3 | public |\n| lobsters | 4 | public |\n| medium | 3 | cookie |\n| substack | 3 | cookie |\n| weread | 7 | cookie |\n| xueqiu | 7 | cookie |\n| boss | 14 | cookie |\n| jike | 10 | cookie |\n| Other 27 sites | ... | ... |\n\n\u003C\u002Fdetails>\n\n## Star History\n\n\u003Ca href=\"https:\u002F\u002Fwww.star-history.com\u002F?repos=nashsu%2Fautocli&type=date&legend=top-left\">\n \u003Cpicture>\n   \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"https:\u002F\u002Fapi.star-history.com\u002Fimage?repos=nashsu\u002Fautocli&type=date&theme=dark&legend=top-left\" \u002F>\n   \u003Csource media=\"(prefers-color-scheme: light)\" srcset=\"https:\u002F\u002Fapi.star-history.com\u002Fimage?repos=nashsu\u002Fautocli&type=date&legend=top-left\" \u002F>\n   \u003Cimg alt=\"Star History Chart\" src=\"https:\u002F\u002Fapi.star-history.com\u002Fimage?repos=nashsu\u002Fautocli&type=date&legend=top-left\" \u002F>\n \u003C\u002Fpicture>\n\u003C\u002Fa>\n\n## Acknowledgements\n\nThis project is built on top of [OpenCLI](https:\u002F\u002Fgithub.com\u002Fjackwener\u002Fopencli) by [jackwener](https:\u002F\u002Fgithub.com\u002Fjackwener). We gratefully acknowledge the original work that made this project possible.\n\n## License\n\nApache-2.0\n","AutoCLI 是一个快速且内存安全的命令行工具，能够通过单一命令从任意网站抓取信息。该项目支持包括Twitter\u002FX、Reddit、YouTube、HackerNews、Bilibili、知乎、小红书在内的55多个网站，并集成了对Electron桌面应用及本地CLI工具（如gh、docker、kubectl）的支持。其核心功能还包括基于AI的数据选择器和生成器，以及与AutoCLI.ai云端API的无缝同步。完全用Rust重写后，AutoCLI相比原版在性能上有了显著提升，运行速度提高了12倍，内存占用减少了10倍，且无需任何运行时依赖。适合需要高效获取网络数据的应用场景，特别是对于希望扩展AI代理能力以访问全网信息的开发者而言，AutoCLI是一个理想的选择。",2,"2026-06-11 03:50:20","high_star"]