brew install cirruslabs/cli/tart no longer works; Tart's README now says brew install openai/tools/tart. Its images are still published under ghcr.io/cirruslabs, so the default image stays. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Federated Connector for macOS
Sets up a Mac for your Federated Core, using the apps macOS comes with: Mail, Calendar and Contacts. It's the macOS counterpart of CoreDesktop's configure, and works the same way: it shows what's set up, sets up the rest, and can test and fix a Core later.
Requirements
- macOS 13 (Ventura) or later, on Apple silicon or Intel.
- Nothing else. It runs with the bash macOS comes with and only uses tools that are part of macOS. It doesn't need Homebrew, jq, python or the Command Line Tools.
Installing
In Terminal:
curl -fsSL https://federated.sh/mac | bash
federated.sh/mac sends curl to install.sh here on Gitea, so you can read what it runs first. In a browser, it opens this page.
It checks the Mac first: macOS 13 or later, not run as root, and an internet connection. It also warns if your account isn't an administrator, as some apps need your Mac password to install. Then it:
- downloads the latest version into
~/.local/share/federated-connector/connector - adds the
configureandupdatecommands to~/.local/bin - adds
~/.local/binto your PATH, at the top of~/.zprofileand~/.bash_profile - offers to run
configure
It doesn't need git, which macOS doesn't have without the Command Line Tools. Running it again reinstalls the latest version. The log is in ~/Library/Logs/Federated Connector/.
The install's folder never moves. That matters because the backup and network storage jobs, and the Federated Backup app you give Full Disk Access, point into it.
Running it
configure # show what's set up and choose what to set up
configure core # set up one item
configure --list # show what's set up, and the item names
Updating
update # get the latest version, showing what changed
update --version # the version installed
update downloads the latest version and swaps it in at once, so it's safe while backups run. Your settings, the profiles, keychain items and downloaded tools stay as they are, and the Federated Backup app keeps its Full Disk Access.
If you ran configure from a downloaded folder before installing, the installer tells you what still runs from there. Run configure again: backup, storage and agents show as to do until they've moved. Backups then need Full Disk Access again, as the app is made anew.
What it sets up
-
Your Federated Core. Give it your Superpanel's address (e.g. https://superpanel.example.com), your Core email, name and password. It sets up:
- Mail, Calendar and Contacts. It makes one configuration profile with your email account (IMAP and SMTP, with the settings your mail server publishes) and your Nextcloud calendars (CalDAV) and address books (CardDAV). This is how macOS itself sets up these accounts. macOS doesn't let scripts install profiles, so
configureopens the profile and System Settings, and you double-click "Federated Core (example.com)" under Downloaded and choose Install. To take the accounts off this Mac, remove the profile.- Mail keeps your Core password, because the mail server doesn't take Nextcloud app passwords.
- Calendar and Contacts use a Nextcloud app password, named "macOS Calendar and Contacts on {your Mac}", which you can revoke in Nextcloud under Settings > Security. A copy is kept in your login keychain, so the profile can be made again without a new app password.
- Superpanel as an app in ~/Applications (so it's in Launchpad and Spotlight) that opens Superpanel in your browser.
- Your Nextcloud files, kept in sync by the Nextcloud app. It opens with your Core's address filled in, and you sign in in your browser.
- Element, pointed at your Core's Matrix server, for your main Core.
You can add more Cores: run
configure coreagain and choose "Add a Core". Each Core gets its own profile, Superpanel and app password. Element, Tailscale and backups use your main Core (the first one, unless you choose another).configure corealso offers:- Test a Core: it checks each part against the Core and offers to fix what doesn't work.
- Your Core password changed: signing in with the new password turns Calendar's, Contacts' and the Nextcloud app's app passwords back on (Nextcloud turns them off when your password changes). Mail then gets the new password in a new version of the profile, which replaces the old one and keeps your mail.
- Remove a Core: it removes the profile, revokes the app password and deletes the Superpanel app. Everything on the Core itself stays as it is.
- Mail, Calendar and Contacts. It makes one configuration profile with your email account (IMAP and SMTP, with the settings your mail server publishes) and your Nextcloud calendars (CalDAV) and address books (CardDAV). This is how macOS itself sets up these accounts. macOS doesn't let scripts install profiles, so
-
Tailscale: joins this Mac to your Core's Tailscale network through headscale.example.com. To leave it, run
configure tailscaleagain. -
Backup: backs up your home folder daily to your Nextcloud files, in a
.backup-{this Mac's name}folder, with restic.- The backup is encrypted with a passphrase that
configureshows you once. Save it somewhere other than this Mac, such as Bitwarden. - It keeps 7 daily, 4 weekly and 6 monthly backups. It leaves out caches, things that can be downloaded again, VM disks, and files already in the cloud (iCloud Drive, your Nextcloud folder). To leave out more, list paths in
~/Library/Application Support/Federated Connector/backup-exclude, one per line. - restic reaches Nextcloud directly through rclone, with its own Nextcloud app password ("Federated Backup on {your Mac}").
- launchd starts it hourly and at login, and it backs up once a day, so a Mac that was asleep or off catches up soon after. It's started through a small app, "Federated Backup" in ~/Applications, because macOS only lets apps into Desktop, Documents, Mail and Photos once you give them Full Disk Access.
configureopens the right place in System Settings and checks that it worked. Without it, backups leave those folders out and you get a notification each time. - The log is
~/Library/Logs/Federated Connector/backup.log. Runconfigure backupagain to back up now or to turn backups off; turning them off also offers to delete the backups. - To restore, see "Restoring from a backup" below.
- The backup is encrypted with a passphrase that
-
Network storage: shared folders from other machines on your network, mounted in /Volumes and shown in Finder's sidebar. It finds SMB servers (Windows PCs, NAS boxes, Macs with File Sharing on) and machines that announce SFTP (Macs with Remote Login on, many Linux machines), or you enter an address (
smb://nas.local/files,sftp://me@server.local/srv/data). A launchd job mounts them again at login and when the network changes, skipping servers it can't reach. "Remove one" unmounts it and takes it off the list.- SMB is built into macOS. Leave out the share to choose from a list. The sign-in window can keep the password in your keychain, and mounting again at login needs it there.
- SFTP uses macFUSE and SSHFS, which
configure storageoffers to install. It needs macOS 26 or later, where macFUSE runs in user space through FSKit; you turn on its file system extension once, in System Settings > General > Login Items & Extensions. On earlier macOS, macFUSE needs its kernel extension, which on Apple silicon means starting up in Recovery and lowering security. This doesn't do that, but it uses the kernel extension if you've set it up yourself. As in CoreDesktop, an SFTP folder is mounted as you with your SSH keys (Bitwarden's SSH agent while it's running, otherwise macOS' agent and~/.ssh) and never asks for a password, so the server has to accept one of your keys.
-
AI agents: offers to install Claude Code, opencode and Hermes Agent with each one's own installer, and runs them in a sandbox (see below).
configure claude,configure opencodeandconfigure hermessign in to them and choose their model providers. -
Agent sandbox: iCloud Drive and other cloud drives' files are hidden from agents. Reading a file macOS keeps only in the cloud downloads it. To let agents read one of these, switch it here.
-
AI servers: LLM servers on this Mac or your network, such as Ollama or LM Studio. It finds the machines on your network over Bonjour and asks each one on the ports LLM servers use (11434 Ollama, 1234 LM Studio, 8080 llama.cpp, 8000 vLLM); or you enter an address. For the server you choose, it lets the sandboxed agents reach it (that port only), adds it to opencode with its models, offers to make it Hermes' model, and lets the commands Claude Code runs reach it too. A server on another machine has to accept connections from other machines: in Ollama's settings turn on "Expose Ollama to the network"; in LM Studio, "Serve on Local Network".
Sandboxed AI agents
opencode and Hermes run in Anthropic's sandbox runtime (srt), which on macOS uses Seatbelt, the same mechanism macOS uses to sandbox its own apps. In the sandbox, an agent:
- can change files only in the folder you start it in (plus its own settings, /tmp and a few package caches), so start it from a project folder
- can't read your SSH keys, keychains, password managers, browser profiles, Mail, Messages, Calendar and Contacts data, Signal, Element, cloud and Git credentials, or the other agents' logins
- can reach only AI providers and common developer sites: GitHub, Gitea, npm, PyPI, crates.io, RubyGems, the Go module proxy and Homebrew
Typing opencode, hermes or hermes-agent runs it in the sandbox: configure agents adds a line at the end of ~/.zshrc and ~/.bash_profile that puts sandbox/bin first on PATH. To run one without the sandbox, type unsandboxed opencode. Claude Code uses its own built-in sandbox for every command it runs, which configure agents turns on (see /sandbox inside Claude).
srt needs Node.js 22.12 or later. If this Mac doesn't have it, configure agents downloads Node.js and srt into ~/.local/share/federated-connector and uses them only for the sandbox.
To allow more, put a file in the same format as sandbox/config/base.json in ~/Library/Application Support/Federated Connector/sandbox/: base.json for every agent, or <agent>.json for one. Lists in it are added to the built-in ones. Domains in FEDERATED_SANDBOX_DOMAINS (space-separated) are allowed too.
Restoring from a backup
To see the backups and get files back:
source ~/.local/share/federated-connector/connector/system/backup-env.sh
restic snapshots
restic restore latest --target ~/restored --include ~/Documents
On a new Mac, run configure core and configure backup first. Then name the old Mac's folder, and restic asks for the passphrase you saved:
source ~/.local/share/federated-connector/connector/system/backup-env.sh .backup-{old Mac's name}
restic snapshots
Apps it downloads
If an app a step needs isn't on this Mac, configure offers to download and install it from its maker:
| App | For | From | Team ID |
|---|---|---|---|
| Nextcloud | Your files | github.com/nextcloud-releases/desktop | NKUJUXUJ3B |
| Element | Your Core's chat | packages.element.io | 7J4U792NQT |
| Tailscale | Your Core's network | pkgs.tailscale.com | W5364U7YZB |
| macFUSE | SFTP folders | github.com/macfuse/macfuse | 3T5GSNBU6W |
| SSHFS | SFTP folders | github.com/libfuse/sshfs (linked from macfuse.github.io) | 3T5GSNBU6W |
An app is installed only if it's signed with its maker's Developer ID (the Team ID above) and Gatekeeper accepts it, which means Apple notarized it. The apps update themselves after that. Installing a .pkg (Nextcloud, Tailscale) asks for your Mac password.
Command-line tools are used as they are if they're already installed (e.g. with Homebrew). Otherwise they're downloaded into ~/.local/share/federated-connector, and each download is checked against the SHA-256 checksums its release publishes:
| Tool | For | From |
|---|---|---|
| restic | Backups | github.com/restic |
| rclone | Backups (reaching Nextcloud) | downloads.rclone.org |
| Node.js | Running the sandbox | nodejs.org (current LTS) |
| srt | The agent sandbox | npm (@anthropic-ai/sandbox-runtime) |
The agents are installed with their makers' own installers: claude.ai/install.sh, opencode.ai/install and hermes-agent.nousresearch.com/install.sh. Each installer is downloaded first and then run, rather than piped straight into bash.
Where things are
- Your answers:
~/Library/Application Support/Federated Connector/(cores/<domain>.conf,core.conffor the main Core,tailscale.conf,backup.conf,storage,ai-servers, and your ownsandbox/config) - App passwords and the backup passphrase: login keychain, services "Federated Connector" and "federated-connector-backup"
- Background jobs:
~/Library/LaunchAgents/computer.federated.connector.{backup,storage}.plist - Federated Connector itself:
~/.local/share/federated-connector/connector, withconfigureandupdatelinked in~/.local/bin - Downloaded tools:
~/.local/share/federated-connector(bin,node,srt) - The accounts: System Settings > Privacy & Security > Profiles (General > Device Management on some versions)
Adding an item
Each file in configure.d/ is one item. It sets TITLE and DESCRIPTION and defines is_configured and run_configure. It can also define is_installed, and the item is left out when that fails. Libraries are in configure.d/lib/:
json.sh: JSON through JavaScript for Automationkeychain.sh: secrets in the login keychainnextcloud.sh: app passwordsapps.sh: downloading and checking appstools.sh: downloading and checking command-line toolsprofile.sh: configuration profilesmdns.sh: finding things on the network with dns-sdsmb.sh: SMB sharesagents.sh: the agents' real commands and srt
system/ has what runs in the background (backup, storage-mount), and sandbox/ has the sandbox wrapper and its config.
Keep to bash 3.2: no mapfile, read -i, associative arrays or ${var,,}.
Testing
smoketest/run (with 05-install for the installer) runs the scenarios in smoketest/, each in a fresh macOS VM, with Tart on an Apple silicon Mac. See smoketest/README.md.
Differences from CoreDesktop
- Mail, Calendar and Contacts come from a configuration profile, not GNOME Online Accounts. macOS asks you to approve the profile.
- Files sync through the Nextcloud app rather than a davfs2 mount.
- Backups and network storage run from launchd rather than systemd. Backups need Full Disk Access (see above), and network storage uses macOS' own SMB mounting and keychain rather than /etc/fstab.
- SFTP folders need macFUSE and SSHFS, and macOS 26 or later (or macFUSE's kernel extension), where CoreDesktop uses sshfs on FUSE, built into Linux.
- The sandbox uses Seatbelt rather than bubblewrap, so sandboxed agents reach everything, including local servers, through srt's proxy.
- Not ported: Cline Desktop (not packaged for macOS here), running Hermes' gateway in the sandbox, printers (AirPrint finds them), languages, Tally and the email watcher.