Set up a production-ready development environment in one command.
Help me to quickly get started with a consistent and efficient development environment on macOS.
The project depends on the following components:
- Homebrew: A package manager for macOS that simplifies the installation of software and tools.
- gh: The GitHub CLI tool that allows you to interact with GitHub from the command line.
- chezmoi: A dotfile manager that helps you manage your configuration files across multiple machines.
Other components should be installed in macOS by default, such as git, zsh, and curl.
The installation process is automated using a shell script:
-
Promt me to enter my username, email address and hostname, which will be used for SSH key generation and git configuration.
-
The script checks for the presence of
Homebrewand installs it if it's not already installed. -
It then uses
Homebrewto installghandchezmoi. -
Check
ghauthentication status:- If authenticated, it proceeds to the next step.
- If not authenticated, it prompts me to authenticate with GitHub using
gh auth login --skip-ssh-key.
-
Check SSH connection, generate an new ssh key (using
ed25519algorithm) and upload it to GitHub if connection fails. -
Clone the private dotfiles repository using
chezmoiand apply the configuration. Thedotfilesrepository should contain all the necessary configuration files, after configuration files are applied, the after-applied script will be executed bychezmoito install additional tools and perform any necessary setup.(Note: The
dotfilesrepository must be private and the user must have access to it for the script to work properly.)
When all steps are completed, I will have a fully set up development environment with all the necessary tools and configurations in place.
Run the following command in your terminal to execute the installation script:
curl -sL https://raw.githubusercontent.com/ShaneHeX/Setup/main/install.sh | bashThis project is licensed under the MIT License. See the LICENSE file for details.