使用自然语言,随时随地控制您的Mac。
System: Control your Mac from anywhere using natural language

原始链接: https://system.surf/

## 系统:远程 Mac 自动化 SYSTEM 允许您使用自然语言命令远程控制您的 Mac。它采用分割架构以确保安全:一个 **Agent**(由 Cloudflare Workers 和 Claude AI 提供支持)处理智能调度和编排,而一个 **Bridge** 在您的 Mac 上本地运行以执行操作。 **主要特性:** * **自然语言控制:** 发出类似“30 分钟后提醒我给妈妈打电话”或“播放一些爵士乐”的命令。 * **调度:** 创建一次性或重复任务。 * **强大的工具集:** 包括用于系统控制(亮度、音量、睡眠)、AppleScript/shell 执行、笔记、文件管理、音乐控制、消息传递等核心工具。 * **Raycast 集成:** 利用 Raycast 扩展实现强大的集成,自动发现并启用兼容命令。 * **安全性:** 通过 API 密钥、shell 命令白名单、临时隧道以及可选的 Cloudflare Access 实现零信任网络保护进行身份验证。 **入门:** 1. 克隆仓库并安装依赖项 (`git clone... & npm install`)。 2. 运行设置向导 (`npm run setup`) 以配置 API 密钥和 Raycast 扩展。 3. 启动系统 (`npm start`) 以启动桥接、隧道和 Agent UI。 了解更多信息并找到 Agent URL:[https://github.com/ygwyg/system](https://github.com/ygwyg/system)

相关文章

原文

remote mac automation

Control your Mac from anywhere using natural language. Built with Cloudflare Agents SDK for intelligent scheduling, memory, and tool orchestration.

agent url

https://your-agent.workers.dev

quick start

1. clone and install

git clone https://github.com/ygwyg/system
cd system && npm install

2. run setup wizard

npm run setup

Interactive setup: Anthropic API key, Raycast extensions, remote access.

3. start system

npm start

Starts bridge, tunnel, and opens the agent UI.

architecture

SYSTEM uses a split architecture for security: the Agent (brain) runs on Cloudflare Workers, while the Bridge (body) runs locally on your Mac.

┌───────────────────────────────────────────────────────┐
│                        USER                           │
│                    (phone/browser)                    │
└─────────────────────┬─────────────────────────────────┘
                      │ HTTPS
                      ▼
┌───────────────────────────────────────────────────────┐
│                  AGENT (Brain)                        │
│              Cloudflare Workers                       │
│  ┌─────────────┐  ┌─────────────┐  ┌─────────────┐    │
│  │   Claude    │  │   State     │  │  Schedules  │    │
│  │     AI      │  │  (D.O.)     │  │   (D.O.)    │    │
│  └─────────────┘  └─────────────┘  └─────────────┘    │
└─────────────────────┬─────────────────────────────────┘
                      │ Tunnel
                      ▼
┌───────────────────────────────────────────────────────┐
│                  BRIDGE (Body)                        │
│                Your Mac (local)                       │
│  ┌─────────────┐  ┌─────────────┐  ┌─────────────┐    │
│  │ AppleScript │  │    Shell    │  │   Raycast   │    │
│  └─────────────┘  └─────────────┘  └─────────────┘    │
└───────────────────────────────────────────────────────┘

agent (brain)

• Cloudflare Workers + D.O.
• Claude for NLP
• State, memory, scheduling
• WebSocket real-time

bridge (body)

• Local Express server
• AppleScript, shell exec
• Raycast extensions
• Cloudflare Tunnel

authentication

All requests require an API secret via Bearer token or query parameter.


Authorization: Bearer <api_secret>


?token=<api_secret>

note

The API secret is generated during npm run setup and stored in bridge.config.json.

chat

Send natural language commands to control your Mac.

Send a message to the agent.

request

{
  "message": "Play some jazz music"
}

response

{
  "message": "Playing jazz on Apple Music",
  "actions": [{
    "tool": "music_play",
    "args": { "query": "jazz" },
    "success": true,
    "result": "Now playing: Jazz Vibes"
  }]
}

Clear conversation history and state.

schedules

Schedule one-time or recurring tasks using natural language or cron syntax.

List all scheduled tasks.

{
  "schedules": [{
    "id": "abc123",
    "description": "Play closing time",
    "scheduledAt": "2026-01-05T17:00:00Z",
    "cron": "0 17 * * *"
  }]
}

Cancel a scheduled task by ID.

natural language examples

• "Remind me to call mom in 30 minutes"
• "Every day at 5pm, play Closing Time"
• "At 9am tomorrow, open Linear"

state

The agent maintains persistent state including preferences and conversation history.

Get current agent state for debugging.

{
  "preferences": { "wife": "Jane" },
  "historyLength": 12,
  "scheduleCount": 2
}

core tools

Foundational tools for Mac automation.

tooldescription
open_appOpen any application
open_urlOpen URL in browser
shellRun safe shell commands
shell_listList available shell commands
applescriptExecute AppleScript
notifyShow macOS notification
sayText-to-speech
clipboard_getGet clipboard contents
clipboard_setSet clipboard contents
screenshotTake screenshot

music

Control Apple Music playback.

tooldescription
music_playPlay/search music
music_pausePause playback
music_nextSkip to next track
music_previousPrevious track
music_currentGet current track info
volume_getGet volume level
volume_setSet volume (0-100)
volume_upIncrease volume 10%
volume_downDecrease volume 10%
volume_muteToggle mute

messaging

Send iMessages with human-in-the-loop confirmation.

tooldescription
search_contactsFind contact by name
send_imessageSend iMessage

safety flow

When you say "text my wife hello", SYSTEM will: 1) resolve "wife" from preferences, 2) search contacts, 3) ask for confirmation before sending.

system

Control system settings, get status, manage files and apps.

calendar & reminders

tooldescription
calendar_todayToday's events
calendar_upcomingUpcoming events
calendar_nextNext event
calendar_createCreate event
reminders_listList reminders
reminders_createCreate reminder
reminders_completeComplete reminder

display & focus

tooldescription
brightness_setSet brightness
dark_mode_toggleToggle dark mode
dark_mode_statusGet dark mode status
dnd_toggleToggle Do Not Disturb
lock_screenLock Mac
sleep_displaySleep display
sleep_macSleep Mac

system status

tooldescription
battery_statusBattery level & charging
wifi_statusWiFi network info
storage_statusDisk space
running_appsList running apps
front_appGet frontmost app

notes

Read and write Apple Notes.

tooldescription
notes_listList recent notes
notes_searchSearch notes by keyword
notes_createCreate a new note
notes_readRead note content
notes_appendAppend to existing note

files

Search and manage files via Finder.

tooldescription
finder_searchSearch files by name
finder_downloadsList recent downloads
finder_desktopList desktop files
finder_revealReveal file in Finder
finder_trashMove file to trash

shortcuts

Run Apple Shortcuts.

tooldescription
shortcut_runRun a shortcut by name
shortcut_listList available shortcuts

tip

Create powerful automations in Shortcuts.app, then trigger them via SYSTEM. Example: "Run my Morning Routine shortcut"

browser

Get info from Safari, Chrome, Arc, or other browsers.

tooldescription
browser_urlGet current tab URL
browser_tabsList open tabs

raycast extensions

Execute Raycast extensions for powerful integrations. SYSTEM scans your installed extensions and makes them available as tools.

how it works

During npm run setup, SYSTEM scans your Raycast extensions folder and presents compatible commands for you to enable. Each enabled command becomes a dedicated tool.

Raycast Extension              SYSTEM Tool
─────────────────              ───────────
spotify-player/play      →     spotify_play
linear/create-issue      →     linear_create_issue
slack/send-message       →     slack_send_message

extension discovery

SYSTEM looks in ~/.config/raycast/extensions/ and reads each extension's package.json to find commands. Only commands with mode: "no-view" or mode: "view" are compatible.

compatible extension types

typeworks?notes
No-view commands✅ BestExecute silently, return result
View commands⚠️ PartialOpens Raycast UI briefly
Form commands❌ NoRequires user input in Raycast
Menu bar commands❌ NoBackground only

popular extensions that work well

extensioncommandsuse case
spotify-playerplay, pause, next, likeMusic control
linearcreate-issue, searchIssue tracking
slacksend-message, set-statusTeam communication
todoistcreate-task, todayTask management
githubcreate-issue, searchCode management
notioncreate-page, searchNotes & docs

tool naming

Tools are named as {extension}_{command} with hyphens replaced by underscores:


Tool name: linear_create_issue_for_myself


Tool name: spotify_player_play

using raycast tools

Once enabled, just ask naturally:

  • "Create a Linear issue for fixing the login bug"
  • "Send a Slack message to #general saying hello"
  • "Play Daft Punk on Spotify"
  • "Add 'buy groceries' to my Todoist"

generic raycast tool

For extensions not in your enabled list, use the generic raycast tool:

{
  "extension": "spotify-player",
  "command": "play",
  "arguments": { "query": "jazz" }
}

deep link format

Under the hood, SYSTEM uses Raycast deep links:

raycast://extensions/{author}/{extension}/{command}?arguments={json}

troubleshooting

extension not found

If an extension isn't showing in setup, make sure it's installed via Raycast Store, not manually. Check ~/.config/raycast/extensions/.

command opens raycast but doesn't execute

This usually means the command requires UI interaction (forms, selections). These commands aren't fully compatible. Try a different command from the same extension.

authentication errors

Many extensions require you to authenticate in Raycast first. Open Raycast and run the command manually once to complete OAuth/login flows.

re-scanning extensions

If you install new Raycast extensions, run setup again to add them:

npm run setup

Your existing configuration will be preserved—you'll just see new extensions to enable.

bridge api

Direct API to the local bridge. Used by the agent, but also available for custom integrations.

List all available tools on the bridge.

Execute a specific tool.

{
  "tool": "open_app",
  "args": { "app": "Safari" }
}

websocket

Real-time updates for scheduled tasks and notifications.


const ws = new WebSocket('wss://your-agent.workers.dev/ws?token=...');

ws.onmessage = (event) => {
  const data = JSON.parse(event.data);
  
  console.log(data.type, data.payload);
};
event typedescription
scheduled_resultResult of a scheduled task
notificationSystem notification
bridge_statusBridge online/offline

security

SYSTEM is designed with security as a priority.

🔐 authentication

Bearer token required for all requests. Tokens are generated during setup and stored locally.

🛡️ shell safety

Only allowlisted commands can run. Dangerous patterns (rm -rf, sudo, etc.) are blocked.

🚇 tunnel security

Quick Tunnels are ephemeral — new URL each session. Bridge binds to 0.0.0.0 only when tunnel is active.

👤 human-in-the-loop

Sensitive actions like sending messages require explicit user confirmation.

cloudflare access (recommended)

If you deploy to Cloudflare Workers, add Cloudflare Access for Zero Trust authentication at the edge — before requests even reach your agent.

strongly recommended

While the API secret provides application-level auth, Cloudflare Access adds network-level protection. Only authenticated users can reach your agent at all.

setup via dashboard

  1. Go to Cloudflare Zero Trust Dashboard
  2. Navigate to Access → Applications → Add an application
  3. Select Self-hosted and enter your worker URL
  4. Create an access policy (e.g., email = [email protected])
  5. Save — users must now authenticate before accessing SYSTEM

automation (terraform)




resource "cloudflare_access_application" "system" {
  zone_id          = var.zone_id
  name             = "SYSTEM"
  domain           = "your-agent.workers.dev"
  session_duration = "24h"
}

resource "cloudflare_access_policy" "allow_me" {
  application_id = cloudflare_access_application.system.id
  zone_id        = var.zone_id
  name           = "Allow specific emails"
  precedence     = 1
  decision       = "allow"

  include {
    email = ["[email protected]"]
  }
}

note

Cloudflare Access is configured separately from Workers deployment. The wrangler CLI doesn't manage Access policies — use the dashboard or Terraform.

联系我们 contact @ memedata.com