This repository contains an opinionated setup for an Apple M1 Pro (16 GB RAM) on macOS Ventura 13.7.8.
- Bun-first JavaScript toolchain: Bun is installed and used as the package manager/runtime by default.
- Node/npm are optional: they are not installed by default. You can enable Node later only when required by specific projects.
- Go and Rust are first-class runtimes: both are installed globally via
misefor backend/systems development. - Includes foundational machine setup: Xcode CLI Tools, Homebrew, Git defaults, and GitHub CLI auth guidance are covered.
- Idempotent setup: script can be safely re-run.
- Personalized terminal UX: applies a bundled Alacritty config with Catppuccin Mocha theme and sensible defaults.
Before app/tool install, the script handles foundational machine prerequisites:
- Xcode Command Line Tools (
xcode-select --install) because many build tools and Homebrew formulas depend on Apple toolchains. - Homebrew bootstrap + update so package/cask installation works on Apple Silicon (
/opt/homebrew). - Git defaults (global) for practical day-to-day usage:
init.defaultBranch=mainfetch.prune=truepull.rebase=falsecore.editor="code --wait"
- Optional Git identity via environment variables:
GIT_USER_NAMEGIT_USER_EMAIL
Example:
GIT_USER_NAME="Your Name" GIT_USER_EMAIL="you@example.com" ./scripts/setup_macos.shzsh: modern shell with better completion and scripting ergonomics than legacy shells; installed from Homebrew for newer versioning than macOS system zsh.alacritty: GPU-accelerated terminal emulator, fast startup and rendering.visual-studio-code: mainstream IDE/editor for web, backend, and infra workflows.
@anthropic-ai/claude-code: Claude CLI for coding tasks and repo workflows.@openai/codex: Codex CLI for coding assistance and automation.ollama: Ollama is an open-source tool that allows you to run large language models directly on your local computer without relying on cloud services.lm-studio: LM Studio is a desktop application that allows users to run open-source language models locally on their computers without needing internet access.
orbstack: lighter alternative to Docker Desktop for containers/VMs on macOS (optional). Note: docker cask is commented out by default ininstall_casks()but can be enabled if needed.
git: version control.gh: GitHub CLI for PRs/issues/actions.curl/wget: HTTP download/test tooling.jq: JSON parsing/transformation in shell pipelines.fd: faster/simplerfindalternative.fzf: fuzzy finder for interactive shell workflows.tmux: terminal multiplexer for persistent sessions.neovim: modal terminal editor.oh-my-posh: fast cross-shell prompt with customizable segments (Catppuccin Mocha theme).
mise: runtime manager (replaces juggling version managers); used here to pin Bun, Go, and Rust globally.bun: JavaScript runtime, package manager, and task runner.node: JavaScript runtime, package manager, and task runner.go: Go toolchain for backend services, CLIs, and cloud-native software.rust(rustc+cargo): systems and backend language with excellent tooling and performance.
direnv: per-project environment variable loading.pre-commit: git hook framework for lint/format/secret checks.watchman: efficient file watching for large projects.
rectangle: window management shortcuts.1password: credential/secret manager (commented out by default ininstall_casks()but can be enabled if needed).
google-chrome: cross-browser verification.firefoxandzen-browser: commented out by default ininstall_casks()but can be enabled if needed.postman: API development/testing UI.
The setup script automatically deploys config/alacritty/alacritty.toml to ~/.config/alacritty/alacritty.toml.
It includes:
- Catppuccin Mocha color theme (dark, high-contrast but soft palette).
- macOS-friendly window settings (
Buttonlessdecorations, slight opacity, padding, Option-as-Alt). - Editor-friendly defaults (beam cursor, large scrollback, copy selection to clipboard).
- Useful keybindings for new window and font scaling (
⌘N,⌘+,⌘-,⌘0). - Safe overwrite behavior: existing
alacritty.tomlis backed up with a timestamp before applying updates.
If you want to expand beyond the default install set:
lazygit: terminal Git UI for staging/commit/rebase workflows.httpie: cleaner API testing from terminal than rawcurl.hyperfine: benchmark CLI commands/scripts.bat:catwith syntax highlighting and paging.eza: modernlsreplacement.zoxide: smarter directory jumping.pnpm(via Corepack or Bun-compatible workflow): useful for monorepos where teams standardize on pnpm.
Recommended apps:
- Ollama (local LLM runner): easiest way to run models locally on macOS.
- LM Studio (GUI local model manager): simple model download + chat/testing UI.
- n8n (automation workflows): self-hostable automation engine (can run via Docker).
- Open WebUI (local chat UI): browser UI connected to local model runtimes (often paired with Ollama).
This repo now supports optional installation of local-agent base tools:
INSTALL_LOCAL_AGENT_TOOLS=1 ./scripts/setup_macos.sh
brew services start ollama
ollama pull qwen2.5-coder:7bIf you want, I can also add an n8n + Open WebUI Docker Compose profile to this repo.
chmod +x scripts/setup_macos.sh
./scripts/setup_macos.shAfter install:
- Restart terminal session.
- Open Docker Desktop once to finish privileged helper setup.
- Authenticate accounts:
gh auth login
claude login
codex login- Run checks:
brew --version
git --version
mise doctor
mise ls
bun --version
node --version
go version
rustc --version
cargo --version- Verify tools:
zsh --version
alacritty --version
code --version
docker --versionClaude and Codex require Node/npm directly.
mise use -g node@ltsThis keeps the default environment Bun-first while still allowing compatibility when required.
- Script expects Homebrew at
/opt/homebrew(Apple Silicon default). - Bun global installs generally place binaries under
~/.bun/bin; script ensures this path is exported in~/.zshrc. claudeandcodexmay require authentication after installation.- Config files (alacritty, tmux, zsh, karabiner, oh-my-posh) are automatically symlinked from the repo to
~/.config/during setup. - Zsh is configured to auto-start tmux on new terminal sessions; use
TMUX='' zshor set$TMUXto bypass if needed. - Terminal TERM is set to
screen-256colorwhen inside tmux for best compatibility with clear command and other utilities.
These keybindings work globally in Alacritty and don't conflict with tmux/zsh:
| Keybinding | Action |
|---|---|
⌘+ |
Increase font size |
⌘- |
Decrease font size |
⌘0 |
Reset font size to default |
⌘C |
Copy selection |
⌘V |
Paste from clipboard |
All tmux commands use Ctrl+Space as the prefix. Press Ctrl+Space then the key:
| Keybinding | Action |
|---|---|
C-Space h |
Select left pane |
C-Space j |
Select down pane |
C-Space k |
Select up pane |
C-Space l |
Select right pane |
| Keybinding | Action |
|---|---|
C-Space H |
Resize pane left (5 cells) |
C-Space J |
Resize pane down (5 cells) |
C-Space K |
Resize pane up (5 cells) |
C-Space L |
Resize pane right (5 cells) |
| Keybinding | Action |
|---|---|
C-Space c |
Create new window (opens in current path) |
C-Space | |
Split window vertically (current path) |
C-Space - |
Split window horizontally (current path) |
C-Space , |
Rename current window |
C-Space Tab |
Jump to last active window |
C-Space s |
Choose session |
C-Space r |
Reload tmux config file |
| Keybinding | Action |
|---|---|
C-Space [ |
Enter copy mode |
v |
Begin selection (in copy mode) |
y |
Copy selection and exit copy mode (macOS clipboard) |
C-Space p |
Paste from macOS clipboard |
Escape |
Cancel copy mode |
Standard vim keybindings apply. Note: Ctrl+Space is reserved for tmux, so it won't reach vim.
For Dell WK717 keyboards and other external keyboards, Karabiner maps navigation keys to macOS conventions. Configuration is managed in config/karabiner/karabiner.json and automatically symlinked to ~/.config/karabiner/karabiner.json.
Key mappings include:
| Physical Key | Maps To | Behavior |
|---|---|---|
Home |
⌘Left |
Jump to line start |
Home+Shift |
⌘Shift+Left |
Select to line start |
End |
⌘Right |
Jump to line end |
End+Shift |
⌘Shift+Right |
Select to line end |
Page Up |
Option+Up |
Page up |
Page Down |
Option+Down |
Page down |
Ctrl+Home |
⌘Up |
Jump to document start |
Ctrl+End |
⌘Down |
Jump to document end |
- Alacritty opens → launches a new terminal instance
- Zsh initializes → automatically starts/attaches to tmux session named
main - Tmux session active → you can now use all
C-Spaceprefix commands
To manually manage tmux sessions:
# List sessions
tmux list-sessions
# Create named session
tmux new-session -s work
# Attach to session
tmux attach -t main
# Kill session
tmux kill-session -t main- Alacritty keybindings use
⌘(Command) modifier → won't trigger in app - Tmux prefix is
C-Space(Ctrl+Space) → doesn't overlap with terminal emulator or vim - Karabiner only affects external keyboards, not built-in MacBook keyboard