Here to make it easier for me to setup new developer environments quickly, probably of no use to anyone but me.
Quick setup details: software to install, config/dotfiles & packages
Works on macOS and on Windows (from git-bash). Linux isn't supported yet, the scripts stop with an error there.
git clone https://github.com/dylankenneally/dotfiles.git
cd dotfiles
./install.sh # everything
./install.sh dotfiles settings # or just some sections: dotfiles, settings, packages- dotfiles copies the dotfiles to your home directory. These are shared by every OS.
- settings copies this OS's editor settings into place.
- packages installs this OS's system, editor and python packages.
Files that are shared by every OS sit in the repo as-is; files that are specific to an OS are named for it (e.g. *.macos.*, *.windows.*). The list of what goes where lives in lib/common.sh.
Any file that would be replaced, and differs, is backed up to ~/.dotfiles-backup/<timestamp>/ first. Missing tools are skipped and listed at the end, so install them and re-run that section.
Secrets (tokens, passwords, keys) never go in the repo. Put them in ~/.secrets (e.g. export NPM_TOKEN=...), which .bash_profile sources and neither script copies.
Install the software above, then cherry pick from below
A full list of packages installed via brew can be found in the doco folder. To install all of them, run brew bundle - this will install them from the Brewfile.
# creates Brewfile in the current directory from currently-installed packages
brew bundle dump --force
# install everything from the Brewfile
brew bundlePackages installed via winget are listed in winget.json. To install all of them, run winget import -i winget.json.
Typical python packages are listed per OS, in requirements.<os>.txt, and are installed by ./install.sh packages.
Typical extensions are listed per OS, in vscode.<os>.extensions, and are installed by ./install.sh packages.
Settings are kept per OS, in settings.<os>.json. ./install.sh settings places this OS's file in the following locations:
- macOS
$HOME/Library/Application\ Support/Code/User/settings.json - Windows
%APPDATA%\Code\User\settings.json
There is a default editorconfig file in this repo, with sensible overrides - particularly if you are using Prettier. Simple copy it to your code location (or your home directory).
The .bashrc files includes a couple of Docker helper functions:
dockershell: start containers in an interactive shell.
dockermappedshell: start containers in an interactive shell, with the current directory is mapped into the container.
Examples:
dockershell centos
dockershell node
dockershell nginx
dockershell your-container
dockermappedshell centos
dockermappedshell node
dockermappedshell nginx
dockermappedshell your-containerBased on using git-bash on Windows 11.
bash: thefuck: command not found
bash: rbenv: command not found
# removed them from bash files in ~/Installed:
batwinget install sharkdp.batezawinget install eza-community.eza- Process explorer
- Installed to
C:\Utils
- Installed to
- WinDiff / WinMerge
- tldr
- Sourcetree
- HTTPPie,
pip install httpie - postman
Been a few years since I've developed on Windows, the below was handy then, may be handy in future.
When new items are installed/removed from your dev env, or just periodically, run the following (on macOS or Windows) to update this repo with a snapshot of the current system, then review it with git diff before committing.
./update-repo.sh # everything
./update-repo.sh dotfiles packages # or just some sections: dotfiles, settings, packages- The dotfiles are shared by every OS, so keep OS-specific lines in them safe to run elsewhere (e.g. guarded by
[[ -f ... ]]or[[ -d ... ]]). - Editor settings and package lists are per OS, so a run on one machine never touches another's.
- A file is only replaced when its command succeeds with output, so a missing or failing tool can't empty it.
- A dotfile or settings file that looks like it holds a secret stops the run, move the secret to
~/.secretsand re-run.