What does HackerNews think of homebrew-bundle?

📦 Bundler for non-Ruby dependencies from Homebrew, Homebrew Cask and the Mac App Store.

Language: Ruby

#1 in Homebrew
#3 in Ruby
> It's strange that people are so against declarative systems, or even file-based OS configuration. When I get my new Macbook I was up-and-running within a few minutes. I can't imagine maintaining a list of brews I need to re-install just to set up everything + my configs + everything else.

I haven’t had time to try Nix yet, but HomeBrew does have a declarative-ish workflow that I’ve been using for years:

Brew Bundle [1] lets you have a plaintext file listing all packages you want installed on your system. Add a line for stuff you want installed, delete a line for stuff you want removed, invoke it the right way and it will install/remove packages until your system matches the list. The initial list can be generated by “brew bundle dump” or something like that.

For configuration, I find that a normal dotfile repo cloned into my ~/.config (with a script that maintains symlinks to config files in e.g. ~/Library) works well enough for my use.

[1]: https://github.com/Homebrew/homebrew-bundle

Brew supports dumping installed things into a brewfile: https://github.com/Homebrew/homebrew-bundle

I was using text files before as well to manage it.

Assuming everyone's on a Mac, I'm actually surprised there isn't that much use of something like homebrew-bundle[1]. It's definitely nicer to have your tooling run natively rather than, say, trying to wrap everything in Docker, or trying to get everybody on board with nix or guix.

I think the only real issue here is that you can't really pin to specific versions unless a formula exists, and there is no guarantee that a formula with a pinned version will stick around because homebrew likes to stay lean. So to that extent it can still be unclear what version of software someone is running on after enough time.

[1]https://github.com/Homebrew/homebrew-bundle/

Speaking of homebrew: As a new homebrew user, I really appreciate Brewfiles, kept in version control with other dotfiles, installed/updated via brew bundle -v

See more info in the semi official docs of the subcommand: https://github.com/Homebrew/homebrew-bundle

Not necessarily all open source, homebrew-cask has been merged into brew and you have e.g. Jetbrains IDEs and Zoom available.

Personally I use homebrew-cask to manage almost all applications and their updates, turning auto-updating off in almost all apps. That way I am in control and can update when it is convenient, know if an update broke something, etc.

Edit, using:

- https://github.com/buo/homebrew-cask-upgrade

- https://github.com/Homebrew/homebrew-bundle

Basically grabbing a saved Brewfile[1], running `brew bundle install` and waiting a while.

[1]https://github.com/Homebrew/homebrew-bundle

I load my major config files (fish, tmux, emacs) in a CI alpine container[0] and check that they're not broken when i commit them.

If you're on OS X then `brew bundle dump` and `brew bundle install` will also help[1]

[0] circleci config: https://gist.githubusercontent.com/bauerd/27b24d1a3f881fe508...

[1] https://github.com/Homebrew/homebrew-bundle

I am surprised that so many people write scripts to do stuff that Homebrew offers already - Homebrew Bundle [0]!

Also, why do people copy & paste `brew install` or `brew cask install` so many times in a script when you can do something like `xargs`?

[0]: https://github.com/Homebrew/homebrew-bundle

You may want to check out https://github.com/Homebrew/homebrew-bundle which will allow you to do a bunch of that in a single file. https://github.com/mikemcquaid/strap and https://github.com/benbalter/plister may be of interest too.
I've been using Homebrew for a few years now, but I've gotta admit that recently I've been intrigued by MacPorts. Can anyone that has tried both extensively share their thoughts, and possibly explain why they're using one or the other? I read up a few comments online from having googled around, but I'd love something more recent.

One of my complaints with Homebrew (and most system package managers) is that it treats all dependencies as equal. If I install X, which depends on Y and Z... I'd expect Y and Z to be removed when uninstalling X. If anyone else is frustrated by this, I'd suggest checking out homebrew-bundle [0]. The idea is simple: you create a Brewfile and you use that to track dependencies. Instead of installing stuff from the CLI, you add entries to your Brewfile and run "brew bundle --global". Sadly it won't do any automatic cleanups, so you have to run "brew bundle cleanup --global" to get a list of extraneous packages and remove em manually.

Another obvious benefit to using a text file is that you can annotate it with reminders. "What did I install this foobar tool for?"

I think migrating towards a shell environment which gets configured using idempotent scripts can help reduce bugs and lower the barrier of entry to people less familiar with the ecosystem, as well as make it easier to get your own system up and running. In the last few weeks I started toying around with nix [1], which seems to promise that... Although I'm still finding my way through their ecosystem.

I'd like to think I'm a fairly pragmatic user, so I'm willing to accept some hacks here and there. A few days back I put up a repo [2] to show what my macOS + fish shell setup looks like. It won't track configs to clean-up garbage or anything fancy like that, so if you make any change you might need to clean up manually. But it should make bootstrapping a new system a bit easier, and it encourages you to configure all universal variable definitions in a single place so you can add notes for why you're doing whatever it is you're doing. One of the biggest benefits of maintaining an idempotent fish config is that it has great performance. Since fish shell persists environment values in a single file and it lazy-loads function definitions, starting a new session happens almost instantly.

[0] https://github.com/Homebrew/homebrew-bundle

[1] https://nixos.org/nix/

[2] https://github.com/cesarandreu/dotfiles

The officially supported thing is: https://github.com/Homebrew/homebrew-bundle

See my Brewfile in my dotfiles for how I use it to install my stuff: https://github.com/MikeMcQuaid/dotfiles/blob/master/Brewfile

If you want to go a step further there's also Strap which will bootstrap your macOS system with some sensible defaults and install Homebrew, your dotfiles and your Brewfile: https://github.com/mikemcquaid/strap

Finally, if you're interested how I combined these to replace Boxen at GitHub (our macOS system/project bootstrap tool using Puppet) read this: http://mikemcquaid.com/2016/06/15/replacing-boxen/

You can use brew-bundle for that. https://github.com/Homebrew/homebrew-bundle

On one machine:

  brew bundle dump
On another machine:

  brew bundle
I like homebrew-bundle [1]. It lets me list all of the apps I use in a text file and install them with a single command.

You can also run `brew bundle --cleanup` to purge your system of apps that you no longer need (as long as you installed them with homebrew/homebrew-bundle in the first place).

- [1] https://github.com/Homebrew/homebrew-bundle

I have my dotfiles for that. Split into different categories (brew, npm, pip) together with all the config files I need. brew and brew cask (with brew-bundle [0] for Brewfile support) take care of getting all libraries and applications onto the system.

For the development itself I'm either shipping my entire config (.vimrc for example) or use systems like spacemacs, sublimious or proton that only need 1 single file to re-install the entire state of the editor.

The install script itself [1] is then symlinking everyhing into place and executes stuff like pip install -r ~/.dotfiles/pip/packages.txt.

It takes a bit of effort to keep everything up to date but I'm never worried of loosing my "machine state". If I go to a new machine all I have to do is clone my dotfiles, execute install.sh and I have everything I need.

On servers I am using saltstack [2], a tool like puppet, ansible and friends, to ensure my machines are in the exact state I want them to be. I'm usually using the serverless version and push my states over SSH to them.

[0]: https://github.com/Homebrew/homebrew-bundle

[1]: https://github.com/dvcrn/dotfiles/blob/master/install.sh

[2]: https://saltstack.com