{"id":20383522,"url":"https://github.com/smerth/macos-setup","last_synced_at":"2025-03-04T22:44:52.039Z","repository":{"id":213759665,"uuid":"713476730","full_name":"smerth/macos-setup","owner":"smerth","description":"Got a new MacOS computer. Updating an old Mac using OpenCore. The setup and config can be a little confusing.  Here's my checklist of steps to set up a MacOS computer for development.","archived":false,"fork":false,"pushed_at":"2023-12-22T20:10:03.000Z","size":127,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-15T07:58:47.794Z","etag":null,"topics":["macos","macos-setup"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/smerth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-02T15:44:01.000Z","updated_at":"2023-12-23T10:21:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"f16257b8-1810-4e82-a505-2aee67241c80","html_url":"https://github.com/smerth/macos-setup","commit_stats":null,"previous_names":["smerth/macos-setup"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smerth%2Fmacos-setup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smerth%2Fmacos-setup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smerth%2Fmacos-setup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smerth%2Fmacos-setup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smerth","download_url":"https://codeload.github.com/smerth/macos-setup/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241935267,"owners_count":20044826,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["macos","macos-setup"],"created_at":"2024-11-15T02:23:12.743Z","updated_at":"2025-03-04T22:44:52.010Z","avatar_url":"https://github.com/smerth.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Setup New MacOS based computer for development with Node and Python\n\nThis readme outlines how I setup a new MacOS for general use and for Node and Python development.  The repo contains some shell scripts to help speed-up the process and some reference material to help clarify the steps.\n\nIf you follow these steps **sequentially without jumping around**, and trust we will cover all the major steps, it should be a fairly fast and efficient setup.\n\n\n## Install Developer Tools\n\nInstalling XCode is a painfully long wait and not necessary if all you need are the **developer tools**.  To initiate installation of just the tools without installing XCode just call git\n\n```shell\ngit\n```\n\nSince git is not installed you will be prompted to install developer tools (since git comes with that package.) \n\n\n## Download this repo\n\nDownload the zip of this repo to your Downloads folder.  Then move it to the root of your `User` folder.\n\n```shell\ncd ~/ \u0026\u0026 mv Downloads/macos-setup-main macos-setup\n```\n\n\n## Install a nice font for coding\n\nI like [Anonymous Pro Font](https://www.marksimonson.com/fonts/view/anonymous-pro) for use in VSCode and Terminal.  But I want the version with lots of icons so I [download the Anonymice Pro Font](https://github.com/ryanoasis/nerd-fonts/releases/download/v3.1.1/AnonymousPro.zip) from [Nerd Fonts](https://www.nerdfonts.com/font-downloads)\n\nDouble click to open the archive and click on a font variant to open FontBook. Install the font then drag the remaining variants of the font into FontBook to install them.\n\n\n## Install Homebrew\n\nWe will use [Homebrew](https://brew.sh/) to install the majority of our apps\n\n```shell\n/bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\"\n```\nRun any post install commands in terminal to finish the install\n\n\n## Install Warp Terminal\n\n```shell\nbrew install warp\n```\n\n\n## Sign into Warp\n\n- [ ] First login to your Github account in the web browser\n- [ ] Login to Warp using your GitHub account (you'll be redirected to GitHub in the Browser)\n\n\n## Configure Warp\n\n- [ ] Choose prompt\n- [ ] Choose theme\n- [ ] Choose the font (use the previously installed **Anonymice Pro Mono** font)\n- [ ] Set font size to \"22\"\n\n\n## Open This readme in Warp\n\nYou can open a markdown file in Warp, then you can execute any code blocks in the markdown by clicking on the code block. This will make moving through this readme much faster than cutting and pasting code into terminal.\n\n```shell\ncd ~/macos-setup \u0026\u0026 open README.md -a warp\n```\n\n\n## Install casks (apps) with Homebrew\n\nIn Homebrew parlance apps are called casks.  We are going to programatically install a number of casks back to back. To prepare for that first run this command it will download the list of versions for all casks.  we need this because we will install some versions of casks that are off the main release (eg. Firefox Developer Edition)\n\n```bash\nbrew tap homebrew/cask-versions\n```\n\nOpen and read the list of casks to be installed.\n\n```shell\ncd install-brew-casks \u0026\u0026 open cask-list.txt -a textedit\n```\n\n- [ ] Check `cask-list.txt` to make sure the apps you want to install are all there.  Add or subtract apps as you see fit. Check the `useful-casks.txt` file for more into about various interesting casks.\n\nRun the cask install script\n\n```bash\nzsh install-casks.zsh\n```\n\n\u003e IMPORTANT!!!\n\u003e\n\u003e Stick around during this process. You might need to to provide the login password for the computer during one or more of these installations.\n\u003e \n\u003e This will take some time...  get yourself a tea...\n\n\n## Install Oh-My-Zsh\n\nOh-My-Zsh is the quickest way to get a nice terminal experiance.  Install [Oh My Zsh](https://ohmyz.sh/)\n\n```bash\nsh -c \"$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)\"\n```\n\n**Change the theme**\n\nChange theme in the `.zshrc` file.  If you use iTerm2 you can choose freely from any on the available themes.  However, if you use Warp you need to choose a theme with a relatively clean prompt since Warp adds alot of formatting to the prompt and the history blocks of previously executed code.\n\nTry: \n```shell\nZSH_THEME=\"af-magic\"\n```\nor \n```shell\nZSH_THEME=\"half-life\"\n```\n\n### Install Oh-My-Zsh plugins\n\n**zsh-syntax-highlighting**\n\nSetup syntax highlighting for Terminal and iTerm2 if you use them (I can't get it to work with Warp)\n\nFollow [install directions for Oh-My-Zsh]([https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/INSTALL.md](https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/INSTALL.md#oh-my-zsh))\n\nClone this repository in oh-my-zsh's plugins directory:\n```shell\ngit clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting\n```\nActivate the plugin in ~/.zshrc:\n```shell\nplugins=( [plugins...] zsh-syntax-highlighting)\n```\nRestart zsh (such as by opening a new instance of your terminal emulator).\n\n\n**zsh-autosuggestions**\n\nFollow the install for [install for Oh-My-Zsh](https://github.com/zsh-users/zsh-autosuggestions/blob/master/INSTALL.md#oh-my-zsh)\n\nClone this repository into `$ZSH_CUSTOM/plugins` (by default `~/.oh-my-zsh/custom/plugins`)\n```shell\ngit clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions\n```\n\nAdd the plugin to the list of plugins for Oh My Zsh to load (inside ~/.zshrc):\n```shell\nplugins=( \n    # other plugins...\n    zsh-autosuggestions\n)\n```\n\nStart a new terminal session.\n\n## Setup Node.js\n\nWe are going to install Node using nvm so we easily manage Node versions.  We are going to install nvm as an Oh-My-Zsh plugin\n\n**zsh-nvm**\n\nzsh-nvm will install nvm as an Oh-My-Zsh plugin making it easy to update nvm and not mess up existing node and package installations.  In addition it will configure auto swithing the node version listed in a `.nvmrc` file if present.\n\nClone zsh-nvm into your custom plugins repo\n```shell\ngit clone https://github.com/lukechilds/zsh-nvm ~/.oh-my-zsh/custom/plugins/zsh-nvm\n```\n\nexport settings for zsh-nvm and load the plugin in `.zshrc`\n```shell\nexport NVM_AUTO_USE=true\nplugins+=(zsh-nvm)\n```\n\nReload the shell (source `.zshrc`)\n```shell\nsource .zshrc \n```\n\n**Install two versions of node**\n\n\nInstall Node at version 18\n```shell\nnvm install 18\n```\nInstall Node at version 16\n```shell\nnvm install 16\n```\n\n\n**Test auto-switching between Node versions**\nTo make sure all previous changes take effect close out your terminal shell and re-open a fresh one\n```shell\nmkdir one \u0026\u0026 cd one \u0026\u0026 touch .nvmrc \u0026\u0026 echo \"v16\" \u003e .nvmrc\n```\nand \n```shell\nmkdir one \u0026\u0026 cd one \u0026\u0026 touch .nvmrc \u0026\u0026 echo \"v18\" \u003e .nvmrc\n```\ncheck auto switching\n```shell\nnode --version \u0026\u0026 cd one \u0026\u0026 cd ../two \u0026\u0026 cd ../one \u0026\u0026 cd ../\n```\n\n**Install Yarn**\n```shell\nnvm use 18 \u0026\u0026 npm install -g yarn\n```\nand \n```shell\nnvm use 16 \u0026\u0026 npm install -g yarn\n```\n\n**Configure NPM**\n\nif you cd into an empty folder and run `npm init` or `yarn init` you will initiate a CLI to walk through setting up a project.  However the answers to each prompt will not be autofilled with your standard preferences.\n\nCreate an `.npmrc` file\n\n```bash\ntouch .npmrc\n```\nand add your preferences and authorization to download from and publish to GitHub package registry.\n\n```bash\ninit-author-name=Stephen Merth\ninit-author-email=stephen.merth@gmail.com\ninit-author-url=https://smerth.github.io/\ninit-license=MIT\nemail=stephen.merth@gmail.com\nregistry=https://registry.npmjs.org\n//registry.npmjs.org/:_authToken=[AUTH_TOKEN_FOR_NPM_REGISTRY]\n@smerth:registry=https://npm.pkg.github.com/smerth\n//npm.pkg.github.com/:_authToken=[PAT_WITH_PERMISSIONS_FOR_GITHUB_PACKAGE_REGISTRY]\n//npm.pkg.github.com/smerth/:_authToken=[PAT_WITH_PERMISSIONS_FOR_GITHUB_PACKAGE_REGISTRY]\nalways-auth=true\nscripts-prepend-node-path=true\n```\n\n\n## Configure iTerm2\nIf you are using iTerm2, now is the time to configure it to your liking...\n\n**Set theme**\n\n- [ ] @ `settings \u003e profiles \u003e general \u003e theme` set to \"Dark\"\n\n**Install a color palette**\n\n- [ ] go to https://iterm2colorschemes.com/ and choose colours palette\n- [ ] create a file on the desktop with ext `.itermcolors`\n- [ ] paste choosen color palette into file\n- [ ] doouble click file to load colours into presets\n- [ ] go to `settings \u003e profiles \u003e colours` and choose the preset\n\n**Choose a font**\n\n- [ ] @ `settings \u003e profiles \u003e text \u003e font` set to \"AnonymicePro Font\"\n- [ ] set font size to \"22\"\n\n**Load new tabs and windows in previous location**\n\n- [ ] @ `Preferences \u003e Profiles \u003e General \u003e Working Directory` set to \"Reuse previous sessions directory\"\n\n**Use opt + arrow to move across tokens in a text string**\n\n- [ ] @ `Preferences \u003e Profiles \u003e Keys \u003e Key Mapping \u003e Presets` set to \"Natural Text Editing\"\n\n\n## Configure VSCode\n\n- [ ] Turn on settings sync (syncs settings with Github account)\n- [ ] Turn on \"linked tag editing\" @ settings \u003e linked editing\n\n### Install extensions\n\nIf you synched settings for VSCode from a previous install this won't be necessary.\n\nCurrent Favorites:\n\n- [ ] Just Black + comments (theme)\n- [ ] Font size shortcuts\n- [ ] GitHub Copilot (requires subscription)\n- [ ] GitLens\n- [ ] Jupyter\n- [ ] Python\n- [ ] Rainbow CSV\n- [ ] Prettier\n- [ ] Vscode icons\n- [ ] live server\n- [ ] vsc-nvm\n\nConsider:\n\n- [ ] ES7+ snippets (dsznajder)\n- [ ] Vetur (for vue)\n- [ ] Indent rainbow\n- [ ] Todo highlight\n- [ ] Version lens\n- [ ] Import cost\n- [ ] Debugger for chrome (and also does Firefox)\n- [ ] rest client\n\n## Configure Firefox Developer\n\nSet preferences\n- [ ] Set as default browser\n- [ ] Setup url white list for cookies\n\nInstall extensions\n- [ ] privacy badger\n- [ ] ublock origin\n\n## Configure Typora\n\nYou can use `open -a typora xxx.md` to open the markdown file `xxx.md` in Typora from a command line. If Typora is your default editor for `.md` files, when `open xxx.md` would be enough.\n\nYou can also add\n```\nalias tp=\"open -a typora\"\n```\nin your `.zprofile` file, then you would be able to simply type `typora xxx.md` instead.\n\n(Requires Typora ≥ 1.1) If you want to use command line to not only open existing files, but also creating new files when target `.md` file does not exists, you could add\n```\nalias typora=\"/Applications/Typora.app/Contents/MacOS/Typora\"\n```\nin your `.zprofile` or other configuration file.\n\nThen if you run `typora xxx.md` and `xxx.md` does not exists, Typora will pop up a dialog to ask you whether to create target file or cancel the operation.\n\n## Configure remaining apps installed with Homebrew\n\nNow is a good time to open each app installed via Homebrew.  Open each app and access preferences with `cmd + ,`  Authorize each app if necessary and set preferences.\n\n\n## Setup Git and GitHub\n\nWe need to get up and running with:\n- Git\n- GitHub Git Credential Manager\n- GitHub CLI\n- GitHub Desktop\n\n\n### Install Git\n\nGit is installed when the developer tools are installed however I prefer to manage installs through Homebrew where possible\n\n```bash\nbrew install git\n```\n\n### Install Git Credential Manager\n\n[Git Credential Manager](https://github.com/GitCredentialManager/git-credential-manager) (GCM) is another way to store your credentials securely and connect to GitHub over HTTPS. With GCM, you don't have to manually [create and store a personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token), as GCM manages authentication on your behalf, including 2FA (two-factor authentication).\n\n```shell\nbrew install --cask git-credential-manager\n```\n\nThe next time you clone an HTTPS URL that requires authentication, Git will prompt you to log in using a browser window. You may first be asked to authorize an OAuth app. If your account or organization requires [two-factor auth](https://docs.github.com/en/authentication/securing-your-account-with-two-factor-authentication-2fa), you'll also need to complete the 2FA challenge.\n\nOnce you've authenticated successfully, your credentials are stored in the macOS keychain and will be used every time you clone an HTTPS URL. Git will not require you to type your credentials in the command line again unless you change your credentials.\n\n- [ ] clone a private repo to initiate authentication\n\nFor more information or to report issues with GCM, see the official GCM docs at \"[Git Credential Manager](https://github.com/GitCredentialManager/git-credential-manager).\"\n\n\n### Configure git\n\nGitHub Credential Manager should configure git however if further config is necessary use the following pattern:\n\n```bash\ngit config --global user.name \"Your Name Here\"\n```\n\nGlobal level configuration is user-specific, meaning it is applied to an operating system user. Global configuration values are stored in a file that is located in a user's home directory. `~ /.gitconfig` on unix systems\n\n- [ ] check `.gitconfig` against this reference version\n\n```shell\n[filter \"lfs\"]\n\tprocess = git-lfs filter-process\n\trequired = true\n\tclean = git-lfs clean -- %f\n\tsmudge = git-lfs smudge -- %f\n[user]\n\tname = Stephen Merth\n\temail = stephen.merth@gmail.com\n\ttwitter = StephenMerth\n[push]\n\tdefault = simple\n\tautoSetupRemote = true\n[color]\n\tui = auto\n[core]\n\tpager = less -r\n\tautocrlf = input\n\tignorecase = false\t\n[credential]\n\thelper = \n\thelper = /usr/local/share/gcm-core/git-credential-manager\n[init]\n\tdefaultBranch = main\n[credential \"https://dev.azure.com\"]\n\tuseHttpPath = true\n```\n\n\n### Install GitHub CLI\n\n[GitHub CLI](https://cli.github.com/)\n\n[GitHub CLI tutorial](https://www.youtube.com/watch?v=BRAG1Kj4-Ss)\n\nInstall GitHub CLI\n```bash\nbrew install gh\n```\n\nAuthenticate GitHub CLI\n```bash\ngh auth login\n```\n\n- Choose to authenticate with a web browser...\n- Choose https...\n\n**Configure GitHub CLI**\nSet editor to nano so you don't have to leave the terminal\n```bash\ngh config set editor \"nano --wait\"\n```\n\n### Install GitHub Desktop\n\n[GitHub Desktop](https://desktop.github.com/)\n\n- [ ] install GitHub Desktop\n- [ ] create a new repo so you can set the default location for local repos to `smerth/developer/github`\n- [ ] publish the new repo to GitHub\n\n\n## Install Python\n\n[Python](https://www.python.org/)\n\n### Anaconda\n\nWe're going to use Anaconda to setup and manage Python environments.  Anaconda comes with a big array of data science packages, use `miniconda` if all you want are python environments.\n\nDownload the [Anaconda Free Distribution](https://www.anaconda.com/download) and use the installer.  Don't use Homebrew to install Anaconda.  The installer offers more control over the placement of files.\n\nCheck that `.bash_profile` has been created.  Since we're running zsh, copy the conda init script from `.bash_profile` to `.zprofile`.  You can delete `.bash_profile`\n\nReopen Warp.  If everything worked your prompt should begin with `base` which indicated you are currently using the base python installation.\n\n\n### Set up Python Environments\n\nNow use condo to install python versions in their own environments\n```bash\nconda create --name py310\n```\n\nTo activate this environment\n```bash\nconda activate py310\n```\n\nInstall a specific python version in this environment\n```bash\nconda install python=3.10\n```\n\nTo deactivate an active environment\n```bash\nconda deactivate\n```\nTo view a list of environments\n```shell\nconda env list\n```\n\nGet help with environments\n```shell\nconda env --help\n```\n\nGet help with conda\n```shell\nconda --help\n```\n\n### Anaconda Overview\n[Learning Anaconda](https://learning.anaconda.cloud/path/intro-to-python)\n\n### Uninstall Anaconda\n[Remove environments](https://www.freecodecamp.org/news/how-to-delete-an-environment-in-conda/)\n[Uninstall Anaconda](https://docs.anaconda.com/free/anaconda/install/uninstall/)\n\n\n## iCloud\n\nIf you are using a Mac, your most important data (contacts, messages, calendars, music, etc) is synched to iCloud. Get that data onto your new Mac\n\n- [ ] log-in to iCloud\n- [ ] turn on synching for all the data that is relevant to you\n- [ ] open all apple applications, click through introductory windows, and make sure they are synced with iCloud\n\n## MacOS preferences\n\nGet the Finder, Desktop and behaviour setup the way you like.\n\n- [ ] Simplify the dock\n- [ ] Simplify the menubar by moving widgets into settings and removing separate widgets\n- [ ] Setup finder windows the way you like\n- [ ] Turn on stage manager (or toggle under settings when you want it)\n- [ ] Show widgets on desktop if you want them\n- [ ] Set widget style monochrome\n- [ ] Turn on mission control\n- [ ] Turn on hot corners:\n  - [ ] TL - mission control\n  - [ ] TR - application window\n  - [ ] BL - screen saver\n  - [ ] BR - desktop\n\n## Install apps from app store.\n\nDownload any apps you need from the App Store. Click on your account in the store to see a list of your previous purchases.\n\n- [ ] 1Password\n  - [ ] Open and connect to 1password database\n- [ ] Authy\n  - [ ] Open and connect to Authy database\n- [ ] Numbers\n- [ ] Affinity Designer\n- [ ] Magnet\n- [ ] Transmit\n  - [ ] Download from Panic (not the app store)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmerth%2Fmacos-setup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmerth%2Fmacos-setup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmerth%2Fmacos-setup/lists"}