cli-anything-safari
하는 일
이 스킬은 AI 에이전트가 Mac의 Safari를 직접 조작하도록 합니다. 평소 쓰는 브라우저와 본인의 로그인 상태를 그대로 쓰면서 반복되는 웹 작업을 자동으로 처리하고 싶은 사람에게 맞습니다.
사용하는 경우
- ✓에이전트가 웹사이트를 열고 페이지에 있는 내용을 읽기를 원할 때.
- ✓Safari에서 반복되는 탐색 작업을 스크립트로 자동화해야 할 때.
- ✓이미 로그인해 둔 사이트를 에이전트가 이용하기를 원할 때.
스킬 링크
https://github.com/HKUDS/CLI-Anything/blob/main/safari/agent-harness/cli_anything/safari/skills/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“에이전트가 Safari에서 우리 회사 대시보드를 열고 가장 최근 보고서 세 개를 나열하게 해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트가 Mac에 있는 safari-mcp 서버에 명령을 보냅니다. 이 서버는 Apple의 자동화 설정을 통해 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
- macOS — Safari MCP is macOS-only.
- Safari — already installed on macOS.
- Node.js 18+ —
brew install nodeor from https://nodejs.org/ - Python 3.10+
- 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의 개발 메뉴에서 Allow JavaScript from Apple Events 설정을 켜야 합니다.
Windows에서도 되나요?
아닙니다. Safari와 그 자동화 도구는 Mac에서만 실행되므로 이 스킬은 macOS 전용입니다.
로그인 상태가 유지되나요?
네. 실제 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
- 업데이트
- 2026. 9. 21.
댓글
- …
이 저장소의 다른 스킬
cli-anything-3mf
58k에이전트가 3D 프린팅 파일을 검사하고 고치도록 돕습니다. 둥근 구멍 찾기, 크기 조정, 메시 수리, 두 파일 비교가 가능합니다.
cli-anything-qgis
58k에이전트가 터미널에서 QGIS 지도 프로젝트를 열고 편집하고 내보내도록 돕습니다. 레이어, 피처, 인쇄 레이아웃, 처리 도구를 포함합니다.
cli-anything-adguardhome
58k에이전트가 네트워크 전체의 광고 차단기인 AdGuard Home을 관리하도록 돕습니다. 필터, DNS 재작성, 클라이언트, 쿼리 로그를 포함합니다.
cli-anything-anygen
58k에이전트가 AnyGen 서비스를 이용해 글로 된 프롬프트로 슬라이드, 문서, 웹사이트, 다이어그램을 만들도록 돕습니다.
비슷한 스킬
test-driven-development
311k에이전트가 기능이나 수정을 만들기 전에 실패하는 테스트를 먼저 쓰고, 그것을 통과시키는 가장 작은 코드를 작성하도록 가르칩니다.
verification-before-completion
311k에이전트가 작업, 수정, 빌드가 완료되었거나 통과했다고 말하기 전에 실제 점검을 실행하고 결과를 읽도록 가르칩니다.
migrate-to-shoehorn
310k테스트 파일의 위험한 타입 캐스팅을 shoehorn 라이브러리로 바꿔, 테스트가 일부 데이터만 써도 타입 검사를 통과하도록 돕습니다.