# Mac machines

Put the Andon agent on a Mac so it can run cards from your board. It runs as a LaunchAgent under your user and starts each time you log in.

**Before you start**

- **Homebrew** ([brew.sh](https://brew.sh)). The installer uses it for anything missing: git, tmux, gh, curl and Node 22.
- **A coding agent CLI**: Claude Code, Codex or Gemini CLI. The Claude desktop app alone isn't enough, because Andon runs Claude through Claude Code, the CLI.
- **Orca** is optional. Without it the machine runs in direct mode.

## Install

1. **In Terminal, run the installer from your board**

   **Has a browser**

   ```sh
   $ curl -fsSL https://your-andon/install.sh | sh
   ✓ Enrolled as "Studio Mac"
   ```

   **No browser**

   ```sh
   $ curl -fsSL https://your-andon/install.sh | sh -s -- --no-browser
   ```

2. **Answer Install with Homebrew? if something is missing**

   Node 22 comes from Homebrew's `node@22`, which stays keg-only: your default `node` isn't relinked, and the agent uses the keg's path.

3. **Approve the machine in the browser tab that opens**

   Check that the code on the page matches the one in Terminal. Once approved, the page tells you to go back to Terminal, which rings its bell: setup waits there for your answers.

4. **Pick a policy preset**

   **Locked**, **Standard** or **Open**. Enter picks Open. Setup then lists the folders it will search for repositories; for each one outside the workspace roots it asks first, and Enter adds it.

5. **Fix anything andon doctor marks ✗**

   The installer ends with `andon doctor`. Fix anything it marks ✗ and run `andon doctor` again.

> **Tip:** No ffmpeg yet?
>
> The installer never installs ffmpeg. Without it, image and video previews are off on this machine. Install it later (`brew install ffmpeg`) and they turn on at the next sync.

## Where things are

| What                | Where                                                |
| ------------------- | ---------------------------------------------------- |
| The `andon` command | `~/.local/bin/andon`                                 |
| Config              | `~/.config/andon/config.json` (readable only by you) |
| Service             | `~/Library/LaunchAgents/dev.andon.agent.plist`       |
| Logs                | `~/Library/Logs/andon/agent.log` and `agent.err.log` |

Read the log as it is written:

```sh title="shell"
tail -f ~/Library/Logs/andon/agent.log
```

## The service

The LaunchAgent starts the agent when you log in and starts it again if it stops.

> **Warning:** It runs only while you are logged in.
>
> On a Mac that should take work around the clock, keep a user logged in and turn off sleep.

**To take the agent off the Mac.** `andon uninstall-service` stops the service and takes it out of launchd, but leaves the plist file in `~/Library/LaunchAgents`.
