
Macos Setup
- 85 installs
- 6 repo stars
- Updated July 22, 2026
- julianobarbosa/claude-code-skills
Setup and configure macOS systems and development environments.
About
Macos Setup provides specialized tooling. Setup checklist for Xcode Command Line Tools, Homebrew and development environment configuration.
- Xcode Command Line Tools
- Homebrew
Macos Setup by the numbers
- 85 all-time installs (skills.sh)
- +1 installs in the week ending Aug 2, 2026 (Skillselion tracking)
- Ranked #260 of 550 CLI & Terminal skills by installs in the Skillselion catalog
- Data as of Aug 3, 2026 (Skillselion catalog sync)
npx skills add https://github.com/julianobarbosa/claude-code-skills --skill macos-setupAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 85 |
|---|---|
| repo stars | ★ 6 |
| Last updated | July 22, 2026 |
| Repository | julianobarbosa/claude-code-skills ↗ |
What it does
Setup and configure macOS systems and development environments.
Files
macOS Starter - Setup Skill
From Zero to Hero - AI-powered macOS development environment configuration
Quick Reference
| Command | Description |
|---|---|
/new-macos-setup | Full interactive setup wizard |
/new-macos-setup --quick | Quick setup with defaults |
/new-macos-setup --preset fullstack | Use fullstack preset |
/new-macos-setup --dry-run | Preview without installing |
---
Skill Capabilities
0. Network Proxy Check (前置步骤)
在开始安装前,必须确保网络可以访问 Google 和 GitHub:
check_network() {
echo "=== Network Connectivity Check ==="
echo ""
# Test GitHub
echo "Testing GitHub..."
if curl -s --connect-timeout 5 https://github.com > /dev/null 2>&1; then
echo "✅ GitHub: accessible"
else
echo "❌ GitHub: not accessible"
NEED_PROXY=true
fi
# Test Google (for some Homebrew dependencies)
echo "Testing Google..."
if curl -s --connect-timeout 5 https://www.google.com > /dev/null 2>&1; then
echo "✅ Google: accessible"
else
echo "❌ Google: not accessible"
NEED_PROXY=true
fi
# Test Homebrew
echo "Testing Homebrew..."
if curl -s --connect-timeout 5 https://raw.githubusercontent.com > /dev/null 2>&1; then
echo "✅ Homebrew sources: accessible"
else
echo "❌ Homebrew sources: not accessible"
NEED_PROXY=true
fi
if [ "$NEED_PROXY" = true ]; then
echo ""
echo "⚠️ Network issues detected. Proxy configuration required."
return 1
fi
echo ""
echo "✅ Network OK - Ready to proceed"
return 0
}代理配置流程:
1. 询问用户代理信息:
questions:
- id: proxy_needed
question: "Do you need to configure a network proxy to access GitHub/Google?"
options:
- label: "Yes, I have a proxy"
description: "Configure HTTP/HTTPS proxy"
- label: "No, direct connection works"
description: "Skip proxy configuration"
- id: proxy_config
question: "Please provide your proxy configuration:"
condition: "proxy_needed == 'Yes'"
inputs:
- label: "Proxy URL"
placeholder: "http://127.0.0.1:7890"
example: "http://127.0.0.1:7890 or socks5://127.0.0.1:1080"2. 设置临时环境变量:
setup_proxy() {
local proxy_url="$1"
if [ -n "$proxy_url" ]; then
echo "Setting proxy: $proxy_url"
export http_proxy="$proxy_url"
export https_proxy="$proxy_url"
export HTTP_PROXY="$proxy_url"
export HTTPS_PROXY="$proxy_url"
export ALL_PROXY="$proxy_url"
# For Git
git config --global http.proxy "$proxy_url"
git config --global https.proxy "$proxy_url"
echo "✅ Proxy configured for this session"
echo ""
echo "To make permanent, add to ~/.zshrc:"
echo " export http_proxy=\"$proxy_url\""
echo " export https_proxy=\"$proxy_url\""
fi
}3. 验证代理是否工作:
verify_proxy() {
echo "Verifying proxy configuration..."
if curl -s --connect-timeout 5 https://github.com > /dev/null 2>&1; then
echo "✅ GitHub accessible via proxy"
else
echo "❌ GitHub still not accessible"
return 1
fi
if curl -s --connect-timeout 5 https://www.google.com > /dev/null 2>&1; then
echo "✅ Google accessible via proxy"
else
echo "❌ Google still not accessible"
return 1
fi
echo "✅ Proxy verification passed"
return 0
}---
1. System Detection
Detect installed software and versions:
# Core tools detection script
detect_installed() {
echo "=== System Detection ==="
# Homebrew
if command -v brew &>/dev/null; then
echo "✅ Homebrew: $(brew --version | head -1)"
else
echo "❌ Homebrew: not installed"
fi
# Shell
echo "✅ Shell: $SHELL"
[ -d "$HOME/.oh-my-zsh" ] && echo "✅ Oh-My-Zsh: installed"
command -v starship &>/dev/null && echo "✅ Starship: installed"
# Git
command -v git &>/dev/null && echo "✅ Git: $(git --version)"
command -v gh &>/dev/null && echo "✅ GitHub CLI: installed"
command -v delta &>/dev/null && echo "✅ Delta: installed"
# Modern CLI
command -v eza &>/dev/null && echo "✅ eza: installed"
command -v bat &>/dev/null && echo "✅ bat: installed"
command -v fd &>/dev/null && echo "✅ fd: installed"
command -v rg &>/dev/null && echo "✅ ripgrep: installed"
# Languages
command -v fnm &>/dev/null && echo "✅ fnm: installed"
command -v node &>/dev/null && echo "✅ Node.js: $(node --version)"
command -v pnpm &>/dev/null && echo "✅ pnpm: installed"
command -v uv &>/dev/null && echo "✅ uv: installed"
command -v python3 &>/dev/null && echo "✅ Python: $(python3 --version)"
command -v goenv &>/dev/null && echo "✅ goenv: installed"
command -v go &>/dev/null && echo "✅ Go: $(go version)"
# Container
command -v docker &>/dev/null && echo "✅ Docker: installed"
command -v kubectl &>/dev/null && echo "✅ kubectl: installed"
command -v helm &>/dev/null && echo "✅ Helm: installed"
command -v k9s &>/dev/null && echo "✅ k9s: installed"
# Applications
[ -d "/Applications/Raycast.app" ] && echo "✅ Raycast: installed"
[ -d "/Applications/Warp.app" ] && echo "✅ Warp: installed"
[ -d "/Applications/Visual Studio Code.app" ] && echo "✅ VS Code: installed"
[ -d "/Applications/OrbStack.app" ] && echo "✅ OrbStack: installed"
# Vibe Coding Tools
echo ""
echo "--- Vibe Coding Tools ---"
command -v claude &>/dev/null && echo "✅ Claude Code: $(claude --version 2>/dev/null | head -1 || echo 'installed')" || echo "❌ Claude Code"
command -v ccline &>/dev/null && echo "✅ CCometixLine: installed" || echo "❌ CCometixLine"
[ -d "/Applications/Cursor.app" ] && echo "✅ Cursor: installed" || echo "❌ Cursor"
command -v opencode &>/dev/null && echo "✅ OpenCode: installed" || echo "❌ OpenCode"
[ -d "/Applications/Cherry Studio.app" ] && echo "✅ Cherry Studio: installed" || echo "❌ Cherry Studio"
[ -d "/Applications/LM Studio.app" ] && echo "✅ LM Studio: installed" || echo "❌ LM Studio"
}2. Interactive Q&A Flow
Use AskUserQuestion tool with structured questions:
questions:
- id: role
question: "What best describes your primary development role?"
options:
- label: "Fullstack Developer"
description: "React/Vue + Node.js + Database"
- label: "Frontend Developer"
description: "React/Vue/Svelte + UI/Design tools"
- label: "Backend Developer"
description: "Go/Python/Java + APIs + Infrastructure"
- label: "Data/ML Engineer"
description: "Python + Jupyter + ML frameworks"
- label: "DevOps/Platform"
description: "K8s + Terraform + CI/CD"
- id: languages
question: "Which programming languages do you need?"
multiSelect: true
options:
- label: "JavaScript/TypeScript"
description: "fnm + Node.js LTS + pnpm"
- label: "Python"
description: "uv + Python 3.12"
- label: "Go"
description: "goenv + latest Go"
- label: "Rust"
description: "rustup + stable"
- id: containers
question: "Do you need container and Kubernetes tools?"
options:
- label: "Full K8s setup"
description: "OrbStack + kubectl + helm + k9s + stern"
- label: "Docker only"
description: "OrbStack for containers"
- label: "Skip"
description: "No container tools"
- id: vibe_coding
question: "Which additional Vibe Coding tools do you need?"
multiSelect: true
note: "We assume you already have at least one AI coding tool installed to use this project."
detection: |
command -v claude &>/dev/null && echo "✅ Claude Code installed"
command -v ccline &>/dev/null && echo "✅ CCometixLine installed"
[ -d "/Applications/Cursor.app" ] && echo "✅ Cursor installed"
command -v opencode &>/dev/null && echo "✅ OpenCode installed"
[ -d "/Applications/Cherry Studio.app" ] && echo "✅ Cherry Studio installed"
options:
- label: "Claude Code"
description: "Anthropic's official agentic CLI"
skip_if: "command -v claude &>/dev/null"
- label: "CCometixLine"
description: "Claude Code statusline enhancer (Git, model, context)"
skip_if: "command -v ccline &>/dev/null"
requires: "Node.js"
- label: "Cursor"
description: "AI-first code editor"
skip_if: "[ -d '/Applications/Cursor.app' ]"
- label: "OpenCode"
description: "Open-source terminal AI assistant"
skip_if: "command -v opencode &>/dev/null"
- label: "Cherry Studio"
description: "AI desktop client with multi-model support"
skip_if: "[ -d '/Applications/Cherry Studio.app' ]"
- id: apps
question: "Which collaboration apps?"
multiSelect: true
options:
- label: "Work (CN)"
description: "Lark + DingTalk + WeCom"
- label: "International"
description: "Slack + Discord + WhatsApp"
- label: "Meetings"
description: "Tencent Meeting + Zoom"
- id: macos
question: "macOS optimizations?"
multiSelect: true
options:
- label: "Dock"
description: "Hide recent apps, faster animations"
- label: "Keyboard"
description: "Faster repeat, disable auto-correct"
- label: "Finder"
description: "Show hidden files, path bar"
- label: "Screenshots"
description: "Save to ~/Pictures/Screenshots"3. Plan Generation
Generate structured installation plan based on answers:
## Generated Plan for: [User Name]
### Phase 1: Prerequisites
- [ ] Xcode Command Line Tools
- [ ] Homebrew
### Phase 2: CLI Tools
| Package | Purpose | Command |
|---------|---------|---------|
| git | Version control | `brew install git` |
| gh | GitHub CLI | `brew install gh` |
| delta | Better diffs | `brew install delta` |
| starship | Modern prompt | `brew install starship` |
| eza | ls replacement | `brew install eza` |
| bat | cat replacement | `brew install bat` |
| fd | find replacement | `brew install fd` |
| ripgrep | grep replacement | `brew install ripgrep` |
### Phase 3: Language Environments
| Language | Manager | Setup Command |
|----------|---------|---------------|
| Node.js | fnm | `fnm install --lts && fnm default lts-latest` |
| Python | uv | `uv python install 3.12` |
| Go | goenv | `goenv install latest && goenv global latest` |
### Phase 4: Applications
| App | Purpose | Command |
|-----|---------|---------|
| Raycast | Launcher + window mgmt | `brew install --cask raycast` |
| Warp | Modern terminal | `brew install --cask warp` |
| OrbStack | Docker/K8s | `brew install --cask orbstack` |
### Phase 5: Vibe Coding Tools
> Note: Skip already installed tools
| Tool | Purpose | Command | Skip If |
|------|---------|---------|---------|
| Claude Code | Anthropic agentic CLI | `brew install --cask claude-code` | `command -v claude` |
| CCometixLine | Claude Code statusline | `npm install -g @cometix/ccline` | `command -v ccline` |
| Cursor | AI-first code editor | `brew install --cask cursor` | App exists |
| OpenCode | Open-source terminal AI | `brew install opencode` | `command -v opencode` |
| Cherry Studio | Multi-model AI client | `brew install --cask cherry-studio` | App exists |
### Phase 6: Fonts
| Font | Purpose |
|------|---------|
| JetBrains Mono Nerd Font | Terminal icons |
| Fira Code | Ligatures |
| Inter | UI font |
### Phase 7: Shell Configuration
- [ ] Zsh plugins (autosuggestions, syntax-highlighting)
- [ ] Starship prompt
- [ ] Modern CLI aliases
### Phase 8: macOS Defaults
- [ ] Dock optimization
- [ ] Keyboard settings
- [ ] Finder preferences4. Execution Engine
Execute plan with progress tracking:
# Example execution with progress
execute_phase() {
local phase=$1
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "📦 Phase $phase"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
}
# Phase 1: CLI Tools
execute_phase "1: CLI Tools"
brew install git gh delta starship
brew install eza bat fd ripgrep sd dust procs bottom
brew install tree wget curl jq yq
# Phase 2: Languages
execute_phase "2: Language Environments"
brew install fnm uv goenv go
fnm install --lts
fnm default lts-latest
npm install -g pnpm
# Phase 3: Apps
execute_phase "3: Applications"
brew install --cask raycast warp orbstack
# Phase 4: Vibe Coding (with skip detection)
execute_phase "4: Vibe Coding Tools"
# Claude Code
if ! command -v claude &>/dev/null; then
echo "📦 Installing Claude Code..."
brew install --cask claude-code
else
echo "⏭️ Claude Code already installed, skipping"
fi
# CCometixLine (requires Node.js)
if ! command -v ccline &>/dev/null; then
if command -v npm &>/dev/null; then
echo "📦 Installing CCometixLine..."
npm install -g @cometix/ccline
echo "💡 Configure: Add to ~/.claude/settings.json:"
echo ' {"statusLine": {"type": "command", "command": "ccline"}}'
else
echo "⚠️ CCometixLine requires Node.js, install fnm/node first"
fi
else
echo "⏭️ CCometixLine already installed, skipping"
fi
# Cursor
if [ ! -d "/Applications/Cursor.app" ]; then
echo "📦 Installing Cursor..."
brew install --cask cursor
else
echo "⏭️ Cursor already installed, skipping"
fi
# OpenCode
if ! command -v opencode &>/dev/null; then
echo "📦 Installing OpenCode..."
brew install opencode
else
echo "⏭️ OpenCode already installed, skipping"
fi
# Cherry Studio
if [ ! -d "/Applications/Cherry Studio.app" ]; then
echo "📦 Installing Cherry Studio..."
brew install --cask cherry-studio
else
echo "⏭️ Cherry Studio already installed, skipping"
fi
# Phase 5: Fonts
execute_phase "5: Fonts"
brew install --cask font-jetbrains-mono-nerd-font
brew install --cask font-fira-code font-inter
# Phase 6: Shell
execute_phase "6: Shell Configuration"
# Install zsh plugins...
# Configure starship...
# Phase 7: macOS
execute_phase "7: macOS Optimization"
defaults write com.apple.dock show-recents -bool false
defaults write NSGlobalDomain KeyRepeat -int 2
# ...
echo "✅ Setup complete!"---
Presets
fullstack
name: Fullstack Developer
languages: [javascript, python]
containers: full
apps: [raycast, warp, cursor, orbstack, notion]
macos: [dock, keyboard]frontend
name: Frontend Developer
languages: [javascript]
containers: docker
apps: [raycast, cursor, figma]
macos: [dock, keyboard]backend
name: Backend Developer
languages: [go, python]
containers: full
cloud: [aws]
apps: [raycast, warp, cursor, orbstack]
macos: [dock, keyboard, finder]data
name: Data/ML Engineer
languages: [python]
containers: docker
apps: [cursor, jupyter]
macos: [keyboard]devops
name: DevOps Engineer
languages: [go, python]
containers: full
cloud: [aws, gcp]
apps: [raycast, warp, orbstack]
macos: [dock, keyboard, finder]---
Configuration Files
This skill references:
presets.md- Detailed preset configurationspackages.md- Complete package registry../../scripts/Brewfile- Homebrew bundle../../configs/- Configuration templates
---
Best Practices
1. Always detect first - Never reinstall what exists 2. Ask, don't assume - User preferences matter 3. Show before doing - Display plan before execution 4. Progress tracking - Use TodoWrite for visibility 5. Verify after - Confirm installations succeeded 6. Non-destructive - Never remove existing tools
---
Error Handling
# Retry failed installations
retry_install() {
local cmd=$1
local max_attempts=3
local attempt=1
while [ $attempt -le $max_attempts ]; do
if eval "$cmd"; then
return 0
fi
echo "⚠️ Attempt $attempt failed, retrying..."
((attempt++))
sleep 2
done
echo "❌ Failed after $max_attempts attempts"
return 1
}---
Trigger Keywords
This skill activates on:
/new-macos-setup- "setup macos"
- "configure mac"
- "new mac setup"
- "dev environment"
- "install development tools"
---
Gotchas
- Brewfile on Apple Silicon: many casks have x86-only fallbacks — check architecture before bulk install, otherwise Rosetta-only apps land on M-series.
- `defaults write` changes don't always take effect immediately — some need
cfprefsd flushor app restart; an apparently-applied setting may not stick. - Xcode CLI tools install separately from Xcode.app —
xcode-selectswitches between but doesn't install; new machines need explicitxcode-select --install. - `com.apple.quarantine` xattr blocks unsigned binaries —
xattr -dremoves but Gatekeeper may re-add on next download. - SIP (System Integrity Protection) is per-volume — disabling on recovery affects the boot drive only; external drives have their own SIP state.
- macOS Sequoia+ `sudo` no longer caches credentials by default — scripts that assumed credential cache silently re-prompt or fail in unattended runs.
Package Registry
Complete catalog of installable packages, categorized by purpose
CLI Tools
Version Control
| Package | Description | Command | Replaces |
|---|---|---|---|
| git | Version control | brew install git | - |
| gh | GitHub CLI | brew install gh | hub |
| delta | Better git diff | brew install delta | diff |
Shell & Prompt
| Package | Description | Command | Replaces |
|---|---|---|---|
| zsh | Modern shell | Pre-installed on macOS | bash |
| starship | Cross-shell prompt | brew install starship | oh-my-zsh themes |
Modern CLI Replacements
| Package | Description | Command | Replaces |
|---|---|---|---|
| eza | Modern ls | brew install eza | ls |
| bat | Cat with syntax highlighting | brew install bat | cat |
| fd | Fast file finder | brew install fd | find |
| ripgrep | Fast grep | brew install ripgrep | grep |
| sd | Intuitive sed | brew install sd | sed |
| dust | Intuitive du | brew install dust | du |
| procs | Modern ps | brew install procs | ps |
| bottom | System monitor | brew install bottom | top/htop |
File & Data Tools
| Package | Description | Command |
|---|---|---|
| tree | Directory tree | brew install tree |
| wget | File download | brew install wget |
| curl | HTTP client | brew install curl |
| jq | JSON processor | brew install jq |
| yq | YAML processor | brew install yq |
Code Quality
| Package | Description | Command |
|---|---|---|
| shellcheck | Shell script linter | brew install shellcheck |
| golangci-lint | Go linter | brew install golangci-lint |
---
Language Environments
Node.js
| Package | Description | Command |
|---|---|---|
| fnm | Fast Node Manager | brew install fnm |
| pnpm | Fast package manager | npm install -g pnpm |
Setup:
brew install fnm
eval "$(fnm env --use-on-cd)"
fnm install --lts
fnm default lts-latest
npm install -g pnpm
pnpm setupPython
| Package | Description | Command |
|---|---|---|
| uv | Fast Python/pip | brew install uv |
Setup:
brew install uv
uv python install 3.12Go
| Package | Description | Command |
|---|---|---|
| goenv | Go version manager | brew install goenv |
| go | Go language | brew install go |
Setup:
brew install goenv go
# Add to .zshrc:
# export GOENV_ROOT="$HOME/.goenv"
# export PATH="$GOENV_ROOT/bin:$PATH"
# eval "$(goenv init -)"
# export PATH="$GOPATH/bin:$PATH"Rust
| Package | Description | Command |
|---|---|---|
| rustup | Rust toolchain manager | `curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \ |
Java
| Package | Description | Command |
|---|---|---|
| sdkman | JDK manager | `curl -s "https://get.sdkman.io" \ |
---
Container & Kubernetes
Core
| Package | Description | Command |
|---|---|---|
| kubectl | K8s CLI | brew install kubectl |
| helm | K8s package manager | brew install helm |
| k9s | K8s TUI | brew install k9s |
| stern | Multi-pod log tail | brew install stern |
Context Management
| Package | Description | Command |
|---|---|---|
| kubeswitch | K8s context switcher | brew tap danielfoehrkn/switch && brew install switch |
---
Cloud CLIs
| Package | Description | Command |
|---|---|---|
| awscli | AWS CLI | brew install awscli |
| google-cloud-sdk | GCP CLI | brew install google-cloud-sdk |
| azure-cli | Azure CLI | brew install azure-cli |
| rclone | Cloud storage sync | brew install rclone |
---
Applications
Must Have
| App | Description | Command |
|---|---|---|
| Raycast | Launcher + window mgmt | brew install --cask raycast |
| 1Password | Password manager | brew install --cask 1password |
| Google Chrome | Browser | brew install --cask google-chrome |
| KeepingYouAwake | Prevent sleep | brew install --cask keepingyouawake |
| Keka | Archive utility | brew install --cask keka |
| AppCleaner | App uninstaller | brew install --cask appcleaner |
Development
| App | Description | Command |
|---|---|---|
| Cursor | AI code editor | brew install --cask cursor |
| VS Code | Code editor | brew install --cask visual-studio-code |
| Warp | Modern terminal | brew install --cask warp |
| OrbStack | Docker/K8s | brew install --cask orbstack |
| Sourcetree | Git GUI | brew install --cask sourcetree |
Collaboration (CN)
| App | Description | Command |
|---|---|---|
| Lark | Feishu | brew install --cask lark |
| DingTalk | Alibaba work | brew install --cask dingtalk |
| Personal | brew install --cask wechat | |
| Tencent Meeting | Video call | brew install --cask tencent-meeting |
Collaboration (International)
| App | Description | Command |
|---|---|---|
| Discord | Community | brew install --cask discord |
| Messaging | brew install --cask whatsapp | |
| Notion | Notes/Wiki | brew install --cask notion |
Media
| App | Description | Command |
|---|---|---|
| IINA | Video player | brew install --cask iina |
| ImageOptim | Image compression | brew install --cask imageoptim |
System Enhancement
| App | Description | Command |
|---|---|---|
| coconutBattery | Battery monitor | brew install --cask coconutbattery |
| MonitorControl | External display | brew install --cask monitorcontrol |
| Gas Mask | Hosts manager | brew install --cask gas-mask |
| balenaEtcher | USB boot disk | brew install --cask balenaetcher |
Quick Look Plugins
| App | Description | Command |
|---|---|---|
| QLMarkdown | Markdown preview | brew install --cask qlmarkdown |
| Syntax Highlight | Code preview | brew install --cask syntax-highlight |
Vibe Coding (AI-Assisted Programming)
用户使用本项目时,假设已安装其中至少一个 CLI 工具。安装前会自动检测并跳过已安装的工具。
| App | Description | Command | Detection |
|---|---|---|---|
| Claude Code | Anthropic agentic CLI | brew install --cask claude-code | command -v claude |
| CCometixLine | Claude Code statusline enhancer | npm install -g @cometix/ccline | command -v ccline |
| Cursor | AI-first code editor | brew install --cask cursor | [ -d "/Applications/Cursor.app" ] |
| OpenCode | Open-source terminal AI | brew install opencode | command -v opencode |
| Cherry Studio | AI desktop client | brew install --cask cherry-studio | [ -d "/Applications/Cherry Studio.app" ] |
| LM Studio | Local LLM runner | brew install --cask lm-studio | [ -d "/Applications/LM Studio.app" ] |
检测脚本:
detect_vibe_coding() {
echo "=== Vibe Coding Tools ==="
command -v claude &>/dev/null && echo "✅ Claude Code: $(claude --version 2>/dev/null || echo 'installed')" || echo "❌ Claude Code"
command -v ccline &>/dev/null && echo "✅ CCometixLine: installed" || echo "❌ CCometixLine"
[ -d "/Applications/Cursor.app" ] && echo "✅ Cursor: installed" || echo "❌ Cursor"
command -v opencode &>/dev/null && echo "✅ OpenCode: installed" || echo "❌ OpenCode"
[ -d "/Applications/Cherry Studio.app" ] && echo "✅ Cherry Studio: installed" || echo "❌ Cherry Studio"
[ -d "/Applications/LM Studio.app" ] && echo "✅ LM Studio: installed" || echo "❌ LM Studio"
}安装脚本 (带跳过检测):
install_vibe_coding() {
echo "=== Installing Vibe Coding Tools ==="
# Claude Code
if ! command -v claude &>/dev/null; then
echo "📦 Installing Claude Code..."
brew install --cask claude-code
else
echo "⏭️ Claude Code already installed, skipping"
fi
# CCometixLine (requires Node.js)
if ! command -v ccline &>/dev/null; then
if command -v npm &>/dev/null; then
echo "📦 Installing CCometixLine..."
npm install -g @cometix/ccline
else
echo "⚠️ CCometixLine requires Node.js, install fnm/node first"
fi
else
echo "⏭️ CCometixLine already installed, skipping"
fi
# Cursor
if [ ! -d "/Applications/Cursor.app" ]; then
echo "📦 Installing Cursor..."
brew install --cask cursor
else
echo "⏭️ Cursor already installed, skipping"
fi
# OpenCode
if ! command -v opencode &>/dev/null; then
echo "📦 Installing OpenCode..."
brew install opencode
else
echo "⏭️ OpenCode already installed, skipping"
fi
# Cherry Studio
if [ ! -d "/Applications/Cherry Studio.app" ]; then
echo "📦 Installing Cherry Studio..."
brew install --cask cherry-studio
else
echo "⏭️ Cherry Studio already installed, skipping"
fi
}Claude Code 配置:
# 方式 1: Homebrew (推荐)
brew install --cask claude-code
# 方式 2: 原生安装脚本
curl -fsSL https://claude.ai/install.sh | bash
# 登录认证
claude login
# 启动
claudeCCometixLine 配置 (Claude Code Statusline):
# 安装 (需要 Node.js)
npm install -g @cometix/ccline
# 配置 Claude Code settings.json
# 位置: ~/.claude/settings.json
{
"statusLine": {
"type": "command",
"command": "ccline",
"padding": 0
}
}
# 或使用 ccline 自带的 TUI 配置
ccline configCCometixLine 功能: Git 分支状态、Claude 模型名称、上下文使用率、工作目录显示
OpenCode 配置:
# 安装
brew install opencode
# 配置 (~/.opencode/config.yaml)
default_model: anthropic/claude-sonnet-4-20250514
providers:
anthropic:
api_key: ${ANTHROPIC_API_KEY}Cherry Studio 配置:
# 安装
brew install --cask cherry-studio
# 启动后在 UI 中配置 API Keys---
Fonts
Programming Fonts
| Font | Description | Command |
|---|---|---|
| JetBrains Mono | Monospace | brew install --cask font-jetbrains-mono |
| JetBrains Mono Nerd | With icons | brew install --cask font-jetbrains-mono-nerd-font |
| Fira Code | Ligatures | brew install --cask font-fira-code |
| Fira Code Nerd | With icons | brew install --cask font-fira-code-nerd-font |
| Hack Nerd Font | Terminal | brew install --cask font-hack-nerd-font |
| Meslo LG Nerd | Powerline | brew install --cask font-meslo-lg-nerd-font |
UI Fonts
| Font | Description | Command |
|---|---|---|
| Inter | UI font | brew install --cask font-inter |
| Noto Sans CJK SC | Chinese | brew install --cask font-noto-sans-cjk-sc |
---
Zsh Plugins
| Plugin | Description | Install |
|---|---|---|
| zsh-autosuggestions | Command suggestions | git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions |
| zsh-syntax-highlighting | Syntax colors | git clone https://github.com/zsh-users/zsh-syntax-highlighting ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting |
---
macOS Defaults
Dock
# Hide recent apps
defaults write com.apple.dock show-recents -bool false
# Faster animations
defaults write com.apple.dock autohide-delay -float 0
defaults write com.apple.dock autohide-time-modifier -float 0.3
# Set icon size
defaults write com.apple.dock tilesize -int 48
# Apply
killall DockKeyboard
# Faster key repeat
defaults write NSGlobalDomain KeyRepeat -int 2
defaults write NSGlobalDomain InitialKeyRepeat -int 15
# Disable auto-correct
defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false
defaults write NSGlobalDomain NSAutomaticCapitalizationEnabled -bool false
defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false
defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false
# Disable press-and-hold
defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool falseFinder
# Show hidden files
defaults write com.apple.finder AppleShowAllFiles -bool true
# Show all extensions
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
# Show path bar
defaults write com.apple.finder ShowPathbar -bool true
# Show status bar
defaults write com.apple.finder ShowStatusBar -bool true
# Apply
killall FinderScreenshots
# Save to folder
mkdir -p ~/Pictures/Screenshots
defaults write com.apple.screencapture location ~/Pictures/Screenshots
# PNG format
defaults write com.apple.screencapture type -string "png"
# Disable shadow
defaults write com.apple.screencapture disable-shadow -bool true
# Apply
killall SystemUIServer---
Detection Scripts
Check if package is installed
# Brew formula
brew list <package> &>/dev/null && echo "installed" || echo "not installed"
# Brew cask
brew list --cask <package> &>/dev/null && echo "installed" || echo "not installed"
# Command
command -v <cmd> &>/dev/null && echo "installed" || echo "not installed"
# App
[ -d "/Applications/<App>.app" ] && echo "installed" || echo "not installed"Full detection script
#!/bin/bash
# detect-installed.sh
echo "=== Checking installed packages ==="
check_cmd() {
command -v "$1" &>/dev/null && echo "✅ $1" || echo "❌ $1"
}
check_app() {
[ -d "/Applications/$1.app" ] && echo "✅ $1" || echo "❌ $1"
}
echo "--- CLI Tools ---"
check_cmd git
check_cmd gh
check_cmd delta
check_cmd starship
check_cmd eza
check_cmd bat
check_cmd fd
check_cmd rg
echo "--- Languages ---"
check_cmd fnm
check_cmd node
check_cmd pnpm
check_cmd uv
check_cmd python3
check_cmd goenv
check_cmd go
echo "--- Container ---"
check_cmd docker
check_cmd kubectl
check_cmd helm
check_cmd k9s
echo "--- Applications ---"
check_app "Raycast"
check_app "Warp"
check_app "Cursor"
check_app "Visual Studio Code"
check_app "OrbStack"macOS Setup Presets
Pre-configured development environment profiles for different roles
Available Presets
| Preset | Target Role | Languages | Apps | Time |
|---|---|---|---|---|
fullstack | Fullstack Developer | JS/TS, Python | Full suite | ~20min |
frontend | Frontend Developer | JS/TS | Design-focused | ~15min |
backend | Backend Developer | Go, Python | API/Infra tools | ~18min |
data | Data/ML Engineer | Python | Jupyter, ML libs | ~15min |
devops | DevOps Engineer | Go, Python | K8s, Terraform | ~20min |
minimal | Quick Start | None | Core only | ~8min |
---
fullstack
Target: Fullstack Developer working with modern web stacks
CLI Tools
brew install git gh delta starship
brew install eza bat fd ripgrep sd dust procs bottom
brew install tree wget curl jq yq
brew install shellcheckLanguages
# Node.js
brew install fnm
fnm install --lts
fnm default lts-latest
npm install -g pnpm
# Python
brew install uv
uv python install 3.12Container & K8s
brew install kubectl helm k9s stern
brew tap danielfoehrkn/switch
brew install danielfoehrkn/switch/switchApplications
brew install --cask raycast
brew install --cask warp
brew install --cask cursor
brew install --cask claude-code
brew install --cask visual-studio-code
brew install --cask orbstack
brew install --cask sourcetree
brew install --cask notionFonts
brew install --cask font-jetbrains-mono-nerd-font
brew install --cask font-fira-code
brew install --cask font-interShell Enhancement
- Oh-My-Zsh plugins: git, kubectl, zsh-autosuggestions, zsh-syntax-highlighting
- Starship prompt
- Modern CLI aliases (eza, bat)
macOS Optimization
- Dock: hide recent apps
- Keyboard: faster repeat, disable auto-correct
---
frontend
Target: Frontend Developer focused on UI/UX
CLI Tools
brew install git gh delta starship
brew install eza bat fd ripgrep
brew install tree wget curl jqLanguages
# Node.js only
brew install fnm
fnm install --lts
fnm default lts-latest
npm install -g pnpmContainer (Optional)
# Basic Docker only
brew install --cask orbstackApplications
brew install --cask raycast
brew install --cask cursor
brew install --cask claude-code
brew install --cask visual-studio-code
brew install --cask iina
brew install --cask imageoptimFonts
brew install --cask font-jetbrains-mono-nerd-font
brew install --cask font-fira-code
brew install --cask font-inter
brew install --cask font-noto-sans-cjk-scShell Enhancement
- Oh-My-Zsh plugins: git, zsh-autosuggestions, zsh-syntax-highlighting
- Starship prompt
macOS Optimization
- Dock: hide recent apps
- Keyboard: faster repeat
---
backend
Target: Backend Developer building APIs and services
CLI Tools
brew install git gh delta starship
brew install eza bat fd ripgrep sd dust procs bottom
brew install tree wget curl jq yq
brew install shellcheck golangci-lintLanguages
# Go
brew install goenv go
# Install latest stable Go version
LATEST_GO=$(goenv install -l | grep -E '^\s*[0-9]+\.[0-9]+\.[0-9]+$' | tail -1 | tr -d ' ')
goenv install "$LATEST_GO"
goenv global "$LATEST_GO"
# Python
brew install uv
uv python install 3.12Container & K8s
brew install kubectl helm k9s stern
brew tap danielfoehrkn/switch
brew install danielfoehrkn/switch/switch
brew install awscli rcloneApplications
brew install --cask raycast
brew install --cask warp
brew install --cask cursor
brew install --cask claude-code
brew install --cask orbstack
brew install --cask sourcetreeFonts
brew install --cask font-jetbrains-mono-nerd-font
brew install --cask font-fira-codeShell Enhancement
- Oh-My-Zsh plugins: git, kubectl, zsh-autosuggestions, zsh-syntax-highlighting
- Starship prompt
- Go development aliases
macOS Optimization
- Dock: hide recent apps, faster animations
- Keyboard: faster repeat, disable auto-correct
- Finder: show hidden files, path bar
---
data
Target: Data/ML Engineer working with Python and notebooks
CLI Tools
brew install git gh delta starship
brew install eza bat fd ripgrep
brew install tree wget curl jq yqLanguages
# Python (primary)
brew install uv
uv python install 3.11
uv python install 3.12
# Node.js (for Jupyter extensions)
brew install fnm
fnm install --lts
fnm default lts-latestContainer
# Docker for ML containers
brew install --cask orbstackApplications
brew install --cask raycast
brew install --cask cursor
brew install --cask claude-code
brew install --cask visual-studio-codePython ML Stack (via uv)
# Create ML environment
uv venv ~/.venvs/ml
source ~/.venvs/ml/bin/activate
uv pip install jupyter pandas numpy scipy matplotlib seaborn scikit-learnFonts
brew install --cask font-jetbrains-mono-nerd-font
brew install --cask font-fira-codeShell Enhancement
- Oh-My-Zsh plugins: git, zsh-autosuggestions, zsh-syntax-highlighting
- Python environment management
macOS Optimization
- Keyboard: faster repeat
---
devops
Target: DevOps/Platform Engineer managing infrastructure
CLI Tools
brew install git gh delta starship
brew install eza bat fd ripgrep sd dust procs bottom
brew install tree wget curl jq yq
brew install shellcheckLanguages
# Go (for tooling)
brew install goenv go
# Python (for automation)
brew install uv
uv python install 3.12Container & K8s (Full)
brew install kubectl helm k9s stern
brew tap danielfoehrkn/switch
brew install danielfoehrkn/switch/switch
# Cloud CLIs
brew install awscli
# brew install google-cloud-sdk # Optional, large
# brew install azure-cli # Optional
brew install rcloneInfrastructure Tools
# Terraform (optional)
# brew install terraform
# Ansible (optional)
# brew install ansibleApplications
brew install --cask raycast
brew install --cask warp
brew install --cask cursor
brew install --cask claude-code
brew install --cask orbstack
brew install --cask sourcetreeFonts
brew install --cask font-jetbrains-mono-nerd-fontShell Enhancement
- Oh-My-Zsh plugins: git, kubectl, aws, zsh-autosuggestions, zsh-syntax-highlighting
- kubeswitch for context management
- Starship with K8s context display
macOS Optimization
- Dock: hide recent apps, faster animations
- Keyboard: faster repeat, disable auto-correct
- Finder: show hidden files, path bar
---
minimal
Target: Quick start with essential tools only
CLI Tools
brew install git gh starship
brew install eza bat fd ripgrepApplications
brew install --cask raycast
brew install --cask warp
brew install --cask cursor
brew install --cask claude-codeFonts
brew install --cask font-jetbrains-mono-nerd-fontShell Enhancement
- Oh-My-Zsh plugins: git, zsh-autosuggestions, zsh-syntax-highlighting
- Starship prompt
macOS Optimization
- Dock: hide recent apps
---
Custom Preset
Create your own preset by combining options:
# Example: my-preset.yaml
name: My Custom Setup
extends: minimal # Optional base preset
cli:
- git
- gh
- delta
- starship
- eza
- bat
- fd
- ripgrep
languages:
nodejs: true # fnm + pnpm
python: true # uv
go: false
rust: false
containers:
docker: true
kubernetes: false
apps:
- raycast
- warp
- cursor
fonts:
- font-jetbrains-mono-nerd-font
macos:
dock:
show_recents: false
keyboard:
key_repeat: 2
initial_repeat: 15
auto_correct: false---
Usage
# Use a preset
/new-macos-setup --preset fullstack
# Preview preset without installing
/new-macos-setup --preset backend --dry-run
# Combine preset with modifications
/new-macos-setup --preset minimal
# Then answer additional questions to customize