Logo Zenrows CLI

Zenrows CLI

Tổ chức
ZenRows

Zero-config CLI that gives AI agents reliable access to protected web data through Zenrows — Fetch, Extract, Batch, and Browser Sessions, plus MCP setup and agent skills. No API key needed to start.

Nhà phát hànhZenRows
Kho mãcli
Ngôn ngữTypeScript
Bản fork
2
Sao
15
Công cụ có sẵn
0
Phương thức truyền tảistdio
Danh mục
Giấy phépMIT
Liên kết
  • Kết nối công cụ với quy trình làm việc AI

    Zenrows CLI cung cấp các khả năng MCP mà ứng dụng khách và tác nhân AI tương thích có thể sử dụng.

  • 0 công cụ có sẵn

    Xem các thao tác có thể gọi bên dưới, kèm tên và mô tả nếu máy chủ cung cấp.

  • Cấu hình sẵn để sao chép

    Dùng các đoạn cấu hình cài đặt mẫu để thiết lập máy chủ này trong ứng dụng khách MCP bạn muốn dùng.

  • Chỉ số quan tâm đến mã nguồn mở

    15 sao và 2 bản fork từ kho mã được liên kết.

Zenrows CLI

Zenrows CLI is the open-source command-line, MCP, skills, templates, workflows, recipes, and evals layer for giving AI agents reliable access to protected web data through Zenrows cloud infrastructure.

It makes the four Zenrows primitives — Fetch, Extract, Batch, and Browser Sessions — installable and usable directly from AI agents and developer workflows — so an agent can reliably access protected web data without hand-rolling anti-bot handling, proxies, or browser rendering.


1. What this is

A single, dependency-light CLI (zenrows) plus an installable asset registry (skills, templates, workflows, recipes, evals) and MCP configuration for popular agent clients. It makes Zenrows installable, usable, testable, and distributable through AI agents, developers, and teams.

2. Why Zenrows

Normal fetch fails. Generic scrapers fail. Browser-first tools are expensive. Zenrows Fetch retrieves protected pages reliably and Extract structures them, while Browser Sessions are there for the rare cases that need a real browser. Zenrows wins when the workflow runs over thousands or millions of URLs.

3. Product architecture

The core product is Zenrows Fetch and Extract (GET https://api.zenrows.com/v1/). The CLI exposes it two ways: zenrows fetch retrieves a protected page, and zenrows extract turns it into structured data (JSON / CSS / Markdown). Both call the same endpoint — extract is just that endpoint with extraction parameters, not a separate product.

CommandWhat it doesStatus (this build)
zenrows fetchFetch — retrieve a protected pageavailable — GET https://api.zenrows.com/v1/
zenrows extractExtract — extract=auto (domain-gated open beta; falls back to Autoparse) / CSS / Markdownbeta — same /v1/
zenrows batchBatch — fan out over many URLsbeta — cloud works with beta access; local validate/estimate always
zenrows browserBrowser Sessions REST API (same backend as MCP browser_*)available — escalation-only; bills by bandwidth + time
zenrows mcpMCP server config (remote + local)available
Zenrows CLIthis repoavailable

The CLI maintains a capability matrix (registry/capabilities.json). Every command checks status before any cloud call, so the toolkit never fakes behavior for primitives the backend does not expose. Run zenrows status for the live matrix.

4. Quickstart

bash
npm install -g @zenrows/cli # puts `zenrows` on PATH (466 ms, zero deps)
zenrows init
zenrows fetch https://httpbin.io/html # auto-provisions a Free plan account on first use
zenrows extract https://www.owler.com/company/meltwater # extract=auto on an enabled domain
zenrows extract https://www.scrapingcourse.com/ecommerce/ --autoparse # Autoparse (any domain)

Prefer no global install? Prefix each command with npx -y @zenrows/cli (e.g. npx -y @zenrows/cli fetch <url>) — npx does not put zenrows on PATH.

No API key up front: on your first cloud call the toolkit creates a free, unclaimed Zenrows Free plan account for you (see §6).

5. Install everything

bash
zenrows init --all # workspace + config + policy + assets + MCP snippets + health check
zenrows init --agents claude-code,codex,cursor,gemini,opencode,windsurf,vscode

If a requested target cannot be auto-configured, the toolkit prints explicit manual instructions rather than silently skipping it.

6. Zero-config access, signup & claim

You do not need an API key to get started. On your first cloud call (e.g. zenrows fetch <url>), the toolkit automatically creates a free, unclaimed Zenrows Free plan account, stores the key in .zenrows/secrets.json (0600, gitignored), and records the account in .zenrows/account.json (no secret — just the accountId, Free-period info, and a claim link).

When you (or your agent) want to keep the usage and history, claim the account — this sets an email + password; the same key keeps working:

bash
zenrows account status # show account + Free period + claim link
zenrows account claim  # open the claim URL in the browser
zenrows usage          # plan usage, credits & concurrency (does not count against your limit)

Opt out of auto-provisioning at any time:

bash
zenrows fetch <url> --no-signup # do not auto-create an account for this call
zenrows signup --agent          # explicitly provision a Free plan account, headless
zenrows login --api-key <key>   # use an existing key (stored 0600, gitignored)
zenrows login --env             # use the ZENROWS_API_KEY environment variable

Set auto_signup: false in .zenrows/policy.json to disable auto-provisioning globally.

7. Protected Fetch

bash
zenrows fetch <url> # Adaptive Stealth Mode (mode=auto)
zenrows fetch <url> --output markdown
zenrows fetch <url> --manual --js-render --premium-proxy
zenrows fetch <url> --proxy-country us --wait-for ".price"

8. Extract

bash
zenrows extract https://www.owler.com/company/meltwater                # extract=auto (enabled domain)
zenrows extract https://www.scrapingcourse.com/ecommerce/ --autoparse   # Autoparse (any domain)
zenrows extract <url> --css '{"title":"h1","price":".price"}' --validate
zenrows extract <url> --outputs emails,links                            # built-in output filters → JSON
zenrows extract <url> --output markdown

9. Batch (beta)

Zenrows Batch (https://async.api.zenrows.com/v1) fans a protected fetch/extract out over many URLs. It is a real product in beta: the cloud subcommands work once your API key has beta access; without it the API returns BATCH_ACCESS_DENIED. Local spec validation + credit estimation always work (no key needed).

bash
zenrows batch estimate jobs.jsonl                    # validate the spec + estimate credits (local)
zenrows batch create jobs.jsonl --wait               # submit a job and wait for it to finish
zenrows batch status <job-id>                        # run status + progress stats
zenrows batch results <job-id> --out results.jsonl   # collect results (paginated)
zenrows batch cancel <job-id>                        # stop an in-flight run

jobs.jsonl is one JSON object per line, each with a url (plus optional per-line overrides like js_render, premium_proxy, proxy_country, extract). Request beta access from Zenrows to run in the cloud; until then, validate/estimate locally or fan out with zenrows fetch per URL.

Extract in Batch. Set "extract": "auto" on a line to run that URL through Extract — structured data instead of raw HTML:

jsonl
{"url": "https://example.com/products", "extract": "auto", "external_id": "p1"}
{"url": "https://example.com/reviews", "extract": "auto", "external_id": "r1"}

An Extract task costs the same as a regular one (1 credit at base tier), so batch estimate prices it correctly. Results for an Extract task carry two keys: html (the raw page) and parsed (the structured data) — validate a sample with zenrows extract <url> before running the full batch.

10. Browser Sessions

Escalation only — prefer fetch/extract for the vast majority of cases; they cost less. Use the browser for logins, forms, and multi-step JS flows that Protected Fetch can't handle. Drives the managed Browser Sessions REST API (mcp.zenrows.com/browser/sessions/*, same backend as the @zenrows/mcp browser_* tools). zenrows browser connect prints the raw CDP wss URL for bring-your-own Playwright/Puppeteer.

Billing & lifecycle: sessions bill by bandwidth + session time and auto-terminate after 15 minutes — run <script.json> closes automatically; close interactive sessions with zenrows browser close. On by default; opt out with zenrows policy set allow_browser false.

11. MCP

bash
zenrows mcp status
zenrows mcp config --client claude-code      # exact `claude mcp add` command
zenrows mcp config --client cursor           # mcpServers JSON
zenrows mcp config --client vscode           # servers JSON
zenrows mcp config --client generic --remote # hosted server at https://mcp.zenrows.com/mcp

Local server: npx -y @zenrows/mcp (stdio; can auto-provision a Free plan key). Remote server: https://mcp.zenrows.com/mcp (streamable-http; client OAuth).

The portable Agent Plugins package at agent-plugin/ declares both servers in mcp.json (no secrets) and ships MCP-native skills under agent-plugin/skills/. It is included in the published @zenrows/cli npm tarball (node_modules/@zenrows/cli/agent-plugin).

12. Plugins

bash
zenrows plugin list
zenrows plugin install claude-code # installs core skills + prints MCP config

Agent Plugins 1.0: after npm install @zenrows/cli, use node_modules/@zenrows/cli/agent-plugin/ (plugin.json + mcp.json + MCP-native skills). See agent-plugin/README.md. Legacy per-client snippets from zenrows plugin install remain available. CLI-oriented skills stay under repo-root skills/.

13. Skills

Agent-readable playbooks that teach agents how to choose primitives.

bash
zenrows skill list
zenrows skill install --all
zenrows skill validate zenrows

The master skill skills/zenrows/SKILL.md teaches the full decision tree.

14. Templates

bash
zenrows template list
zenrows template create protected-fetch-node --output ./my-project

15. Workflows

bash
zenrows workflow list
zenrows workflow explain competitor-intelligence

16. Recipes

bash
zenrows recipe list
zenrows recipe run fetch-protected-page

17. Evals

Reproducible, transparent benchmarks. No competitor keys are bundled and nothing is hardcoded to make Zenrows win — comparison evals require you to supply your own credentials.

bash
zenrows eval list
zenrows eval run protected-fetch-smoke
zenrows eval report protected-fetch-smoke

Reports write input.json, results.json, report.md, failures.jsonl, cost.json, and traces/ under .zenrows/evals/<run-id>/.

18. Security

  • API keys are never printed or written into run artifacts/assets.
  • Secrets live in .zenrows/secrets.json (0600, gitignored); logs are redacted.
  • .zenrows/account.json holds no secret — only the accountId, Free-period info, and claim link.
  • .zenrows/policy.json enforces credit/page/concurrency limits and domain allow/deny.
  • Destructive uninstall requires --yes. Browser is on by default; opt out with zenrows policy set allow_browser false. Experimental features are off by default.

19. Capability matrix

See registry/capabilities.json. zenrows status --json emits it.

20. Contributing

The CLI is TypeScript with zero runtime dependencies (native fetch, node:util parseArgs, node:test). Node 20+ runs the published build; Node 23.6+ runs the TypeScript sources directly for development.


Zenrows is building the protected web data infrastructure layer. The Zenrows CLI is how that infrastructure becomes native to AI agents.

Cài đặt

TypingMind
{
  "mcpServers": {
    "zenrows-cli": {
      "command": "npx",
      "args": [
        "-y",
        "@zenrows/cli",
        "{{config.COMMAND}}",
        "{{config.ARGS}}"
      ],
      "env": {
        "COMMAND": "<COMMAND>"
      }
    }
  }
}

Dùng MCP Zenrows CLI với nhiều mô hình AI

TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên sau khi kết nối Zenrows CLI, bạn có thể dùng với nhiều mô hình AI khác nhau trong TypingMind thay vì phải thiết lập riêng cho từng mô hình. MCP này chạy cục bộ thông qua trình kết nối MCP của TypingMind trên thiết bị của bạn.

Hướng dẫn thiết lập để dùng trình kết nối cục bộ

Dùng cách này khi máy chủ MCP cần truy cập các tệp, ứng dụng hoặc tài nguyên riêng tư trên máy tính của bạn.

1

Mở cài đặt MCP

Trong TypingMind, vào Cài đặt, Cài đặt nâng cao, rồi đến Giao thức ngữ cảnh mô hình và chọn Cài trình kết nối.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Nhấp vào biểu tượng Cài đặt.
  3. Vào Cài đặt nâng cao.
  4. Mở mục Giao thức ngữ cảnh mô hình.
  5. Nhấp vào Cài trình kết nối rồi chọn Thiết bị này.
Màn hình thiết lập trình kết nối MCP của TypingMind với tùy chọn Thiết bị này được chọn
2

Chạy lệnh trình kết nối

Chọn Thiết bị này, sao chép lệnh từ TypingMind và chạy trong Terminal. Giữ tiến trình chạy trong khi bạn dùng MCP.

  1. Sao chép lệnh thiết lập hiển thị trong TypingMind.
  2. Mở Terminal trên macOS hoặc Windows Terminal trên Windows.
  3. Dán và chạy lệnh.
  4. Xác nhận cài đặt gói nếu Terminal hỏi bạn có muốn tiếp tục không.
  5. Giữ tiến trình trong cửa sổ Terminal chạy trong khi dùng các công cụ MCP.
3

Thêm Zenrows CLI làm máy chủ

Khi trạng thái trình kết nối là Sẵn sàng, nhấp vào Sửa máy chủ và dán cấu hình máy chủ MCP.

  1. Đợi đến khi trạng thái trình kết nối hiển thị Sẵn sàng.
  2. Nhấp vào Sửa máy chủ.
  3. Dán cấu hình máy chủ MCP của Zenrows CLI.
  4. Lưu danh sách máy chủ.
  5. Làm mới nếu bạn muốn xác nhận trình kết nối vẫn sẵn sàng.
Cài đặt MCP của TypingMind hiển thị máy chủ đang hoạt động và nút Sửa máy chủ
{
  "mcpServers": {
    "zenrows-cli": {
      "command": "npx",
      "args": [
        "-y",
        "@zenrows/cli"
      ]
    }
  }
}
4

Dùng kết nối với nhiều mô hình

Lưu danh sách máy chủ, mở Plugin, bật các công cụ MCP của Zenrows CLI, sau đó chọn bất kỳ mô hình AI nào được hỗ trợ trong TypingMind và dùng các công cụ trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.

  1. Mở trang Plugin trong TypingMind.
  2. Bật các công cụ MCP của Zenrows CLI.
  3. Bắt đầu cuộc trò chuyện và chọn mô hình AI bạn muốn dùng.
  4. Dùng các công cụ MCP trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.
  5. Chuyển sang mô hình AI khác bất cứ khi nào cần mà không phải kết nối lại MCP.
Cuộc trò chuyện TypingMind dùng các công cụ MCP đã bật với một mô hình AI được chọn
Bạn có thể dùng Zenrows CLI giúp tôi làm việc này không?
Zenrows CLI
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng Zenrows CLI.

Câu hỏi thường gặp

Máy chủ MCP Zenrows CLI dùng để làm gì?

Zenrows CLI là máy chủ MCP cho phép các ứng dụng AI tương thích kết nối với công cụ và ngữ cảnh bên ngoài. Trong TypingMind, bạn chỉ cần thêm máy chủ MCP này một lần để các công cụ của nó có sẵn trong không gian làm việc AI của bạn.

Bạn có thể dùng MCP Zenrows CLI với nhiều mô hình AI trong TypingMind không?

Có. TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên bạn có thể dùng Zenrows CLI với nhiều mô hình AI như Claude, ChatGPT, Gemini hoặc các mô hình khác đã cấu hình trong TypingMind mà không cần thiết lập máy chủ MCP riêng cho từng mô hình.

Vì sao nên dùng MCP Zenrows CLI với TypingMind?

TypingMind là một trong những giao diện trò chuyện với LLM tốt nhất vì tập hợp nhiều mô hình AI, prompt, plugin, tác nhân AI, khóa API và công cụ MCP vào một không gian làm việc. Khi kết nối Zenrows CLI, bạn có thể dùng các công cụ MCP của dịch vụ này với những mô hình ưa thích, đồng thời giữ quy trình trò chuyện gọn gàng trong TypingMind.

Làm cách nào để kết nối MCP Zenrows CLI với TypingMind?

Zenrows CLI hoạt động thông qua trình kết nối MCP cục bộ của TypingMind. Đây là lựa chọn phù hợp nhất khi máy chủ MCP cần truy cập tệp cục bộ, ứng dụng máy tính, công cụ dòng lệnh hoặc tài nguyên riêng trên máy tính của bạn.

MCP Zenrows CLI cung cấp những công cụ nào trong TypingMind?

Zenrows CLI cung cấp các chức năng MCP mà bạn có thể bật từ trang Plugin của TypingMind để dùng trong trò chuyện hoặc gán cho tác nhân AI.

Bạn có cần chia sẻ khóa API với TypingMind để dùng MCP Zenrows CLI không?

Không. TypingMind ưu tiên xử lý cục bộ và cho phép bạn kiểm soát nhà cung cấp mô hình, khóa API, prompt và cấu hình MCP. Nếu Zenrows CLI yêu cầu xác thực, hãy thêm các header, cài đặt OAuth hoặc cấu hình cục bộ cần thiết cho máy chủ MCP đó khi tạo kết nối.

Máy chủ MCP liên quan

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇