Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

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.

  • Score 91
  • 66k stars
  • Apache-2.0
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

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-safari

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install cli-anything-safari in Claude Code

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

A

No 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 →

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.

cli-anything-safari Install

Add to stack

Loading.