fo-bridge
by furkanplus
README.md
# fo-bridge
Two-way bridge between [Fo](https://wajo.ai) (the wajo.ai assistant) and your Mac.
- **Fo → Mac.** Fo gets an MCP connection to your Mac with ~40 tools: terminal (quick commands,
long-running background jobs, interactive sessions), files, mouse/keyboard/GUI control, screenshots,
mic and screen recording with local transcription, Notes, Mail, Calendar, Reminders, Contacts,
iMessage, Spotlight, Shortcuts, Music, camera, volume/Wi-Fi/dark mode, and expiring download links
for any file. Optional: WhatsApp/Telegram/Signal through [Beeper](https://www.beeper.com).
- **Mac → Fo.** Message Fo from the menubar, the CLI (`fo-bridge send "..."`) or any local AI agent
(`fo-bridge mcp`). When a background job Fo started finishes, the bridge tells Fo itself.
- **Fo → Mac push.** Fo's scheduled actions and proactive messages arrive as macOS notifications
and in the menubar inbox.
A menubar app keeps everything running, shows what Fo is doing, and has a kill switch.
> **Unofficial.** This is a community project, not made by or affiliated with Wajo.
> It gives Fo full control of your Mac. Read [Security](#security) before installing.
## Install
Requirements: macOS 14 or newer (Apple Silicon or Intel), a Wajo account with Fo, and a way to give
the bridge a public HTTPS address (the installer sets up **Tailscale Funnel** for free, or you can use a
**Cloudflare Tunnel** on your own domain).
```bash
git clone https://github.com/furkanplus/fo-bridge-mac.git ~/fo-bridge
~/fo-bridge/install.sh
```
The installer checks your Mac, installs the Python daemon (with [uv](https://docs.astral.sh/uv/)),
builds the menubar app, asks how Fo should reach your Mac, offers the optional tools, adds a login
item, and opens a **setup assistant** in your browser that walks you through the Wajo side with
live ✓/✗ checks.
Full walkthrough, troubleshooting and FAQ: **[docs/GUIDE.md](docs/GUIDE.md)**.
## Everyday use
| | |
|---|---|
| Menubar icon | Status, recent activity, Fo inbox, "Message Fo", pause, permissions, setup assistant |
| `~/fo-bridge/.venv/bin/fo-bridge status` | Health and URLs |
| `fo-bridge send "text"` | Ask Fo something and wait for the reply |
| `fo-bridge pause` / `resume` | Kill switch (every tool call is refused while paused) |
| `fo-bridge perms [--fix all]` | Check and fix macOS permissions |
| `fo-bridge selftest` | Calls the read-only tools end to end |
| `./install.sh` | Update or repair (after `git pull`) |
| `./install.sh --reconfigure` | Change how Fo reaches this Mac |
| `./uninstall.sh [--purge]` | Remove the login item (and with `--purge`, all saved state) |
## How it works
```
Fo (cloud) ──HTTPS──▶ your tunnel ──▶ 127.0.0.1:9131 /<secret>/mcp MCP tools
/<secret>/webhook Fo → Mac pushes
menubar app, CLI ───▶ 127.0.0.1:9132 (local API, token)
daemon ──OAuth──▶ https://mcp.api.wajo.ai/fo (ask_fo, get_fo_reply, ...) Mac → Fo
```
| Part | Where |
|---|---|
| Daemon (Python) | `src/fo_bridge/` (the durable job/terminal gateway is vendored in `src/fo_bridge/gate/`) |
| Menubar app (Swift) | `menubar/` → `build/FoBridge.app`; supervises the daemon, owns the macOS permissions |
| Login item | `~/Library/LaunchAgents/local.fobridge.plist` |
| State and secrets | `~/.local/state/fo-bridge/` (never inside this folder) |
| Logs | `logs/daemon.log`, `logs/app.log` |
The tool set Fo sees is `CORE_TOOLS` in `src/fo_bridge/daemon.py`. To change it, write a comma- or
newline-separated list to `~/.local/state/fo-bridge/tools.txt` (`*` = every tool), restart, and press
**Refresh** on the connection in Wajo (Wajo caches the tool list).
## Settings
`~/.local/state/fo-bridge/config.json` (written by the installer; edit and re-run `./install.sh`):
| Key | Meaning |
|---|---|
| `public_url` | HTTPS base that forwards to 127.0.0.1:9131 |
| `owner_name` | Name Fo uses for you in its instructions (default: your macOS first name) |
| `sign_identity` | Optional code-signing identity for the app (keeps permission grants across rebuilds) |
| `bundle_id` | Optional bundle id for the app (default `local.fobridge.FoBridge`) |
| `health_resolve_ip` | Optional: IP to retry the reachability check against when local DNS caches failures |
## Security
- **Fo can do anything you can do on this Mac**: run commands, read and write files, send messages,
click around. Only install it if you trust Fo with that, and keep the kill switch in mind.
- Fo's URL contains a random secret; anyone with the full URL can control the Mac. Treat it like a
password. To rotate it: delete `~/.local/state/fo-bridge/secret`, restart from the menubar, and paste
the new URL into Wajo (connection and webhook).
- Webhooks from Wajo are signature-checked (Standard Webhooks) once you paste the signing secret
in the setup assistant.
- The local API (port 9132) only listens on 127.0.0.1 and needs a token from the state folder.
- Fo OAuth and Beeper tokens are stored in `~/.local/state/fo-bridge/` with owner-only permissions.
- Everything Fo does is logged in the menubar's activity list and `~/.local/state/fo-bridge/events.jsonl`.
## Development
```bash
.venv/bin/python -m pytest -q tests # security tests
menubar/build.sh && launchctl kickstart -k gui/$(id -u)/local.fobridge
```
`menubar/build.sh` signs ad hoc, so macOS asks again for Microphone, Screen Recording and similar
permissions after each rebuild. To avoid that, create a code-signing certificate in Keychain Access
(Certificate Assistant → Create a Certificate → type *Code Signing*) and build with
`FOBRIDGE_SIGN_IDENTITY="<its name>" menubar/build.sh`.
## License
MIT, see [LICENSE](LICENSE).
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues