macup is a node.js based framework for doing a single command bash-based installation on top of a macos installation.
The core principles are:
- With help of a single configuration file, prepare your macos installation
- With one terminal command (
bash macup.sh), be able to install everything from scratch - ie. command line tools, git, even mac app store apps, user preferences, dotfiles etc. - The setup should be idempotent, so it can be run multiple times
- Add whatever modules you would like to your own custom package. Either official ones, or your own.
- First you need to prepare your package (Configuration is node.js based, but the package itself don't need node at all)
npx eeerlend/macup-builder setupThis will create a starting point for you, including a blank /dist/my.config file.
-
Now, run
npm installto get dependencies (see list below for available official modules. Onlymacup-coreis installed by default). Installation copies the./distfolder to your own project folder./dist/packages/the-macup-module. -
Configure
./dist/my.configto your needs (take a look at the different modules for configuration options). -
Test your package form your project root;
bash macup.sh- Push your package to github (either public or private), and create a "personal access token" to be used when installing your macup package.
- On your newly installed mac, run the following command in your terminal (replace YOUR_AUTHORIZATION_TOKEN and YOUR_REPO with yout own data):
curl -s -H "Authorization: token {YOUR_AUTHORIZATION_TOKEN}" -L https://api.github.com/repos/{YOUR_REPO}/tarball > macup-master.tar && ([ ! -d macup-master ] && mkdir macup-master); tar xfz macup-master.tar -C ./macup-master --strip-components=1 && rm macup-master.tar && cd macup-master && bash macup.shVoila!
Feel free to create and publish your own modules. To make it work with macup, the only thing needed is a postinstall hook in package.json, that does the following:
"scripts": {
"postinstall": "require('macup-builder/packageHandler').copyModule('YOUR_MODULE_NAME')"
}... and, the bash file being executed during installation needs to be ./dist/run.sh.
If your module have configurations - declare them in ./dist/package.config, and implement them in your projects ./dist/my.config
You can extend macup, either with official modules, or with your own.
- eeerlend/macup-clean-dock
- eeerlend/macup-command-line-tools
- eeerlend/macup-core
- eeerlend/macup-dotfiles-icloud
- eeerlend/macup-homebrew
- eeerlend/macup-homebrew-casks
- eeerlend/macup-mas
- eeerlend/macup-nvm
- eeerlend/macup-scutil
- eeerlend/macup-slimzsh
- eeerlend/macup-terminal-colors
- eeerlend/macup-vscode-extensions