Skip to content

Latest commit

 

History

History
524 lines (385 loc) · 15.8 KB

File metadata and controls

524 lines (385 loc) · 15.8 KB

macOS Development Environment Setup

License Python 3.13 Homebrew VS Code Git Node.js 22 LTS Bun Docker GitHub CLI

Quick Start · Voraussetzungen · Tools · Installation · Konfiguration · Chrome Profile · OpenCode Stack · Alternativen · Troubleshooting

Dein Mac ist in 30 Minuten ready für OpenSIN-AI Development — mit Bun, n8n, Docker und allen A2A Agents.


Quick Start

1. Xcode Tools

xcode-select --install

2. Homebrew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

3. Dev Stack

brew install git node bun python gh docker

4. OpenCode Stack

gh repo clone Delqhi/upgraded-opencode-stack && cd upgraded-opencode-stack && ./install.sh

5. Global Brain

node ~/.config/opencode/skills/global-brain/src/cli.js setup-hooks --project $(basename "$PWD") --project-root "$PWD" --agents-directive

Tip

Nach Homebrew-Installation: Die "Next steps" Ausgabe im Terminal beachten — oft muss Homebrew zum PATH hinzugefügt werden!

(back to top)


Voraussetzungen

Anforderung Details
macOS Version macOS 13 (Ventura) oder höher
Hardware Apple Silicon (M1/M2/M3/M4) oder Intel Mac
Rechte Administrator-Zugang (sudo)
Internet Aktive Verbindung für Downloads

Note

Apple Silicon (M1-M4) Macs sind empfohlen — bessere Performance für Node.js/n8n Workflows und Docker (Apple Silicon Build).

Important

Intel Mac User: Docker Desktop mit Apple Silicon Emulation ist langsamer. Wenn möglich, nutze einen M1/M2/M3/M4 Mac für bessere Performance.

(back to top)


Tools

Dieses Setup installiert folgende Tools:

Tool Version Beschreibung Link
Homebrew Latest Paketmanager für macOS brew.sh
Git 2.40+ Versionskontrolle git-scm.com
gh CLI 2.60+ GitHub CLI für PRs, Issues, Repos cli.github.com
Node.js 22 LTS JavaScript Runtime nodejs.org
Bun 1.2+ Schneller Package Manager (NICHT npm!) bun.sh
Python 3.13 Programmiersprache python.org
Docker Desktop Latest Container Runtime für lokale Tests docker.com
VS Code Latest Code Editor code.visualstudio.com
iTerm2 Latest Terminal Alternative (optional aber empfohlen) iterm2.com
Raycast Latest Spotlight Alternative (optional) raycast.com

Important

BUN STATT NPM! npm ist permanent verbannt — es frisst 4-6 GB RAM und wird vom OOM-Killer gekillt. Nutze IMMER bun install und bun run!

Warum Bun statt npm?
Kriterium npm Bun
RAM-Verbrauch 4-6 GB ~500 MB
Install-Geschwindigkeit Langsam 10-50x schneller
OOM-Killer Häufig Selten
Lock-File package-lock.json bun.lockb

(back to top)


Installation

Phase 1: Xcode Command Line Tools

xcode-select --install

Note

Dies öffnet einen Dialog — auf "Installieren" klicken und warten. Bei "Bereits installiert" einfach weitermachen.

Phase 2: Homebrew installieren

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Apple Silicon (M1/M2/M3/M4)额外 Schritt:

echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"

Intel Mac:

echo 'eval "$(/usr/local/bin/brew shellenv)"' >> ~/.zprofile
eval "$(/usr/local/bin/brew shellenv)"

Phase 3: Dev Tools installieren

brew install git node python bun gh wget curl openssl

Phase 4: Docker Desktop installieren

brew install --cask docker

Tip

Nach Docker Installation: Docker Desktop einmal starten und einloggen. Alternativ für Apple Silicon: OrbStack nutzen (schneller und ressourceneffizienter):

brew install --cask orbstack

Phase 5: VS Code installieren

brew install --cask visual-studio-code

Tip

VS Code Extensions für OpenSIN-Stack:

  • ms-python.python (Python)
  • esbenp.prettier-vscode (Formatierung)
  • github.copilot (AI Copilot)
  • redhat.vscode-yaml (YAML)
  • ms-vscode.powershell (PowerShell)

Phase 6: iTerm2 installieren (empfohlen)

brew install --cask iterm2

Note

iTerm2 bietet bessere Split Panes, Search und Customization als das Standard-Terminal.

Phase 7: Raycast installieren (optional)

brew install --cask raycast

Tip

Raycast ersetzt Spotlight und bietet schnelle Actions, Clipboard History und Window Management.

(back to top)


Konfiguration

Git Setup

# Git konfigurieren
git config --global user.name "Dein Name"
git config --global user.email "deine.email@example.com"
git config --global init.defaultBranch main
git config --global pull.rebase true
git config --global rebase.autoStash true
git config --global push.default current

# GitHub CLI autentifizieren
gh auth login

GitHub CLI (gh) Setup

# GitHub autentifizieren (SSH oder HTTPS)
gh auth login

# SSH Key für GitHub generieren (falls noch nicht vorhanden)
ssh-keygen -t ed25519 -C "deine.email@example.com"

# Key zu SSH Agent hinzufügen
ssh-add --apple-use-keychain ~/.ssh/id_ed25519

# Key anzeigen (für GitHub Settings → SSH Keys kopieren)
cat ~/.ssh/id_ed25519.pub

Important

Den öffentlichen Key (id_ed25519.pub) in GitHub Settings → SSH and GPG Keys → New SSH Key hinzufügen!

Python Setup

# Python 3.13 Virtual Environment erstellen
python3 -m venv ~/.venv/opencode
source ~/.venv/opencode/bin/activate

#pip install opencode # falls benötigt

Node.js/Bun Setup

# Bun als Standard-Paketmanager setzen
export BUN_INSTALL="$HOME/.bun"
export PATH="$BUN_INSTALL/bin:$PATH"

# Alias für Konsistenz
echo 'alias b="bun"' >> ~/.zshrc
echo 'alias bi="bun install"' >> ~/.zshrc
echo 'alias br="bun run"' >> ~/.zshrc
echo 'alias bt="bun test"' >> ~/.zshrc
source ~/.zshrc

SSH Key für GitHub

# SSH Key generieren (falls noch nicht vorhanden)
ssh-keygen -t ed25519 -C "deine.email@example.com" -f ~/.ssh/id_ed25519 -N ""

# Key zu SSH Agent hinzufügen
ssh-add --apple-use-keychain ~/.ssh/id_ed25519

# Key anzeigen (für GitHub Settings kopieren)
cat ~/.ssh/id_ed25519.pub

Important

Den öffentlichen Key (id_ed25519.pub) in GitHub Settings → SSH and GPG Keys → New SSH Key hinzufügen!

(back to top)


Chrome Profile

Für Browser Automation (Prolific, Surveys, etc.) werden Chrome Profile benötigt:

Profil-Verzeichnis

Profil Email Verwendung Dokumentation
Geschäftlich info@zukunftsorientierte-energie.de Admin Console, Domain-Wide Delegation admin-profiles
Default zukunftsorientierte.energie@gmail.com Privat — NIEMALS für Admin! private-profiles

Chrome Profile Verzeichnis

~/Library/Application Support/Google/Chrome/
├── Default/              # Default Profil (zukunftsorientierte.energie@gmail.com)
├── Geschäftlich/         # Workspace Admin Profil (info@zukunftsorientierte-energie.de)
└── ...                   # Weitere Profile

Warning

NIEMALS das falsche Profil für Admin-Aufgaben nutzen! Immer "Geschäftlich" für Google Admin Console!

Profile dokumentieren

Für jedes neue Chrome Profil eine Dokumentation erstellen:

# Beispiel: Profil-Dokumentation erstellen
mkdir -p ~/dev/docs/chrome/admin-profiles/info@zukunftsorientierte-energie.de
echo "# Chrome Profil: info@zukunftsorientierte-energie.de" > ~/dev/docs/chrome/admin-profiles/info@zukunftsorientierte-energie.de/README.md

(back to top)


OpenCode Stack

upgraded-opencode-stack installieren

# Repository klonen (MIT GH CLI!)
gh repo clone Delqhi/upgraded-opencode-stack ~/dev/upgraded-opencode-stack
cd ~/dev/upgraded-opencode-stack

# Installation starten
./install.sh

Global Brain / PCPM initialisieren (PFLICHT!)

Important

OHNE Global Brain hat der Agent KEINE Erinnerung an frühere Sessions und funktioniert nicht richtig!

# Global Brain Hooks installieren
node ~/.config/opencode/skills/global-brain/src/cli.js setup-hooks \
  --project $(basename "$PWD") \
  --project-root "$PWD" \
  --agents-directive

# Verification
ls -la .opencode/hooks/

Serena MCP aktivieren

Note

Serena MCP macht Coding-Leistungen weitaus effektiver! Muss nach der OpenCode Installation aktiviert werden.

# Serena MCP in der project-opencode.json oder globalen opencode.json aktivieren
# Prüfe ob Serena MCP verfügbar ist:
cat ~/.config/opencode/opencode.json | grep -i serena

# Falls nicht: Serena MCP installieren und aktivieren

sin-sync ausführen (nach OCI VM Setup)

# Config auf OCI VM syncen (nach dem OCI Setup)
sin-sync

(back to top)


Next Steps

Nach dem Setup:

  1. OCI-dev-setup.md — Oracle Cloud VM mit n8n, A2A-SIN-GitHub-Action und Box.com Storage aufsetzen
  2. opencode-dev-setup.md — OpenCode CLI konfigurieren und autentifizieren
  3. upgraded-opencode-stack./install.sh ausführen falls noch nicht done

Tip

Für eine vollständige OCI VM mit n8n, A2A-SIN-GitHub-Action und Box.com Storage → folge OCI-dev-setup.md Schritt für Schritt.

(back to top)


Alternativen

Ohne Homebrew (Minimal-Setup)

Falls Homebrew nicht installiert werden kann:

# Xcode Tools
xcode-select --install

# Git (vorinstalliert auf macOS)
git --version

# GitHub CLI von python.org oder direct
brew install gh # wenn brew verfügbar

# Python von python.org oder via brew
brew install python@3.13 # wenn brew verfügbar

Docker Alternativen

OrbStack (schneller auf Apple Silicon):

brew install --cask orbstack

Lima (open-source, leicht):

brew install lima
limactl start default

Für OpenSIN-AI spezifische Tools

# n8n (Workflow Automation) — läuft auf OCI VM
# Lokal nicht nötig — unsere n8n Workflows laufen auf der OCI VM

# opencode CLI — vom upgraded-opencode-stack
# Installation via: gh repo clone Delqhi/upgraded-opencode-stack && cd upgraded-opencode-stack && ./install.sh

# Box.com Storage — für Logs/Screenshots
# Via A2A-SIN-Box-Storage Service (room-09-box-storage)

(back to top)


Troubleshooting

Problem Lösung
brew: command not found Homebrew nicht im PATH — Terminal neu starten oder eval "$(brew shellenv)"
xcode-select: error: command line tools are already installed Kein Problem — bereits installiert
permission denied bei Homebrew sudo chown -R $(whoami) /usr/local/share/zsh oder /opt/homebrew
GitHub Push verlangt Passwort SSH Key nutzen statt HTTPS — git remote set-url origin git@github.com:user/repo.git
VS Code "command not found" VS Code → Command Palette → "Shell Command: Install 'code' command in PATH"
Python Version zu alt brew install python@3.13 und alten Symlink aktualisieren
Docker startet nicht Docker Desktop starten und einloggen, oder brew services restart docker
gh auth login funktioniert nicht gh auth status prüfen, ggf. gh auth logout und erneut einloggen
bun: command not found nach Neustart export BUN_INSTALL="$HOME/.bun" und export PATH="$BUN_INSTALL/bin:$PATH" in ~/.zshrc

Warning

Bei OOM-Kill (Process killed): NIEMALS npm nutzen! Immer bun install verwenden! npm frisst 4-6 GB RAM.

(back to top)


Quick Reference

# Nachinstallation neuer Tools
brew install <tool>
brew install --cask <app>

# Updates
brew update && brew upgrade

# Alle installierten Tools anzeigen
brew list
brew list --cask

# Hilfe
brew help
man brew

# Docker
docker ps              # Laufende Container
docker ps -a           # Alle Container
docker images          # Alle Images

# GitHub CLI
gh repo list           # Repositories auflisten
gh issue list          # Issues auflisten
gh pr status           # Pull Request Status

License

Distributed under the MIT License. See LICENSE for more information.


Powered by OpenSIN-AI

Entwickelt vom OpenSIN-AI Ökosystem – Enterprise AI Agents die autonom arbeiten.
🌐 opensin.ai · 💬 Alle Agenten · 🚀 Dashboard

(back to top)