# How to turn the MacBook notch into a control panel for AI agents

> AI Release · @ai_release1 · https://ai-release.org/guides/kak-prevratit-chelku-macbook-v-pult-upravleniya-ii-agen_en.html

## TL;DR
- Time: 20–30 minutes
- Difficulty: Intermediate
- Requires: macOS with Shortcuts and Terminal; Claude Code, Codex, Cursor, and GitHub Copilot installed and signed in; a project folder such as `~/Projects`; permission to run shell scripts.
- Result: four menu bar controls beside the MacBook notch that open the right AI agent in the right folder.

## Requirements and setup
![Illustration: Requirements and setup](https://ai-release.org/guides/img/kak-prevratit-chelku-macbook-v-pult-upravleniya-ii-agen-en-1.jpg)

- macOS with the built-in **Shortcuts** app and **Terminal**. Check the version with `sw_vers`.
- Installed AI agents: Claude Code, Codex, Cursor, and GitHub Copilot. Use the current vendor versions; check each vendor’s documentation for the exact install command and CLI name.
- A signed-in account for each tool. Cursor and GitHub Copilot usually run inside their desktop editors; Claude Code and Codex usually run as terminal commands. Confirm your installation before writing launchers.
- A project folder: `mkdir -p "$HOME/Projects"`.
- A scripts folder: `mkdir -p "$HOME/bin/ai-panel"`.
- The ability to run shell scripts from Terminal. If your Mac blocks local scripts, check macOS privacy and security settings.

Terms used here: **CLI** means command-line interface, a program you start by typing its name in Terminal. **Shortcuts** is Apple’s built-in automation app. The **menu bar** is the strip at the top of the screen; the **notch** is the camera housing in the center of newer MacBook displays. macOS does not expose a public API for drawing custom controls inside the notch, so this guide builds a menu bar control panel that sits beside it. Product-specific menu labels and CLI names vary; where a detail is not confirmed, check the vendor documentation.

## Step 1. Audit the notch and map the launch chain
**What to do:** Confirm your macOS environment, create the working folders, and find the exact executable path for each agent.

**Why:** The control panel should launch known commands, not guessed ones. A stable absolute path prevents failures when Shortcuts runs a script outside your interactive shell.

Run:

```bash
sw_vers
mkdir -p "$HOME/bin/ai-panel" "$HOME/Projects"
command -v claude
command -v codex
command -v cursor
command -v copilot
```

**Example output:**

```text
/Users/<you>/.local/bin/claude
/Users/<you>/.local/bin/codex
```

If a command prints nothing, that tool is not on your `PATH`. Cursor and GitHub Copilot may not expose those exact CLI names; use the app launcher in Step 2 and check the vendor documentation for the real command.

The launch chain is:

1. You click a Shortcuts menu bar item near the notch.
2. Shortcuts opens a `.command` file in `~/bin/ai-panel/`.
3. Terminal runs the script, or macOS opens the target app.
4. The AI agent starts in `~/Projects`.

**How to check:** Run:

```bash
ls -ld "$HOME/bin/ai-panel" "$HOME/Projects"
```

Expected result: two directories exist, for example:

```text
drwxr-xr-x  2 <you>  staff  64 ... /Users/<you>/bin/ai-panel
drwxr-xr-x  2 <you>  staff  64 ... /Users/<you>/Projects
```

## Step 2. Create menu bar launchers for the four agents
![Illustration: Step 2. Create menu bar launchers for the four agents](https://ai-release.org/guides/img/kak-prevratit-chelku-macbook-v-pult-upravleniya-ii-agen-en-2.jpg)

**What to do:** Create one executable `.command` file per agent, then pin each file as a Shortcuts menu bar item.

**Why:** A `.command` file is a shell script that Terminal can open directly. Shortcuts only launches that file, so each agent keeps its own working directory and startup command. The menu bar item becomes the control surface beside the notch without requiring a third-party notch app.

Create the Claude Code launcher:

```bash
cat > "$HOME/bin/ai-panel/claude.command" <<'EOF'
#!/bin/zsh
set -euo pipefail
cd "$HOME/Projects"
exec "$HOME/.local/bin/claude"
EOF
```

Replace `$HOME/.local/bin/claude` with the path printed by `command -v claude`. The `cd` line sets the project folder; `exec` replaces the script process with the agent so Terminal stays attached to it.

Create the Codex launcher the same way:

```bash
cat > "$HOME/bin/ai-panel/codex.command" <<'EOF'
#!/bin/zsh
set -euo pipefail
cd "$HOME/Projects"
exec "$HOME/.local/bin/codex"
EOF
```

Create app launchers for Cursor and GitHub Copilot in Visual Studio Code:

```bash
cat > "$HOME/bin/ai-panel/cursor.command" <<'EOF'
#!/bin/zsh
open -a "Cursor" "$HOME/Projects"
EOF

cat > "$HOME/bin/ai-panel/copilot.command" <<'EOF'
#!/bin/zsh
open -a "Visual Studio Code" "$HOME/Projects"
EOF
```

Make all four scripts executable:

```bash
chmod +x "$HOME/bin/ai-panel/"*.command
```

**Example:** `~/bin/ai-panel/claude.command` opens Terminal in `/Users/<you>/Projects` and starts the Claude Code command. `~/bin/ai-panel/cursor.command` opens Cursor on the same folder.

Now create the Shortcuts items:

1. Open **Shortcuts**.
2. Click **+** to create a shortcut and name it `AI - Claude Code`.
3. Add the action **Open File** and choose `~/bin/ai-panel/claude.command`.
4. Repeat for `AI - Codex`, `AI - Cursor`, and `AI - Copilot`.
5. Right-click each shortcut in the Shortcuts list and choose **Add to Menu Bar**. The label may vary by macOS version; check Apple’s Shortcuts documentation if you do not see it.

| Menu bar item | File opened | Target |
|---|---|---|
| `AI - Claude Code` | `~/bin/ai-panel/claude.command` | Claude Code CLI |
| `AI - Codex` | `~/bin/ai-panel/codex.command` | Codex CLI |
| `AI - Cursor` | `~/bin/ai-panel/cursor.command` | Cursor app |
| `AI - Copilot` | `~/bin/ai-panel/copilot.command` | VS Code with GitHub Copilot |

For multi-agent repositories, see [Claude Code for Teams: Setting Up Subagents and a Shared AI Superagent](https://ai-release.org/guides/claude-code-dlya-komandy-kak-nastroit-subagentov-i-obsc.html?utm_source=tg&utm_medium=channel&utm_campaign=guide_inline&utm_content=guide_to_guide).

**How to check:** Run:

```bash
ls -l "$HOME/bin/ai-panel"
shortcuts list | grep '^AI - '
```

Expected result: each file has `-rwxr-xr-x`, and the shortcut list prints four names beginning with `AI - `.

## Step 3. Verify each control from the notch area
![Illustration: Step 3. Verify each control from the notch area](https://ai-release.org/guides/img/kak-prevratit-chelku-macbook-v-pult-upravleniya-ii-agen-en-3.jpg)

**What to do:** Launch every shortcut from the menu bar and confirm the correct app or terminal opens in `~/Projects`.

**Why:** A shortcut can exist but point to the wrong file or a stale path. Testing from the menu bar checks the full chain: Shortcuts → `.command` → Terminal or app → agent.

Run one shortcut from Terminal first:

```bash
shortcuts run "AI - Claude Code"
```

Expected result: Terminal opens, the working directory is `/Users/<you>/Projects`, and the Claude Code prompt appears. Repeat for Codex, Cursor, and Copilot.

Use this checklist:

- [ ] Four menu bar items are visible beside the notch.
- [ ] `AI - Claude Code` opens Terminal in `~/Projects`.
- [ ] `AI - Codex` opens Terminal in `~/Projects`.
- [ ] `AI - Cursor` opens Cursor on `~/Projects`.
- [ ] `AI - Copilot` opens VS Code on `~/Projects` with GitHub Copilot available.
- [ ] Running `pwd` inside a terminal launcher prints `/Users/<you>/Projects`.

**Example:** Click `AI - Cursor`, and Cursor opens the `Projects` folder. Click `AI - Codex`, and Terminal shows a shell prompt in that folder followed by the Codex session.

Before merging agent-generated code, run the checks in [How to Scan AI-Generated Code for Vulnerabilities](https://ai-release.org/guides/kak-proverit-kod-ot-cursor-i-claude-code-na-uyazvimosti.html?utm_source=tg&utm_medium=channel&utm_campaign=guide_inline&utm_content=guide_to_guide).

**How to check:** From the menu bar, click each item once. Success looks like the correct window opening, not a generic Terminal window and not a Finder error dialog.

## Troubleshooting

**Problem. Terminal opens but the agent command is not found.**
- Error: `zsh: command not found: claude`
- Cause: Shortcuts runs a non-interactive shell that did not load the `PATH` from your interactive Terminal profile.
- Solution: Find the absolute path in Terminal with `command -v claude`, then edit the script:

```bash
exec /Users/<you>/.local/bin/claude
```

Run `shortcuts run "AI - Claude Code"` again.

**Problem. The .command file cannot be executed.**
- Error: `zsh: permission denied: /Users/<you>/bin/ai-panel/claude.command`
- Cause: The executable bit is missing.
- Solution:

```bash
chmod +x "$HOME/bin/ai-panel/"*.command
```

Then click the menu bar item again.

**Problem. Shortcuts cannot find the launcher file.**
- Error: `open: /Users/<you>/bin/ai-panel/claude.command: No such file or directory`
- Cause: The file was renamed, moved, or the Shortcuts action points to an old path.
- Solution:

```bash
ls -l "$HOME/bin/ai-panel/claude.command"
```

If the file is missing, recreate it with the Step 2 `cat` command, run `chmod +x`, and reselect it in the Shortcuts **Open File** action.

## Summary and next steps
You now have four menu bar launchers beside the MacBook notch, each opening a specific AI agent in `~/Projects`. Next, add a fifth shortcut for your most common test command, and review agent-generated code with the security guide linked above.

## FAQ

**Does this draw controls inside the MacBook notch?**
No. macOS does not expose a public API for custom notch controls. This setup uses Shortcuts menu bar items that sit beside the notch; check third-party notch utility documentation if you need a different visual treatment.

**Do I need all four agents installed?**
No. Create one `.command` file and one Shortcuts item for each agent you actually use. The workflow is identical for Claude Code, Codex, Cursor, and GitHub Copilot.

**Why use a `.command` file instead of a Shortcuts shell action?**
A `.command` file opens in Terminal and keeps an interactive agent session attached. That is useful for Claude Code and Codex, which may need a live terminal prompt.

**How do I change the project folder?**
Edit the `cd` line in each `.command` file, for example `cd "$HOME/Work/my-app"`, then run `shortcuts run "AI - Claude Code"` and confirm with `pwd`.
