When you search for "dotfiles" on GitHub, you'll find plenty of good script examples for setting up a new computer. Since Apple doesn't provide good documentation on what you can configure with "defaults" variables, these examples are a goldmine.
Jeff Geerling has a phenomenal ansible playbook to setup his macs:<p><a href="https://github.com/geerlingguy/mac-dev-playbook">https://github.com/geerlingguy/mac-dev-playbook</a>
I have <a href="https://github.com/rcarmo/ground-init">https://github.com/rcarmo/ground-init</a> - which I also use for Macs, although via a bit of a hack right now. I should update it to a brewfile-like setup...<p>Anyway, my $0.02 is that doing fully automated installs on Macs is a fast track to having weird Finder and settings bugs (if not worse), so I mostly just install packages and very seldom (if ever) apply settings via the CLI -- I've had Apple break things across too many OS releases to find that a worthwhile long-term strategy, and most of the time I'd rather just use Migration Assistant (across Macs with equivalent OS versions) or configure settings manually for a new OS release.<p>Edit: just went and updated the above script to support brew/cask installs on macOS. Settings can go into the runcmd section.
The best way to do it!<p>I have a file that sets my MacOS Defaults: <a href="https://github.com/joeyagreco/dotfiles/blob/main/.macos">https://github.com/joeyagreco/dotfiles/blob/main/.macos</a><p>And a file to remap some keys: <a href="https://github.com/joeyagreco/dotfiles/blob/main/.macos_key_remaps.json">https://github.com/joeyagreco/dotfiles/blob/main/.macos_key_...</a><p>And apply the remaps: <a href="https://github.com/joeyagreco/dotfiles/blob/b5b819c9bcde2e3aff8e8f1a28a9bb9c21c2b2f3/zsh/sourcing.zsh#L88">https://github.com/joeyagreco/dotfiles/blob/b5b819c9bcde2e3a...</a>
I used to hand-setup each new Mac, but lately (last decade or so; gosh this M1 Pro is absolutely ancient) I just let the migration assistant do the needful.<p>Storage is too cheap for me to spend time optimizing it anymore. I’m sure I have cruft somewhere, but it doesn’t bother me.
Just in case anyone is lost in all the `defaults write ...`, I really recommend <a href="https://macos-defaults.com/" rel="nofollow">https://macos-defaults.com/</a><p>It's a really nice overview for (almost) all of the options.
I have an open-source script which installs all my conf <a href="https://github.com/Frizlab/frizlabs-conf">https://github.com/Frizlab/frizlabs-conf</a>
I use a setup script that installs brew, a brewfile, runs chezmoi to setup terminal and defaults, pulls some secrets/keys out of 1Password, and good to go, other than manually having to log into certain things. Everything in a personal dotfiles repo. I do have to occasionally diff my brewfile and terminal config and push that up, I should probably spend a little time figuring out how to automate that.
Is there any shell/bash extensions that just allow you to use LLMs easily from the command line? Basically like warp but just a simple extension instead of a full iterm replacement?