A cross-platform setup toolkit for developers. Supports macOS, Linux, and WSL environments.
Clone the repo and run the bootstrap script:
git clone https://github.com/encoreshao/setup-scripts.git
cd setup-scripts
bash bootstrap.shThis will automatically run all setup scripts in the git/, shell/, and system/ folders.
Or you can simply copy and paste it anywhere to run.
bash -c "$(curl -fsSL https://raw.githubusercontent.com/encoreshao/setup-scripts/main/git/setup-git-config.sh)"
=== Setting up Git global configuration ===
Enter your Git username: Encore
Enter your Git email: encore.shao@gmail.com
✅ Git config setup complete
user.name=Encore
user.email=encore.shao@gmail.com
core.editor=vim
color.ui=auto
init.defaultbranch=main
pull.rebase=false
push.default=simple
diff.tool=vimdiff
alias.co=checkout
alias.br=branch
alias.ci=commit
alias.st=status
alias.last=log -1 HEAD
alias.unstage=reset HEAD --
alias.lg=log --oneline --graph --decorate --all
alias.undo=reset --soft HEAD~1
alias.amend=commit --amend --no-edit
alias.tags=tag -l
alias.remotes=remote -v➜ setup-scripts git:(main) ✗ tree -I 'node_modules|build'
.
├── bootstrap.sh
├── git
│ ├── setup-git-config.sh
│ └── setup-hooks.sh
├── install.sh
├── README.md
├── shell
│ ├── setup-shell-aliases.sh
│ └── setup-zsh-theme.sh
└── system
├── install-node.sh
├── setup-macos.sh
└── setup-system.sh
4 directories, 10 filesThese scripts are modular — you can add more .sh files in their respective folders and bootstrap.sh will pick them up automatically.
setup-git-config.sh— configure global git aliases and basic settingssetup-hooks.sh— example pre-commit hook to enforce coding rules
setup-shell-aliases.sh— sets common shell aliases for conveniencesetup-zsh-theme.sh— install Oh My Zsh and set your preferred theme
setup-system.sh— install basic system packages (Linux/WSL)setup-macos.sh— macOS-specific setup (Xcode CLI, Homebrew, dev tools)install-node.sh— install Node.js (cross-platform)
Run all scripts at once:
bash bootstrap.shRun individual scripts if needed:
bash git/setup-git-config.sh
bash shell/setup-shell-aliases.sh
bash system/install-node.sh-
Add any new
.shscript to:git/for Git-related scriptsshell/for shell environment toolssystem/for OS-level utilities
-
The next time you run
bootstrap.sh, all scripts in these folders will run automatically.
- On macOS,
setup-macos.shwill handle Homebrew, dev tools, and optional apps. - On Linux,
setup-system.shdetects apt or yum and installs core packages. - Zsh users: after running
setup-zsh-theme.sh, restart your terminal or runsource ~/.zshrc.