मुख्य सामग्री पर जाएँ
Skillpedia
टेस्टिंग58k · #3243

cli-anything-safari

यह क्या करती है

यह स्किल AI एजेंट को Mac पर Safari चलाने देती है, उसी ब्राउज़र में जिसे आप पहले से इस्तेमाल करते हैं और अपने साइन-इन के साथ। यह उन लोगों के लिए है जो रोज़ के वेब काम अपने-आप करवाना चाहते हैं।

कब इस्तेमाल करें

  • ✓जब आप चाहते हैं कि एजेंट कोई वेबसाइट खोले और पेज पर जो लिखा है उसे पढ़े।
  • ✓जब आपको Safari में दोहराया जाने वाला ब्राउज़िंग काम स्क्रिप्ट से अपने-आप करना है।
  • ✓जब आप चाहते हैं कि एजेंट किसी ऐसी साइट पर काम करे जहाँ आप पहले से लॉगिन हैं।

Skill का लिंक

https://github.com/HKUDS/CLI-Anything/blob/main/safari/agent-harness/cli_anything/safari/skills/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/HKUDS/CLI-Anything/blob/main/safari/agent-harness/cli_anything/safari/skills/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“हमारा कंपनी डैशबोर्ड Safari में खोलिए और सबसे नई तीन रिपोर्ट की सूची दिखाइए।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

एजेंट आपके Mac पर safari-mcp सर्वर को कमांड भेजता है, जो Apple की automation सेटिंग्स से Safari नियंत्रित करता है। हर कमांड एक ब्राउज़र क्रिया करता है और नतीजा लौटाता है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

cli-anything-safari

A command-line interface for Safari browser automation on macOS. Wraps the safari-mcp Node.js MCP server in a Python Click CLI.

Feature parity is guaranteed. Every Click command is generated automatically from safari-mcp's tool schema (bundled as resources/tools.json). All 84 tools are reachable with the exact argument names and types the MCP server expects.

When to use this CLI

Each CLI invocation spawns a fresh subprocess, so there is per-call overhead. If your agent speaks MCP natively (Claude Code, Cursor, Cline, etc.), using safari-mcp directly over MCP stdio will be faster.

Use this CLI when:

  • Your agent framework does not speak MCP (Codex CLI, GitHub Copilot CLI, custom scripts, older agent frameworks).
  • You need to script browser automation from bash — cli-anything-safari --json tool snapshot | jq '...'.
  • You run in CI/CD and want cron-able, subprocess-friendly output.
  • You're debugging interactively from Terminal.

Installation

Prerequisites

  1. macOS — Safari MCP is macOS-only.
  2. Safari — already installed on macOS.
  3. Node.js 18+ — brew install node or from https://nodejs.org/
  4. Python 3.10+
  5. Enable Apple Events for Safari: Safari → Develop → Allow JavaScript from Apple Events

Install the CLI

cd safari/agent-harness
pip install -e .

The first tool call will download the safari-mcp npm package (one-time, a few MB).

Command Structure

The CLI has 5 top-level commands:

Command Purpose
tool Call any of safari-mcp's 84 tools (dynamic, schema-driven)
tools Inspect the bundled tool registry (list, describe, count)
raw Escape hatch — call a tool by full name with raw JSON args
session In-memory session state (last URL, current tab)
repl Interactive REPL (default when no subcommand given)

Usage Examples

Discover the tool surface

# Count of tools (sanity check — must match safari-mcp's registered tools)
cli-anything-safari tools count
# → 84

# List every tool
cli-anything-safari tools list
cli-anything-safari tools list --filter click   # filter by substring

# Full schema for one tool (JSON or human format)
cli-anything-safari tools describe safari_scroll
cli-anything-safari --json tools describe safari_click

Call a tool (schema-driven)

# Navigate
cli-anything-safari tool navigate --url https://example.com

# Take a snapshot (preferred over screenshot — structured text with ref IDs)
cli-anything-safari --json tool snapshot

# Click by ref (refs come from snapshot; they expire on the next snapshot!)
cli-anything-safari tool click --ref 0_5

# Click by selector or visible text
cli-anything-safari tool click --selector "#submit"
cli-anything-safari tool click --text "Log in"

# Fill a field
cli-anything-safari tool fill --selector "#email" --value "user@example.com"

# Scroll by direction/amount (NOT x/y — note the schema!)
cli-anything-safari tool scroll --direction down --amount 500

# Drag one element onto another
cli-anything-safari tool drag \
    --source-selector ".card" \
    --target-selector ".trash"

# Screenshot — returns base64 JPEG in stdout. Decode with:
cli-anything-safari --json tool screenshot --full-page \
    | python3 -c "import sys,json,base64; \
        d=json.load(sys.stdin); \
        open('/tmp/shot.jpg','wb').write(base64.b64decode(d['data']))"

# Save as PDF (this one writes to disk directly)
cli-anything-safari tool save-pdf --path /tmp/page.pdf

# Evaluate JavaScript (note: parameter is --script, not --code)
cli-anything-safari tool evaluate --script "document.title"

Navigate and read in one round-trip

cli-anything-safari --json tool navigate-and-read --url https://example.com

Form fill (bulk)

safari_fill_form takes an array of {selector, value} objects. Pass it as a JSON string:

cli-anything-safari tool fill-form --fields '[
  {"selector": "#email",    "value": "user@example.com"},
  {"selector": "#password", "value": "hunter2"}
]'

Run cli-anything-safari tools describe safari_fill_form to see the exact schema, including any new fields safari-mcp adds upstream.

Net

अक्सर पूछे जाने वाले सवाल

पहले क्या सेट करना होगा?

आपको Node.js 18 या उसका नया वर्ज़न चाहिए, और Safari के Develop मेनू में Allow JavaScript from Apple Events सेटिंग चालू होनी चाहिए।

क्या यह Windows पर काम करता है?

नहीं। यह स्किल सिर्फ़ macOS के लिए है, क्योंकि Safari और उसके automation टूल केवल Mac पर चलते हैं।

क्या मेरे लॉगिन बने रहेंगे?

हाँ। यह आपका असली Safari नियंत्रित करती है, इसलिए जिन साइटों पर आप लॉगिन हैं, वे लॉगिन रहती हैं।

जानकारी

लेखक का मूल विवरण

Safari browser automation CLI on macOS via safari-mcp. Controls real Safari (native, keeps logins) by wrapping the safari-mcp MCP server. Every one of the 84 MCP tools is exposed 1:1 with schema-accurate arguments — guaranteed parity, no manual drift.

repo: HKUDS/CLI-Anything

लोकप्रियता

GitHub स्टार
58k
रैंकिंग में स्थान
#3243
लाइसेंस
Apache-2.0
अपडेट की गई
21/9/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

cli-anything-3mf

58k

यह आपके एजेंट को 3D प्रिंटिंग फ़ाइलों का निरीक्षण और सुधार करने देती है, जिसमें गोल छेद खोजना, उनका आकार बदलना, मेश ठीक करना और दो फ़ाइलों की तुलना शामिल है।

डिज़ाइनइमेज और आइकन

cli-anything-qgis

58k

यह आपके एजेंट को टर्मिनल से QGIS मैप प्रोजेक्ट खोलने, संपादित करने और निर्यात करने देती है, जिसमें लेयर, फ़ीचर, प्रिंट लेआउट और प्रोसेसिंग टूल शामिल हैं।

डेटाएनालिसिस और स्प्रेडशीट

cli-anything-adguardhome

58k

यह आपके एजेंट को AdGuard Home, एक नेटवर्क-व्यापी ऐड ब्लॉकर, प्रबंधित करने देती है, जिसमें फ़िल्टर, DNS rewrites, क्लाइंट और क्वेरी लॉग शामिल हैं।

कोडिंगडिप्लॉय और क्लाउड (DevOps)

cli-anything-anygen

58k

यह आपके एजेंट को लिखे गए प्रॉम्प्ट से AnyGen सेवा का उपयोग करके स्लाइड, दस्तावेज़, वेबसाइट और आरेख बनवाने देती है।

लेखन और डॉक्यूमेंटPDF, Word और स्लाइड

मिलती-जुलती skills