{"id":22538135,"url":"https://github.com/cfpb/mac-setup","last_synced_at":"2025-04-09T20:15:13.902Z","repository":{"id":36302277,"uuid":"207861024","full_name":"cfpb/mac-setup","owner":"cfpb","description":"Scripts and baseline dotfiles for setting up a new CFPB developer Mac","archived":false,"fork":false,"pushed_at":"2024-07-15T15:12:40.000Z","size":193,"stargazers_count":8,"open_issues_count":2,"forks_count":7,"subscribers_count":28,"default_branch":"main","last_synced_at":"2025-04-09T20:15:08.207Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cfpb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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":"2019-09-11T16:46:38.000Z","updated_at":"2024-11-22T02:51:22.000Z","dependencies_parsed_at":"2024-06-13T05:02:05.327Z","dependency_job_id":null,"html_url":"https://github.com/cfpb/mac-setup","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":"cfpb/open-source-project-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfpb%2Fmac-setup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfpb%2Fmac-setup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfpb%2Fmac-setup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfpb%2Fmac-setup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cfpb","download_url":"https://codeload.github.com/cfpb/mac-setup/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248103872,"owners_count":21048245,"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":[],"created_at":"2024-12-07T11:10:22.786Z","updated_at":"2025-04-09T20:15:13.879Z","avatar_url":"https://github.com/cfpb.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CFPB Mac setup scripts\n\nConfigurations and scripts for setting up a new developer Mac.\n\n\n**Note**: These scripts currently target macOS Big Sur (11). If you need to setup a Mojave (10.14) Mac, please use the [tagged release for Mojave](https://github.com/cfpb/mac-setup/releases/tag/10.14).\n\n## Automated software setup\n\nThe `mac_setup.sh` script installs a standard developer environment\non new Mac computers, with the goal of making the machine ready to set up\n[consumerfinance.gov](https://github.com/cfpb/consumerfinance.gov) for local \ndevelopment. \n\nThis includes, but is not limited to:\n\n- [Homebrew](http://brew.sh/)\n- Up-to-date or cfgov-refresh-specific versions of several core developer tools:\n  - Git (replacing Apple Git)\n  - [git-secrets](https://github.com/awslabs/git-secrets) hooks\n    for ensuring you don't accidentally commit bad stuff\n  - pyenv and pyenv-virtualenvwrapper with Python 3.8.12\n  - pipx for running isolated Python applications\n    - **IMPORTANT:** [Downgrading Docker Desktop via pipx for use with cf-gov refresh](https://cfpb.github.io/cfgov-refresh/installation/#4-run-docker-compose-for-the-first-time)  \n  - nvm with the latest LTS release of Node\n  - Yarn with the following installed globally:\n    - yo\n    - generator-cf\n    - generator-node\n    - snyk\n- Minimal dotfiles with the necessary bits for all of the above to work as expected\n\n### Running the script\n\n1. Run the following command from the root of this repository\n   to initiate the installation: `./mac_setup.sh`.\n1. After the script completes, run `source ~/.zshenv`\n   to apply the changes to your current terminal session,\n   or just close the session and open a new one.\n\nScripts to set up each component can also be run individually:\n\n- `preflight.sh` to check network access and local configuration before proceeding\n- `homebrew_setup.sh` to install and configure [Homebrew](http://brew.sh/) \n- `python_setup.sh` to install and configure [our Python development environment](https://github.com/cfpb/development/blob/master/guides/installing-python.md)\n- `node_setup.sh` to install and configure our Node development environment\n- `git_setup.sh` to install and configure git and [git-secrets](https://github.com/cfpb/development/blob/master/tools/git-secrets-patterns/README.md)\n- `dotfiles_setup.sh` to apply our standard dotfiles\n\n### Backups\n\n- If any dotfiles (`~/.bash_profile`, `~/.bashrc`, etc.) would be overwritten,\n  they will be backed up to `~/\u003cfilename\u003e_\u003cdate\u003e`.\n- If you have anything in your `~/.git-templates/` folder and\n  your global `.gitconfig` has `init.templateDir` value is set to that location,\n  your files will be left in place\n  and the `init.templateDir` will be changed to `~/.git-templates/git-secrets/`.\n\n## GitHub/SSH setup\n\nThe `github_setup.sh` script has two functions:\n\n1. Ensure the `~/.gitconfig` file in your home directory has a name and\n   email address configured so that you get credit for your commits.\n1. Create an SSH key (if it doesn't already exist) for integration with\n   GitHub.com and CFPB's GitHub Enterprise instance.\n   - If generating an SSH key, you will be prompted\n     to create a password for the key.\n\nAfter the script completes, you will be provided with a \"public key\"\nand the following instructions for applying the key to your two GitHub accounts:\n\n1. Log into your GitHub accounts and paste this public key in the GitHub Settings website\n1. [Directions for adding keys](https://help.github.com/en/articles/adding-a-new-ssh-key-to-your-github-account)\n\nThe script is safe to run even if you have already\nconfigured your `.gitconfig` and/or SSH key.\nIn this case, the tool will simply output your existing details for your review.\n\n### Running the script\n\nRun the following command from the root of this repository: `./github_setup.sh`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcfpb%2Fmac-setup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcfpb%2Fmac-setup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcfpb%2Fmac-setup/lists"}