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