cli-anything-safari
Skill by HKUDS
Adds a command-line interface for controlling the native Safari browser on macOS. It wraps the safari-mcp MCP server and exposes all 84 of its tools, for agents that do not speak MCP and for shell scripts.
Install cli-anything-safari
Built from the published package, never by AI.
git clone --depth 1 https://github.com/HKUDS/CLI-Anything /tmp/CLI-Anything && mkdir -p ~/.claude/skills && cp -r /tmp/CLI-Anything/skills/cli-anything-safari ~/.claude/skills/cli-anything-safariRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/HKUDS/CLI-Anything /tmp/CLI-Anything && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/CLI-Anything/skills/cli-anything-safari ~/.gemini/antigravity-cli/skills/cli-anything-safariAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install cli-anything-safari in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
cli-anything-safari is a Python Click command-line interface for Safari browser automation on macOS. It wraps the safari-mcp Node.js MCP server, which controls the native Safari app and keeps existing logins. According to the source, every one of the 84 safari-mcp tools is generated from the server's bundled tool schema and exposed with the same argument names and types.
Each command starts a fresh safari-mcp subprocess, so there is some per-call overhead. The source recommends using safari-mcp directly over MCP stdio for agents that already speak MCP. The CLI is aimed at agent frameworks without MCP support, bash scripts, CI/CD jobs, and interactive debugging from Terminal. It offers a --json flag for machine-readable output.
Written from the project's SKILL.md and checked against it.
What it can do
- safari_navigateOpens a URL in Safari, with URL scheme validation applied before the call.
- snapshotReturns structured page text with ref IDs, which the source prefers over screenshots.
- safari_clickClicks an element by ref, CSS selector, or visible text.
- safari_fill_formFills several fields at once from an array of selector and value objects.
- safari_scrollScrolls the page by direction and amount.
- safari_evaluateRuns a JavaScript snippet in the page through the --script argument.
- screenshotReturns a base64 JPEG of the page, which the caller decodes.
- save-pdfSaves the current page as a PDF file at a given path.
- start-network-captureStarts recording network activity, read later with the network command.
- get-cookiesReads cookies for the current page and can set individual cookies.
What you need
- macOS
- Safari, already installed
- Node.js 18 or newer
- Python 3.10 or newer
- Safari setting: Develop > Allow JavaScript from Apple Events
Try asking
- Open example.com in Safari and take a snapshot of the page
- Fill in the login form on this page and click Log in
- Save the current Safari page as a PDF to /tmp/page.pdf
Good to know
- macOS only, because Safari MCP is macOS-only.
- No daemon mode. Running two CLI instances at once can make one kill the other's backend.
- Snapshot refs expire on the next snapshot, so click soon after taking one.
- Tools that modify a tab are blocked on tabs the session did not open. Start with new-tab.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/cli-anything-safari/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md13 KB
Alternatives to cli-anything-safari
All alternatives →Antigravity Workflows guides an assistant through multi-skill workflows for shipping a SaaS MVP, auditing web app security, building AI agents, running browser QA, and designing a domain model. It is for users who want several skills combined with verified checkpoints.
Guides building end-to-end test suites with Playwright and Cypress. It is for developers who write E2E tests, debug flaky tests, or set testing standards.
Upgrades Chrome or Firefox versions in the Flutter Web Engine and Framework tests. It verifies the version, updates config files, syncs CI builder JSON and runs local tests before the CIPD upload.
Builds reliable browser checks for real web workflows using semantic locators, bounded waits, isolated test data and explicit outcome checks. It is for developers and testers writing or debugging browser tests.
Diagnoses memory leaks in the Qwen Code CLI using heap snapshots and the chrome-devtools CLI. Built for developers investigating high memory use, unbounded growth, or object retention.
Guides an assistant through using Claude in Chrome, a browser extension whose tools act in the person's real Chrome with their own sign-ins. It is for users who want the assistant to work in their browser safely.
Compare with antigravity-workflows, e2e-testing-patterns or upgrade-browser
cli-anything-safari: common questions
Does this CLI keep my Safari logins?
The source says it controls real Safari, which keeps logins. It does not describe any separate browser profile.
When should I use the CLI instead of safari-mcp directly?
The source says to use the CLI when your agent does not speak MCP, when you script from bash, or when you run CI/CD. Agents that speak MCP natively should use safari-mcp directly, since that is faster.
Does the CLI keep state between commands?
No. The source says there is no persistent session, and each invocation starts with fresh state apart from in-memory values used for REPL display.
How do I install cli-anything-safari?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is cli-anything-safari free?
The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.
Is cli-anything-safari safe to use?
It scores 91 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to cli-anything-safari?
Similar skills: antigravity-workflows, e2e-testing-patterns, upgrade-browser, browser-automation.
