An extremely opinionated set of Zsh scripts, app configs, and their setup, that I rely on on macOS & brew for general computing and web development...
The repo is split into:
- Environment setup
- Inlined aliases
- Functioned commands
- Full script files
- Linked app configs (
configs/)
-
Keep this repo at a stable path (example):
~/Code/Scripts/CLI_MACOS_dot-zsh -
Install dependencies via Homebrew (see Dependencies):
brew bundle --file ~/Code/Scripts/CLI_MACOS_dot-zsh/Brewfile -
Source all command layers in your
~/.zshrc:DOTZSH="$HOME/Code/Scripts/CLI_MACOS_dot-zsh" [ -f "$DOTZSH/.zsh_env" ] && source "$DOTZSH/.zsh_env" [ -f "$DOTZSH/.zsh_aliases" ] && source "$DOTZSH/.zsh_aliases" [ -f "$DOTZSH/.zsh_functions" ] && source "$DOTZSH/.zsh_functions" [ -f "$DOTZSH/.zsh_scripts" ] && source "$DOTZSH/.zsh_scripts" unset DOTZSH
[!CAUTION] Watch out for the spacing needed for Github README when you copy!
-
Ensure script files are executable:
chmod +x ~/Code/Scripts/CLI_MACOS_dot-zsh/scripts/*.sh
-
Symlink the app configs you want (see Linked App Configs). Example (
mise):mv ~/.config/mise ~/Code/Scripts/CLI_MACOS_dot-zsh/configs/mise ln -s ~/Code/Scripts/CLI_MACOS_dot-zsh/configs/mise ~/.config/mise
-
Reload shell:
source ~/.zshrc
mise: runtime manager fornode/php/pnpm/python/etc. Install viacurl https://mise.jdx.dev/install.sh | sh— not Homebrew, which installs to the wrong path for.zsh_env's activation line.rustup: Rust toolchain manager. Install viacurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh— not Homebrew. Rust itself is normally pinned per-project as a mise tool (rust = "<version>"in the repo's.mise.toml), but mise's rust backend resolves through an existing rustup install, and rustup remains the documented fallback when mise isn't available. It owns~/.cargo+~/.rustupand appends. "$HOME/.cargo/env"to~/.zshenv(the one PATH line this repo doesn't hold, since it must apply to non-interactive shells too).- Claude Code: install via the native installer,
curl -fsSL https://claude.ai/install.sh | bash— not Homebrew. It lands as an auto-updating~/.local/bin/claude(.zsh_envprepends that dir toPATH); the Homebrew cask lags behind it. Codex stays a cask in the Brewfile. Both run inside Orca, which injects its own hooks intoconfigs/claude/settings.jsonand~/.codex/hooks.json. specify-cli: Spec Kit's CLI, used by the Rust/Laravel workspaces'.specify/trees. Auvtool on this machine, not a project dependency:uv tool install specify-cli.sccache: shared Rust compile cache..zsh_envexportsRUSTC_WRAPPER=sccacheonly when the binary exists, so cargo never breaks without it; the Rust workspaces forceCARGO_INCREMENTAL=0, which is exactly the case sccache helps.- Language servers for Claude Code's LSP plugins (
typescript-lsp,php-lsp,rust-analyzer-lspfrom the official marketplace) —typescript-language-server,typescript,intelephense— are mise global tools (npm:backend inconfigs/mise/config.toml), not Homebrew;rust-analyzercomes with rustup. just: command runner for theJustfilerecipes Rust/Node workspaces use (just build,just test,just lint). In the Brewfile — don'tcargo installit, or you end up with a second copy in~/.cargo/bin.cmake+ninja: native build toolchain for Rust/Tauri workspaces that compile C/C++ dependencies.actionlint: static analysis for GitHub Actions workflows.nasm: assembler some Rust crates' build scripts need.- Windows cross-builds (NSIS installers from macOS):
llvm(clang-cl,llvm-rc,llvm-ar),lld(lld-link), andmakensis, driven bycargo-xwin— a cargo tool,cargo install --locked cargo-xwin, not a formula. Homebrew keepsllvmoffPATHso Apple's clang stays the default; build scripts prependbrew --prefix llvmthemselves. llama.cpp: local model provider (llama-server,llama-cli).ocrmypdf+tesseract: OCR tooling for PDF fixtures and comparisons.flyctl: Fly.io deploys.scrcpy+android-platform-tools(adb): Android phone mirroring over USB or Wi-Fi. This is the only mobile tooling kept; the SDK/NDK/JDK/Xcode toolchain is parked in ARCHIVE.md.adb's pairing keys live in~/.android.ffmpeg: powers thevid-*scripts.aria2: powersdownload.- Some CLI tooling used by the shell and coding-agent workflow...
python3+openpyxl: forunicode-csv(auto-installsopenpyxl).OrbStack: Docker engine and Compose runtime for the Harnesser and sightmark Docker setups.imagemagick: native library used when the mise PHP source build installsimagick/imagickthrough PIE.- Window manager stack (install docs): Karabiner-Elements, yabai, skhd, SketchyBar, Hammerspoon (SketchyBar requirement) — fonts/icons: Hack Nerd Font, SF Symbols.
Everything above except mise, rustup, Claude Code, specify-cli, and language-level packages is covered by brew bundle --file Brewfile.
[!NOTE]
scripts/*.shkeep#!/usr/bin/env bashshebangs and run fine on macOS's stock bash 3.2 — they're separate processes, unaffected by your login shell.
Sourced first — activates tool managers, sets env vars the other layers may need.
mise activate zsh$HOME/.composer/vendor/binonPATHfor global Composer tools such aslaravel/installer(composer global require laravel/installeronce mise PHP is available)compinit(loads completions, including OrbStack's, added tofpathby~/.zprofile)
Direct aliases, no function wrapper.
logout: logs out viaosascript.reboot: confirms, thensudo reboot.update: Homebrew update/upgrade/cleanup, thensoftwareupdate -l.
oops: pull current branch with rebase fromorigin/<current-branch>.chest: stash including untracked files (git stash push -u).grit: mergeorigin/devusing-X theirsstrategy option.maiv: hard reset toorigin/mainthen force-push with lease.nometa: disable executable-bit tracking (core.fileMode false).
Warning
maiv is destructive (git reset --hard + force push). Use only to intentionally discard local divergence.
codex:codex --yolo.clodex:claude --dangerously-skip-permissions.
Real shell functions for argument-aware or multi-step behavior.
own [path]: recursivechownto current user/group (defaults to current directory).shutdown [args...]: confirms, thensudo shutdown "$@".wholecleanup: empties Trash, cleans Homebrew/npm/pnpm caches, clears Helium browser cache, deletes leftover installers in~/Downloads. Prints disk usage before/after.
girm <path>:git rm -r --cachedfor tracked file/dir untracking.oopsie: pull-rebase current branch, rebase ontoorigin/main, then force-push with lease.
Tip
Use oops when your push is rejected because the remote branch moved. Use oopsie when your branch is stale against main and needs a clean rebase before a PR — it rewrites history, so avoid it on shared branches.
download <url...>:aria2cwith aggressive segmented download flags.
Aliases to standalone scripts, resolved relative to $HOME/Code/Scripts/CLI_MACOS_dot-zsh/scripts.
aranum: convert Western digits <-> Arabic-Indic digits.- Example:
aranum 1234->١٢٣٤
- Example:
arastrip: removes harakat/combining marks and normalizesٱtoا.- Example:
arastrip "أَيُّ سَمَاءٍ تُظِلُّنِي، أَوْ أَيُّ أَرْضٍ تُقِلُّنِي، إِنْ أَنَا قُلْتُ فِي كِتابِ اللَّهِ مَا لَا أَعْلَمُ؟"->أي سماء تظلني، أو أي أرض تقلني، إن أنا قلت في كتاب الله ما لا أعلم؟
- Example:
vid-combine <file1..|list.txt> <output.mp4>: concatenates clips with timestamp normalization.vid-compress [-1080|-720] [-lq] <input> [output]: H.265 compression with optional downscale and lower quality mode.vid-eq-audio <input> [output]: denoise/EQ/loudness-normalized audio track.vid-extract-audio <input> [start] [end] [output.mp3]: extracts audio (supports flexible timestamps).vid-extract-video <input> [start] [end] [output.mp4]: extracts video segment with re-encode.vid-pic <file|dir> [output_dir]: robust thumbnail generator with fallback strategies.vid-trim <input> [start] [end] [output]: trims with inclusive end handling and safe output flags.
unicode-csv <folder|file.csv>: CSV -> XLSX converter (auto-detects encoding/delimiter, RTL sheet formatting).anyurl <url>: strips protocol,www., and trailing slash.
Real config files for a few apps live under configs/; their actual system paths are replaced with symlinks pointing back here, so this repo stays the single source of truth. Apps whose config directory only holds harmless local cruft (backups, caches) get the whole folder symlinked, with that cruft gitignored. Apps whose directory holds live credentials or session data (.codex, .claude) get only the one specific file linked, so that data never enters the repo at all.
| App | Install | Symlinked as |
|---|---|---|
| Karabiner-Elements | in Brewfile | ~/.config/karabiner -> configs/karabiner |
| yabai | in Brewfile | ~/.config/yabai -> configs/yabai |
| skhd | in Brewfile | ~/.skhdrc -> configs/skhd/skhdrc |
| SketchyBar | in Brewfile | ~/.config/sketchybar -> configs/sketchybar |
| mise | curl https://mise.jdx.dev/install.sh | sh (not in Brewfile) |
~/.config/mise -> configs/mise |
| Codex CLI | in Brewfile | ~/.codex/config.toml only |
| Claude Code | native installer (not in Brewfile) | ~/.claude/settings.json only |
| Git | ships with Xcode Command Line Tools | ~/.gitconfig -> configs/git/gitconfig |
| Hammerspoon | in Brewfile | ~/.hammerspoon/init.lua + sketchybar-scroll.lua only |
| OBS | in Brewfile | ~/Library/Application Support/obs-studio -> configs/obs (only scenes, profiles, and user.ini are tracked) |
| Agent skills | npx skills |
~/.agents/.skill-lock.json -> configs/agents/skill-lock.json |
Two more aren't symlinks, because macOS's preferences system replaces linked plists:
- AltTab:
configs/alt-tab/sync.sh exportsaves its settings toconfigs/alt-tab/settings.plist;sync.sh importapplies them (quits and relaunches AltTab). - macOS system settings:
configs/macos/defaults.shapplies the Dock, Spaces, Stage Manager, menu bar, trackpad, and Finder settings the window-manager setup expects. It also lists the manual steps (SIP, permissions).
To adopt a new machine: install the app, mv the real file/dir into the matching configs/<app>/ path, ln -s it back.
The window-manager setup uses a locally patched SketchyBar for selective click-through and native workspace highlighting. See window-management setup, verification, and rollback.
The rest of my opinionated macOS setup, all in the Brewfile except Orca and Hush (installed from their GitHub releases). Apps I uninstalled only to free disk space are parked in ARCHIVE.md.
- Karabiner-Elements
- yabai
- SketchyBar
- Hammerspoon
- Raycast
- AltTab
- Pearcleaner
- DaisyDisk
- Hush
- Caffeine
- Macshot
- Tailscale
- Sloth
- Helium
- FFmpeg
- Codex
- Claude Code
- Orca
- Adhan Time
- Hijri Converter
- Arabic Helpers
- Change Case
- Lorem Ipsum
- Ruler
- Color Picker
- Image Modification
- QR Code Scanner
- Brew
- Mole
- Tailwind CSS
- Kill Process
- App Cleaner