Automated setup for a macOS dev machine. Run individual scripts or everything at once.
# Install Xcode Command Line Tools first
xcode-select --install
# Clone and run
git clone https://github.com/mohsen1/osx_dev_setup.git
cd osx_dev_setup
chmod +x setup.sh scripts/*.sh
./setup.sh all./setup.sh brew # Homebrew + formulae + casks
./setup.sh macos # macOS system preferences
./setup.sh fish # Fish shell + Fisher + bobthefish
./setup.sh git # Git global config
./setup.sh ssh # SSH keygen + GitHub upload via gh
./setup.sh node # Volta + Node.js + pnpm + yarn
./setup.sh python # uv + Python
./setup.sh rust # Rustup + rust-analyzer + clippy
./setup.sh neovim # Neovim + LazyVim + language extras
./setup.sh ai-tools # Claude Code, Codex CLI, OllamaOr combine: ./setup.sh brew git ssh
Core tools: git, gh, coreutils, gnu-sed, fzf, fd, bat, ripgrep, tree, tmux, cloc, hyperfine
Editors: neovim, macvim, vifm
Languages & runtimes:
- Node.js via Volta — pnpm, yarn
- Rust via rustup — rust-analyzer, clippy, rustfmt, wasm-pack
- Python via uv — fast package manager + Python installer
- Deno — TypeScript runtime
Containers: docker, docker-compose, OrbStack
Cloud & networking: cloudflared, tailscale, azure-cli, gcloud-cli
AI tools: Claude Code, Codex CLI, ollama
Other: diff-so-fancy, git-filter-repo, ffmpeg, yt-dlp, yek, caffeine, keycastr
- Fish shell as default shell
- Fisher plugin manager
- fzf.fish — fuzzy search for files, history, git
- Oh My Fish + bobthefish theme
- Source Code Pro for Powerline font
diff-so-fancyas pager with colored moved-line detection- SSH hardening (timeout, keepalive)
- Aliases:
git l(graph log),git st,git co - Auto PR ref fetching (
git fetchpulls PR branches) push.autoSetupRemotefor easy branch pushing
- Ed25519 key generation (replaces RSA — shorter, faster, more secure)
- Automatic upload to GitHub via
gh ssh-key add - macOS Keychain integration (
AddKeysToAgent,UseKeychain) - GitHub SSH over port 443 (works on restrictive networks)
- Connectivity verification
- LazyVim distribution — batteries-included Neovim config
- LSP via mason.nvim — auto-installs language servers
- Completion via blink.cmp — fast, fuzzy
- Treesitter — syntax highlighting, text objects
- Telescope — fuzzy file/grep/symbol search
- Pre-configured extras: TypeScript, Rust, Python, JSON, YAML, TOML, Markdown
vim/vialiased tonvimin fish
- Dock: autohide, size 72, no recents, no launch animation
- Finder: show hidden files, all extensions, path bar, status bar, POSIX title path
- Keyboard: fast repeat (2/15), disable auto-correct/capitalize/smart quotes
- Trackpad: three-finger drag, tap to click
- Screenshots: save to
~/Screenshots, PNG, no shadow - Misc: no quarantine dialog, expand save/print panels, no .DS_Store on network/USB
These steps require a password or interactive input and must be done manually:
- Set fish as default shell:
echo /opt/homebrew/bin/fish | sudo tee -a /etc/shells chsh -s /opt/homebrew/bin/fish
- Upload SSH key to GitHub (if the script couldn't due to missing scope):
gh auth refresh -h github.com -s admin:public_key gh auth setup-git
- Restart terminal to activate fish shell
- Run
nvimonce — plugins auto-install on first launch - Authenticate CLI tools:
claude # follow prompts for Anthropic auth gh auth login # if not done during SSH setup
- Set API keys in
~/.config/fish/config.fish:set -gx OPENAI_API_KEY "..."
- Download Codex desktop app from openai.com/index/codex
- Start Tailscale: open the Tailscale menu bar app or
tailscale up
Each script in scripts/ is standalone and idempotent — safe to re-run. Edit them to match your preferences before running.