The personal macOS installer script of Karim Benbourenane. For both fun and profit. A quick way to prepare a fresh machine to have all the tools of the trade as well as personal artifacts, the way I like it.
Paste the following commands into a macOS Terminal to run the installer.
BASE_URI="https://raw.githubusercontent.com/karimbenbourenane/macos-installer"
/bin/sh -c "$(curl -fsSL ${BASE_URI}/master/configurator)"The configurator script does some heavy lifting in setting up a new machine.
In order, it:
- Installs the
chezmoidotfile manager - Initializes
chezmoiusing the dotfile repository of a namedgithubuser- The
dotfilesrepository is not public
- The
- Pulls down and stages all the latest dotfiles in that repository
- Includes configuration for
Homebrewbrew bundles viaBrewfile - Includes configuration for
vim-plugvim plugin manager viavimrc - Includes configuration for several other things like ssh, git, and gpg
- Includes configuration for
- Creates folder structure for XDG Base Directory Specification
- Installs the
Oh My Zshterminal framework forzsh - Installs the
Homebrewpackage manager formacOS - Installs all
Homebrewbundles inBrewfile - Installs local commonly used scripts
configurator- The script itselfedit- Use an environment-appropriate text editorgit-multi- Run git commands on multiple repositories at onceupdate- Keep everything installed by theconfiguratorup to datepycharm- Launch PyCharm usingopeninstead of the included binary
- Installs
vim-plugand vim plugins invimrc - Installs
GitHub Copilotfor command line
No. Well, maybe, but probably not.
If you're reading this, and you're not me, the configurator script may be of
little value to you. It requires access to a private dotfiles repository for
the user specified that I believe needs to be set up in the way chezmoi
expects. This project is opinionated with a heavy bias to myself, and I've set
it up so that I can quickly bootstrap a new machine (the way I like it) at a
moments notice by running a single command.
Because I wanted to create the most brain-dead way of setting up a new development machine, and preparing this script to be used at a moments notice was the path of least resistance. It's accessible from the internet no matter where I am in the world and I don't have to worry about misplacing my USB drive. I didn't write this for you, I wrote it so I wouldn't forget how to run this in the future.
You may want to answer some questions first:
- Are you a developer that uses
macOS? - Are you a frequent user of
Homebrewfor package management? - Do you already use or plan to use
chezmoifor versioning your dotfiles? - Do you like strictly adhering to the
XDG Base Directory Specificationfor config, data, runtime, and other directories? - Are you a
vi/vimminimalist that uses onlyvim-plugfor managing your plugins? - Do you use
brew-bundleand keep your list of installed software tucked inside aBrewfile? - Do you also happen to regularly use
PyCharm? - Is
zshyour primary shell and do you want or need to useOh My Zsh? - Do you want or need
GitHub Copilotto be installed on your system?
If you answered "yes" to all of these questions, could you please email me or leave a voicemail as a courtesy? I'd like to have enough time to find a good hiding place before my doppelgänger comes to exterminate me.
Also, if you answered "yes", you can use this configurator the same way I
would, just by inputting your GitHub credentials when prompted. It will set
things up using your own personal dotfiles repository, which may or may not
result in complications I cannot anticipate. I offer no guarantee that the
configurator script works for you or results in a pleasant outcome for your
computing device, but you are welcome to use it or modify it as you see fit.
Absolutely no refunds will be given, even in cases of catastrophic failure.
Once everything is installed, you're ready to go. The update script will be
in the PATH and can be executed to keep everything up to date in one
convenient shell command.