Control your Mac from anywhere with AI — Voice commands, automation, remote access, and 60+ built-in tools.
AI-Powered Mac Automation Platform | Self-Hosted | Open Source | Privacy-First
███╗ ███╗ █████╗ ██████╗██╗ ██╗██╗███╗ ██╗ █████╗
████╗ ████║██╔══██╗██╔════╝██║ ██║██║████╗ ██║██╔══██╗
██╔████╔██║███████║██║ ███████║██║██╔██╗ ██║███████║
██║╚██╔╝██║██╔══██║██║ ██╔══██║██║██║╚██╗██║██╔══██║
██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║██║ ╚████║██║ ██║
╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝╚═╝ ╚═╝
Machina is a self-hosted AI assistant that gives you complete control over your Mac from anywhere. Speak naturally—play music, send messages, manage files, run commands, and automate workflows with 60+ built-in tools.
- 🏠 Self-Hosted — Your data stays on your machine, never sent to third parties
- 🔐 Secure by Design — Token auth, command allowlists, human-in-the-loop confirmations
- 🌍 Access Anywhere — Secure Cloudflare tunnel for remote access from any device
- 🤖 AI-Powered — Natural language commands powered by Claude
- ⚡ 60+ Tools — Music, messages, calendar, files, system control, and more
- 🔌 Extensible — Raycast integration, AppleScript, shell commands
| Category | Capabilities |
|---|---|
| Music | Play, pause, skip, search, volume control |
| Messaging | Send iMessage with human-in-the-loop confirmation |
| Calendar | View, create, and manage events |
| Reminders | Create, list, and complete tasks |
| System | Volume, brightness, dark mode, lock, sleep |
| Files | Search, reveal, trash, clipboard |
| Automation | AppleScript, Shell commands, Shortcuts |
| Raycast | Execute any installed extension |
# Clone
git clone https://github.com/tytsxai/machina.git
cd machina
# Install
npm install
# Setup (interactive wizard)
npm run setup
# Launch
npm startOpen the URL displayed and start chatting with your Mac.
| Requirement | Version | Notes |
|---|---|---|
| macOS | Sonoma+ | Required |
| Node.js | 18+ | Required |
| Anthropic API Key | — | Get one here |
| cloudflared | Latest | Optional, for remote access |
| Raycast | Latest | Optional, for extensions |
┌─────────────────────────────────────────────────────────────────────┐
│ YOUR DEVICES │
│ (iPhone, iPad, MacBook, Browser) │
└───────────────────────────┬─────────────────────────────────────────┘
│ HTTPS
▼
┌─────────────────────────────────────────────────────────────────────┐
│ CLOUDFLARE EDGE (Optional) │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ Access │ │ Worker │ │ Tunnel │ │
│ │ (Auth) │ │ (AI Brain) │ │ (Secure) │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
└───────────────────────────┬─────────────────────────────────────────┘
│ Authenticated Request
▼
┌─────────────────────────────────────────────────────────────────────┐
│ MACHINA BRIDGE │
│ (Your Mac) │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ Express │ │ Tool │ │ AppleScript│ │
│ │ Server │──│ Engine │──│ Runtime │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
└─────────────────────────────────────────────────────────────────────┘
Local Mode: Everything runs on your Mac at localhost:3000
Remote Mode: Secure Cloudflare tunnel enables access from anywhere (no account required)
After setup, your config is saved in machina.config.json:
{
"authToken": "your-secure-token",
"anthropicKey": "sk-ant-...",
"mode": "ui",
"access": "remote",
"extensions": [...]
}| Command | Description |
|---|---|
npm run setup |
Interactive setup wizard |
npm start |
Start Machina |
npm run dev |
Development mode (bridge only) |
npm run mcp |
Start MCP Server (for AI agent integration) |
npm run build |
Rebuild TypeScript |
Machina is built with security-first principles:
- Authentication — Bearer token on all endpoints
- Command Allowlist — Only safe shell commands permitted
- Pattern Blocking — Dangerous operations automatically blocked
- Human-in-the-Loop — Sensitive actions require confirmation
- Zero Trust Ready — Optional Cloudflare Access integration
- Self-Hosted — Your data never leaves your infrastructure
For production deployments, add Cloudflare Access for Zero Trust authentication:
resource "cloudflare_access_application" "machina" {
zone_id = var.zone_id
name = "Machina"
domain = "machina.yourdomain.com"
session_duration = "24h"
}| Issue | Solution |
|---|---|
| "No auth token" | Run npm run setup |
| Tunnel not starting | Install cloudflared: brew install cloudflared |
| Agent errors | Check cloudflare-agent/.dev.vars configuration |
Deploy the AI agent to Cloudflare Workers for a permanent endpoint:
cd cloudflare-agent
npm install
# Configure secrets
npx wrangler secret put ANTHROPIC_API_KEY
npx wrangler secret put BRIDGE_URL
npx wrangler secret put BRIDGE_AUTH_TOKEN
npx wrangler secret put API_SECRET
# Deploy
npm run deploy- API Reference — Complete endpoint and tool documentation
- Agent Deployment — Cloudflare Worker setup guide
- Production Readiness — Go-live checklist and ops runbook
See CONTRIBUTING.md for guidelines.
MIT License — see LICENSE for details.
Machina — Your Mac, Everywhere
mac automation ai assistant remote control mac applescript claude ai self-hosted home automation macos tools cloudflare workers typescript raycast imessage automation calendar automation voice control mac