Skip to content

encoreshao/setup-scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧰 setup-scripts

A cross-platform setup toolkit for developers. Supports macOS, Linux, and WSL environments.


🚀 Quick Start

Clone the repo and run the bootstrap script:

git clone https://github.com/encoreshao/setup-scripts.git
cd setup-scripts
bash bootstrap.sh

This 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

📁 Repository Structure

➜  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 files

💡 Add-ons

These scripts are modular — you can add more .sh files in their respective folders and bootstrap.sh will pick them up automatically.

Git Add-ons

  • setup-git-config.sh — configure global git aliases and basic settings
  • setup-hooks.sh — example pre-commit hook to enforce coding rules

Shell Add-ons

  • setup-shell-aliases.sh — sets common shell aliases for convenience
  • setup-zsh-theme.sh — install Oh My Zsh and set your preferred theme

System Add-ons

  • 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)

⚡ Usage Examples

Run all scripts at once:

bash bootstrap.sh

Run individual scripts if needed:

bash git/setup-git-config.sh
bash shell/setup-shell-aliases.sh
bash system/install-node.sh

🧠 Extend

  1. Add any new .sh script to:

    • git/ for Git-related scripts
    • shell/ for shell environment tools
    • system/ for OS-level utilities
  2. The next time you run bootstrap.sh, all scripts in these folders will run automatically.


🔧 Notes

  • On macOS, setup-macos.sh will handle Homebrew, dev tools, and optional apps.
  • On Linux, setup-system.sh detects apt or yum and installs core packages.
  • Zsh users: after running setup-zsh-theme.sh, restart your terminal or run source ~/.zshrc.

About

A cross-platform setup toolkit for developers. Supports macOS, Linux, and WSL environments.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages