• Stars
    star
    120
  • Rank 295,983 (Top 6 %)
  • Language
    Shell
  • Created over 13 years ago
  • Updated almost 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

☕ bootstraps macOS to be usable

bootslap

Opinionated scripts to bootstrap my new Mac workstations when I get them. This doesn't happen all too often, but in between home, work, desktops, laptops, catastrophic hardware failures, etc., it happens more often than I'd like!

bootslap screenshot

Build Status

Core Philosophy

After years of messing with various solutions for this problem, I've tried a lot of different solutions and evaluated a bunch of different approaches.

As a result of these forays, there are a few things bootslap is opinionated about:

  • Stand on the shoulders of giants. Homebrew is the best way to manage CLI tools on OSX. Homebrew Cask is the best way to manage binary applications on OSX. Make sure these providers are used for automatic installations as well, so that we can take advantage of their expansive and well maintained libraries.

  • Install as much as possible via default tools in default locations. Doing things in a nonstandard way or putting files in a nonstandard location means you might hit state bugs the general populace won't. This also means you aren't tied to bootslap in the future -- you can use it once to set stuff up and then throw it away later.

  • Do everything in an idempotent way. Tasks should be runnable at any time, creating/repairing installations when needed, ignoring stuff if already exists. You should be able to run the bootstrap script on a fully up-to-date workstation after making a single change, only only that one change will be applied to the machine, and it will happen fast.

  • Favor simplicity over modularity. Goal is for the entire codebase to be understandable and modifiable directly by anyone seeking to repurpose this, instead of them relying on me building in configuration options for whatever they might want to do.

  • Use the same tools for automatic and interactive modes. Want to remove something later? Don't need to mess with finding an uninstall script (assuming one even exists) or going searching all over the hard disk to figure out where your clever bootstrapper script put stuff. Just brew uninstall foo and it's gone.

Quick Installation

factory

Boostrap script 💫

For an absolute pristine new Mac, it should be possible to just clone the repo and then run bootslap.sh. This will install XCode Command Line Dev Tools, Homebrew, Ansible, and then run all the playbooks. You can even do it without cloning the repo first (useful since MacOSX still doesn't have git by default):

curl -sL http://git.io/bootslap > /tmp/bootslap; bash /tmp/bootslap

Be sure to stick around for first minute or two so you can give Ansible your sudo password when it starts running playbooks.

Manual bootstrapping 🔨

Don't like running bash scripts piped off the interwebs? Or maybe you hate ASCII art and emoji? Either way, you can bootstrap the initial steps by hand as well too.

  1. Install Homebrew: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
  2. Install Ansible via Homebrew: brew install ansible
  3. Clone this repo, run the playbooks you want and go make yourself a coffee. ansible-playbook -K install.yml shell.yml configure.yml

So what gets installed?

I no longer keep an up to date summary list. But that shouldn't matter, since the actual files are easy to read and modify. As a starting point, look at:

  • install.yml for everything that I "install" to the machine
  • shell.yml for my shell setup and modifications
  • configure.yml for macOS system configuration twiddling

Note that this repo is only half the story, some of magic happens in my dotfiles as well. (Which these scripts automatically install for me).

But that's just what mine does! While I've certainly spent an inordinate amount of time obsessing about tooling and coming up with what I think they best tools and configuration for the job are, you probably have a different opinion. These scripts are designed and written in a way to hopefully be a good starting point to write your own version, that sets up things the way you like them. Check out the nascent Customization Guide for pointers.

More complex installation topics

Manual playbook runs

Plays can be run individually if needed.

For example, to just do software installation (in case you don't have a dotfile repo), you can do run the install.yml playbook. Individual tasks are also tagged within the playbook so you can even do a ansible-playbook install.yml --tags ruby for example.

Configuration management

User dotfiles are managed via homeshick.

By default we look for $USERNAME/dotfiles on GitHub when getting things setup, and we infer your GitHub username from your system environment. You can manually override this in the shell.yml playbook is desired.

What's New in version 5?

Version History

I've investigated many possible approaches to this over time. A rough chronology for historical purposes:

  • version5: Current ansible script solution. Rename to bootslap.
  • version4 A year of working with the Boxen project instead.
  • version3: Moved to using chef recipes for software installation, backporting recipes into the pivotal_workstation project.
  • version2: Fancy Rakefiles version.
  • version1: Mostly just shell scripts (lost to time)

So why didn't you use?....

In other words, alternatives.

Boxen

After a year of struggling with Boxen for year (and contributing to the project) I've decided to abandon it. Some of the "highlights":

  • Relies upon custom versions of common packages (e.g. git) that lag behind official point releases.
  • Needs to own way too much of the system configuration. Uses it's own git credential helper, for example, and overrides your .gitconfig to enable it.
  • Way too much enabled by default. Much of it to support the GitHub way of doing project development (dnsmasq and nginx for project switching). I stripped most of it out, but it was quite a lot of effort to do so.
  • PITA to maintain updates. Require constant management of versions in Puppetfile.
  • Custom configurations for many tools. This results in difficulty troubleshooting due to a nonstandard configuration. Also it breaks lots of stuff, for example, Homebrew can't use precompiled bottles due to nonstandard paths.
  • Complex codebase. Sure, it's mostly puppet recipes, but the way everything is strung together makes it complex to understand whats happening when something goes wrong.

That said, some of the stuff Boxen does is very cool for large organizations (automatic GitHub Issue filing on install errors, for example). If you have a fulltime sysadmin to manage your configuration and deployments it's probably worth looking into.

Battleschool

Pretty close to what I want, but utilizes its own playbooks for installing common software. I'd much rather just depend on homebrew and homebrew-cask.

More Repositories

1

unindexed

🔎❔ website that irrevocably deletes itself once indexed
JavaScript
1,315
star
2

emojitracker

💫 track ALL the emoji
743
star
3

phoenix-showdown

🏇 benchmark Sinatra-like web frameworks
Elixir
704
star
4

weightedrand

⚖️ Fast weighted random selection for Go
Go
378
star
5

scmpuff

🔢 Numeric file shortcuts for common git commands
Go
373
star
6

slacknimate

👯 Realtime text animation for Slack chatops
Go
286
star
7

evalcache

🐣 zsh plugin to cache eval loads to improve shell startup time
Shell
173
star
8

sseserver

🏄 High-performance Server-Sent Events endpoint for Go
Go
107
star
9

emojistatic

💩 CDN static asset generation for emoji
CSS
98
star
10

exmoji

😎 Emoji encoding swiss army knife for Elixir/Erlang
Elixir
95
star
11

emoji_data.rb

😎 Emoji encoding swiss army knife for Ruby
Ruby
87
star
12

emoji-data-js

😎 Emoji encoding swiss army knife for NodeJS
CoffeeScript
64
star
13

ramdisk

🐏 Convenience wrapper for managing RAM disks
Go
47
star
14

benchwarmer

⌛ Elixir micro-benchmarking library
Elixir
47
star
15

bump

🌻 CLI tool to draft a GitHub Release for the next semantic version
Go
46
star
16

git-muzak

🎶 Background music for your git commits
Shell
32
star
17

cameraform

📹 Simple Flash+JS library for webcam capture and submission.
ActionScript
24
star
18

recyclebin

♻️ measures usage of a particular term on twitter
Go
21
star
19

grayratio

💬 gray:blue ratio for iMessage conversations
Shell
16
star
20

twitter-streaming-showdown

🚣 benchmark Twitter Streaming API libraries
Ruby
15
star
21

cssquirt

💧 Embeds images (or directories of images) directly into CSS via the Data URI scheme.
Ruby
14
star
22

tinygeoip

🐉 tiny geoip microservice
Go
13
star
23

momocode

🍑 Visual fingerprinting for 20-byte Ethereum addresses via emoji
Solidity
12
star
24

xkcdpass

🔏 xkcd style password generator for iOS
Swift
12
star
25

pullcrusher

🎩 optimizes all images in a GitHub repo & sends a pull request with the changes.
Ruby
10
star
26

emojidoll

🎎 twitter bot to generate Emoji dolls
Ruby
10
star
27

pigstream

🐷🐤 Twitter bot that insta-taunts frustrated people who can't beat a level on Angry Birds, using the streaming API.
Ruby
10
star
28

consider

🤔 quickly check code comments for subtle (racism|sexism|ableism)
Shell
9
star
29

golang-challenge-1

Solution for Go Challenge #1 (in Go and Elixir)
Go
9
star
30

deepclean

🗑️ scan and remove junk files from your source code directories
Go
9
star
31

scalafmt-native

Statically-linked GraalVM "native image" binaries of scalafmt
Dockerfile
8
star
32

my-boxen

👔 MacOSX system provisioning via Boxen [DEPRECATED, see mroth/bootslap]
Ruby
8
star
33

git-prompt-useremail

💂‍♂️ zsh plugin adds prompt reminders for git user.email
Shell
8
star
34

hurricanecamp

🌀 Hurricane Dev Camp is a stay-at-home hackathon to coincide with Hurricane Irene.
8
star
35

subtleist

🎏 Anonymously remind of subtle-isms and other Recurse Center social rules in Slack
Go
8
star
36

nanogeoip

🐉 tiny and blazing fast experimental geoip microservice
Rust
8
star
37

stardotws

🌟 source for a fun EMOJI DOMAIN
HTML
7
star
38

upcoming-cloud-warrior

☁️ Quick script/instructions to to get the Upcoming.org Archive Team Project running on multiple Heroku instances in the cloud.
Shell
7
star
39

hubhumans

👪 Automatically create a `humans.txt` file based upon public members of a GitHub organization.
Ruby
6
star
40

bogan-martin-award

🐲 old-skool Flickr staff award website
HTML
6
star
41

goodvsevil

🐱🐶 A quick hack to compare keyword counts in the Twitter Streaming API, using puppies and kittens.
Ruby
5
star
42

portfolio

🎨 my portfolio website
HTML
5
star
43

personalappeals

🏩 Hot or Not of the Wikipedia contributors.
JavaScript
5
star
44

semverdesc

🎯 git describe with semantic version compatible names
Go
4
star
45

dotfiles

⭕ My dotfiles repository. There are many like it, but this one is mine.
Shell
4
star
46

howami

💉 command line tool to show a summary of Fitbit health data
Ruby
4
star
47

pdftotextcloud

📚 pdftotext as a web service
JavaScript
4
star
48

pybaztag

🐰 Python convenience wrapper for the Nabaztag API.
Python
4
star
49

readtime

⌚ estimate how long it will take to read text
Go
4
star
50

shopmon

🏪 Monitor for in-stock products from Shopify powered stores
Go
4
star
51

forafriendbot

🙋 twitter bot that poses questions.... for a friend.
CoffeeScript
4
star
52

flickr-nearby-webos

📱 Quick and dirty location services test for WebOS, source code to support blog post.
JavaScript
3
star
53

github-cli-xref

♻️ Tool to make it easy to cross-reference GitHub issues.
Ruby
3
star
54

fashionhack

👠 fashion hackday project with @kellan
Ruby
3
star
55

flickr-wholovesyou

💞 see which Flickr members most frequently favorite photos of you (or someone else you know!)
Ruby
3
star
56

tamanegi

🌰 generates tor .onion hashes
Go
3
star
57

hubfavor

🙇 determine who in a GitHub org is most likely to do you a favor
Ruby
3
star
58

meatballtracker

🍝 monitor and alert for delicious meatballs at a local restaurant.
Ruby
3
star
59

isgregdead

💀 Check whether a coworker (who occasionally keeps odd hours) is alive.
Ruby
3
star
60

foursquare-token-echo

4️⃣💭 simple webpage to receive and echo the client_token for a Foursquare OAuth2 request.
2
star
61

flickr-socialvenn

👬 Generates a weighted contact intersection venn diagram for a Flickr member.
2
star
62

poidh

👀 pics or it didn't happen!
Ruby
2
star
63

sse-bench

📊 benchmarks Server-Sent Events endpoints
CoffeeScript
2
star
64

dees-colors

🌈 preview text as seen by a friend with grapheme-color synesthesia.
2
star
65

jitter

👯 Go timers with random jitter
Go
2
star
66

emojicompare

😄⁉️😄 A comparison of the Apple and Twitter emoji glyphs
2
star
67

go2go-docker

🐳 Docker image for the dev.go2go experimental Go branch
Dockerfile
2
star
68

loremfile

📜 Generate lorem ipsum text of a specific size
Go
1
star
69

.github

😈 Default community health files
1
star
70

dinnermint

🍬 automated metadata processing of personal photos on Flickr.
Ruby
1
star
71

tordesc

Parser for Tor network data descriptors
Rust
1
star
72

scalafmt-docker

Simple scalafmt packaging as a Docker Hub automated build
Dockerfile
1
star
73

rando-slackrisian

🎲 super quick CLI hack to get a random member of your Slack Team
JavaScript
1
star
74

base100-go

💯 Go implementation of Base100 emoji encoding
Go
1
star
75

mta2json

🚋 Proxies reqs to the MTA for Realtime Transit Feed data, converts results to JSON.
JavaScript
1
star
76

howlong

Quick self reference to answer a question I frequently get on calls.
HTML
1
star
77

sunnyinphilly

⛅ is it sunny in Philadelphia?
1
star
78

timeduration

🕐 simple CLI tool to convert humanized time durations
Go
1
star
79

xsort

80% faster versions of Go sort.Search* wrappers
Go
1
star
80

lolcapture

📹 experimental capture tool for lolcommits
Swift
1
star
81

fitdump

📉 Parse Fitbit data export files
Go
1
star
82

khan-bootstrap

🎓 A minimal setup for hacking the Khan Academy codebase
Makefile
1
star