{"id":43485070,"url":"https://github.com/markosamuli/macos-machine","last_synced_at":"2026-02-03T09:07:38.935Z","repository":{"id":25992464,"uuid":"106095041","full_name":"markosamuli/macos-machine","owner":"markosamuli","description":"macOS development machine setup","archived":false,"fork":false,"pushed_at":"2026-01-12T10:54:07.000Z","size":392,"stargazers_count":12,"open_issues_count":40,"forks_count":4,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-01-12T19:02:28.413Z","etag":null,"topics":["ansible","macos"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/markosamuli.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-10-07T12:10:10.000Z","updated_at":"2024-02-22T13:12:56.000Z","dependencies_parsed_at":"2024-01-28T21:23:39.209Z","dependency_job_id":"3260017d-329d-48e0-84c2-c535b55c1d8c","html_url":"https://github.com/markosamuli/macos-machine","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/markosamuli/macos-machine","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markosamuli%2Fmacos-machine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markosamuli%2Fmacos-machine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markosamuli%2Fmacos-machine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markosamuli%2Fmacos-machine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markosamuli","download_url":"https://codeload.github.com/markosamuli/macos-machine/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markosamuli%2Fmacos-machine/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29039342,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T08:41:49.363Z","status":"ssl_error","status_checked_at":"2026-02-03T08:40:19.255Z","response_time":96,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["ansible","macos"],"created_at":"2026-02-03T09:07:38.070Z","updated_at":"2026-02-03T09:07:38.921Z","avatar_url":"https://github.com/markosamuli.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Development macOS Setup\n\n[![GitHub release](https://img.shields.io/github/release/markosamuli/macos-machine.svg)](https://github.com/markosamuli/macos-machine/releases)\n[![License](https://img.shields.io/github/license/markosamuli/macos-machine.svg)](https://github.com/markosamuli/macos-machine/blob/master/LICENSE)\n[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit\u0026logoColor=white)](https://github.com/pre-commit/pre-commit)\n[![Known Vulnerabilities](https://snyk.io/test/github/markosamuli/macos-machine/badge.svg)](https://snyk.io/test/github/markosamuli/macos-machine)\n\n| Branch | Coding Style               |\n| ------ | -------------------------- |\n| master | ![Coding Style][cs-master] |\n\nThis is a collection of Ansible roles and tasks to setup a new developer machine\non macOS.\n\nRead my [Machine Setup Guide][machine-setup-guide] for instructions.\n\n[machine-setup-guide]: https://machine.msk.io/\n[cs-master]: https://github.com/markosamuli/macos-machine/workflows/Code%20Quality/badge.svg?branch=master\n\n## Requirements\n\n- Mac running macOS 10.14 (Mojave) or later\n- Xcode (Command Line Tools) 11 or later installed\n- Xcode (Command Line Tools) 12 or later recommended on macOS Catalina\n- Git installed (provided with Xcode Command Line tools)\n\nThis setup has only been tested on the macOS Sierra and not against existing\ninstallations.\n\nSee [markosamuli/linux-machine] for my Ubuntu Linux setup.\n\n[markosamuli/linux-machine]: https://github.com/markosamuli/linux-machine\n\n## Install\n\nYou can run the installer script that will clone the code from GitHub and run\nthe `setup` script.\n\n```bash\ncurl -s https://raw.githubusercontent.com/markosamuli/macos-machine/master/install.sh | bash -\n```\n\n## Getting Started\n\nClone this project locally and run the `./setup` script.\n\n```bash\ngit clone https://github.com/markosamuli/macos-machine\ncd macos-machine\n./setup\n```\n\n## Local options\n\nYou can pass custom variables to the Ansible playbook and roles by creating a\n[`machine.yaml`][machine.yaml] file to customise your configuration.\n\n```bash\ncp machine.yaml.example machine.yaml\n```\n\nThe `setup` script will detect if this file exists and passes it to the Ansible\nPlaybook with `--extra-vars`.\n\n[machine.yaml]: machine.yaml\n\n## Software installed by the playbooks\n\n### Installation tools\n\nThe following tools are prerequisites and always installed during setup if not\nalready found on the system.\n\n- Xcode Command Line Tools\n- [Homebrew](https://brew.sh/)\n- [Ansible](https://www.ansible.com/) installed with Homebrew\n- [Python](https://www.python.org/) installed with Homebrew\n\n### Desktop applications\n\n[iTerm2][iterm2] and [Terminus][terminus] terminal applications will be\ninstalled on all environments.\n\nTo install [Google Drive File Stream][gdfs]:\n\n```yaml\ninstall_gdfs: true\n```\n\nTo install [Slack][slack] desktop application:\n\n```yaml\ninstall_slack: true\n```\n\n[terminus]: https://eugeny.github.io/terminus/\n[iterm2]: https://www.iterm2.com/\n[slack]: https://slack.com/downloads/osx\n[gdfs]: https://support.google.com/drive/answer/7329379?hl=en\n\n### Shell\n\nLatest version of [Zsh][zsh] will be installed from Homebrew.\n\n[zsh]: https://www.zsh.org/\n\n### Command line tools\n\n- [GNU Wget][wget]\n- [GNU sed][sed] as `gsed` command\n- [GNU tar][tar] as `gtar` command\n- [jq] command-line JSON processor\n- [The Silver Searcher][ag] (`ag` command) code searching utility similar to\n  `ack`\n- [htop] process viewer for console\n- [ShellCheck][shellcheck] static analysis tool for shell scripts\n- [shfmt] formatter for shell scripts\n- [asciinema] for recording terminal session\n\nRun tools playbook:\n\n```bash\nmake install-tools\n```\n\n[wget]: https://www.gnu.org/software/wget/\n[sed]: https://www.gnu.org/software/sed/\n[tar]: https://www.gnu.org/software/tar/\n[jq]: https://stedolan.github.io/jq/\n[htop]: https://hisham.hm/htop/\n[ag]: https://github.com/ggreer/the_silver_searcher\n[shellcheck]: https://github.com/koalaman/shellcheck\n[shfmt]: https://github.com/mvdan/sh\n[asciinema]: https://asciinema.org/\n\n### macOS customization and automation\n\nTo install [Hazel][hazel] automation tool:\n\n```yaml\ninstall_hazel: true\n```\n\nTo install [Hammerspoon][hammerspoon] automation tool:\n\n```yaml\ninstall_hammerspoon: true\n```\n\n[hazel]: https://www.noodlesoft.com/\n[hammerspoon]: https://www.hammerspoon.org/\n\n### Editors\n\n[Visual Studio Code][vscode] will be installed on all environments.\n\nLatest [Vim][vim] package will be installed from Homebrew.\n\nTo install [MacVim][macvim] instead of Vim, update `machine.yaml` with the\nfollowing configuration:\n\n```yaml\ninstall_macvim: true\n```\n\nTo install [JetBrains Toolbox][jetbrains] to install and manage JetBrains\napplications:\n\n```yaml\ninstall_jetbrains_toolbox: true\n```\n\n[vscode]: https://code.visualstudio.com/\n[vim]: https://www.vim.org/\n[macvim]: https://github.com/macvim-dev/macvim\n[jetbrains]: https://www.jetbrains.com/toolbox-app/\n\n### asdf version manager\n\nYou can install [asdf] version manager by adding the following option to your\n[`machine.yaml`][machine.yaml]:\n\n```yaml\ninstall_asdf: true\n```\n\nTo configure [asdf plugins][asdf-plugins] and package versions to install, add\nthem into your [`machine.yaml`][machine.yaml] configuration.\n\n```yaml\nasdf_plugins:\n  - name: kubectl\n  - name: concourse\n```\n\nNote that some of the playbooks remove conflicting asdf plugins and versions if\na respective tool is installed using another package or version manager.\n\n[asdf]: https://asdf-vm.com\n[asdf-plugins]: https://asdf-vm.com/#/plugins-all\n\n### Python\n\nUse [pyenv] to install and manage Python versions for the current user:\n\n- [pyenv]\n- [pyenv-virtualenv]\n- [Python][python] v3.7 installed with pyenv\n\nRun Python playbook:\n\n```bash\nmake install-python\n```\n\nYou can disable installation by adding the following option to your\n[`machine.yaml`][machine.yaml]:\n\n```yaml\ninstall_python: false\n```\n\nThe [markosamuli.pyenv] role will modify your `.bashrc` and `.zshrc` files\nduring the setup. If you want to disable this, edit `machine.yaml` file and\ndisable the following configuration option.\n\n```yaml\npyenv_init_shell: false\n```\n\n[python]: https://www.python.org/\n[pyenv]: https://github.com/pyenv/pyenv\n[pyenv-virtualenv]: https://github.com/pyenv/pyenv-virtualenv\n\n### Ruby\n\nTo install Ruby for development, enable it in your `machine.yaml` configuration:\n\n```yaml\ninstall_ruby: true\n```\n\nThis will install:\n\n- [rbenv] using [zzet.rbenv] role\n- [Ruby][ruby] version 2.6.3 with rbenv\n\nRun Ruby playbook:\n\n```bash\nmake install-ruby\n```\n\nTo change the installed rubies and default version, add the following to your\n`machine.yaml` file and customize it to your needs:\n\n```yaml\nrbenv:\n  env: user\n  version: v1.1.2\n  default_ruby: 2.6.3\n  rubies:\n    - version: 2.6.3\n```\n\nThe role doesn't update your `.bashrc` or `.zshrc` files, so you need to add\nsomething like below to initialize rbenv in your shell:\n\n```bash\nif [ -z \"${RBENV_ROOT}\" ]; then\n  if [ -d \"$HOME/.rbenv\" ]; then\n    export PATH=$HOME/.rbenv/bin:$PATH;\n    export RBENV_ROOT=$HOME/.rbenv;\n    eval \"$(rbenv init -)\";\n  fi\nfi\n```\n\n[zzet.rbenv]: https://github.com/zzet/ansible-rbenv-role\n[rbenv]: https://github.com/rbenv/rbenv\n[ruby]: https://www.ruby-lang.org/en/\n\n### Node.js\n\n- [Node Version Manager][nvm] (NVM)\n- [Node.js][nodejs] LTS installed with NVM\n\nRun Node.js playbook:\n\n```bash\nmake install-node\n```\n\nYou can disable installation by adding the following option to your\n[`machine.yaml`][machine.yaml]:\n\n```yaml\ninstall_nodejs: false\n```\n\n[nvm]: https://github.com/creationix/nvm\n[nodejs]: https://nodejs.org/en/\n\n### Go\n\n[Go programming language][golang] installed using [markosamuli.golang] Ansible\nrole.\n\nRun Go playbook:\n\n```bash\nmake install-golang\n```\n\nYou can disable installation by adding the following option to your\n[`machine.yaml`][machine.yaml]:\n\n```yaml\ninstall_golang: false\n```\n\n[golang]: https://golang.org/\n\n### Lua\n\nYou can install [Lua][lua] programming language by adding the following option\nto your [`machine.yaml`][machine.yaml] file:\n\n```yaml\ninstall_lua: true\n```\n\nRun Lua playbook:\n\n```bash\nmake install-lua\n```\n\nThis will also install [LuaRocks][luarocks] package manager and [luacheck]\nrock using the custom [luarocks module][luarocks.py].\n\n[lua]: https://www.lua.org/\n[luarocks]: https://luarocks.org/\n[luacheck]: https://github.com/mpeterv/luacheck\n[luarocks.py]: playbooks/library/luarocks.py\n\n### Rust\n\nInstall [Rust][rust] programming language:\n\n```yaml\ninstall_rust: true\n```\n\nTo avoid modifying path during install:\n\n```yaml\nrust_modify_path: false\n```\n\nRun Rust playbook:\n\n```bash\nmake install-rust\n```\n\nTo uninstall Rust, run:\n\n```bash\nrustup self uninstall\n```\n\n[rust]: https://www.rust-lang.org/\n\n### Git\n\nLatest version of [Git][git] will be installed from Homebrew.\n\n[git]: https://git-scm.com/\n\n### Vagrant and VirtualBox\n\n[Vagrant][vagrant] and [VirtualBox][virtualbox] are no longer installed by\ndefault, but you can enable them by adding:\n\n```yaml\ninstall_vagrant: true\n```\n\n[vagrant]: https://www.vagrantup.com/\n[virtualbox]: https://www.virtualbox.org/\n\n### Docker\n\n[Docker for Mac][docker] will be installed by default.\n\nRun Docker playbook:\n\n```bash\nmake install-docker\n```\n\nTo disable installation, add:\n\n```yaml\ninstall_docker: false\n```\n\n[docker]: https://docs.docker.com/docker-for-mac/\n\n### Certbot\n\nInstall [Certbot][certbot] with:\n\n```yaml\ninstall_certbot: true\n```\n\n[certbot]: https://certbot.eff.org\n\n### Nmap\n\nInstall [Nmap][nmap] utility for network discovery and security auditing by\nadding:\n\n```yaml\ninstall_nmap: true\n```\n\n[nmap]: https://nmap.org/\n\n### Packer\n\nTo install [Packer][packer] add:\n\n```yaml\ninstall_packer: true\n```\n\n[packer]: https://packer.io/\n\n### Terraform\n\nInstall [tfenv] version manager for [Terraform][terraform] and install the\nlatest version.\n\nAny previous conflicting installations using [asdf] or [markosamuli.terraform]\nrole are removed.\n\nRun Terraform playbook:\n\n```bash\nmake install-terraform\n```\n\nDisable [Terraform][terraform] installation with:\n\n```yaml\ninstall_terraform: false\n```\n\n[terraform]: https://www.terraform.io/\n[tfenv]: https://github.com/tfutils/tfenv\n\n### Digital Ocean\n\nInstall [doctl] using Homebrew package manager by adding the following option to\nyour [`machine.yaml`][machine.yaml]:\n\n```yaml\ninstall_doctl: true\n```\n\nThis will uninstall any conflicting asdf plugins and versions.\n\n[doctl]: https://github.com/digitalocean/doctl\n\n### Amazon Web Services\n\n- [AWS CLI](https://aws.amazon.com/cli/)\n- [aws-shell](https://github.com/awslabs/aws-shell) - interactive shell for AWS\n  CLI\n- [AWS Vault](https://github.com/99designs/aws-vault) - a vault for securely\n  storing and accessing AWS credentials in development environments\n- [cli53](https://github.com/barnybug/cli53) - command line tool for Amazon\n  Route 53\n\nRun AWS playbook:\n\n```bash\nmake install-aws\n```\n\nYou can disable installation by adding the following option to your\n[`machine.yaml`][machine.yaml]:\n\n```yaml\ninstall_aws: false\n```\n\n### Google Cloud Platform\n\n[Google Cloud SDK][cloud-sdk] installed from the archive file under user home\ndirectory. You shouldn't try to install a global version with these playbooks.\n\nRun Google Cloud SDK playbook:\n\n```bash\nmake install-gcloud\n```\n\nDefault install path is in `~/google-cloud-sdk`, but you can install it to\nanother location, for example if you prefer `~/opt/google-cloud-sdk` add the\nfollowing option:\n\n```yaml\ngcloud_install_path: ~/opt\n```\n\nThe [markosamuli.gcloud] role will modify your `.bashrc` and `.zshrc` files. To\ndisable this and manage the configuration yourself, disable the following\nconfiguration option in the [`machine.yaml`][machine.yaml] file:\n\n```yaml\ngcloud_setup_shell: false\n```\n\nYou can disable installation by adding the following option to your\n[`machine.yaml`][machine.yaml]:\n\n```yaml\ninstall_gcloud: false\n```\n\n[cloud-sdk]: https://cloud.google.com/sdk/\n\n## Changes to existing configuration\n\nThe installer creates empty `~/.bash_profile` and `~/.bashrc` files and makes\nsure `~/.bashrc` is loaded from `~/.bash_profile`.\n\nThe installer makes changes to your `~/.bashrc` and `~/.zshrc` files, so take\nbackup copies of them before running the script.\n\n## Ansible Roles\n\nThe following external Ansible roles are installed and used. See\n[requirements.yml] file for the installed versions.\n\nTo install roles:\n\n```bash\nmake install-roles\n```\n\nTo update roles to the latest release versions:\n\n```bash\nmake update-roles\n```\n\nTo remove any outdated roles:\n\n```bash\nmake clean-roles\n```\n\n| Role                    | Build status                                                                                                                                  |\n| ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |\n| [markosamuli.asdf]      | [![Build Status](https://travis-ci.com/markosamuli/ansible-asdf.svg?branch=master)](https://travis-ci.com/markosamuli/ansible-asdf)           |\n| [markosamuli.aws_tools] | [![Build Status](https://travis-ci.com/markosamuli/ansible-aws-tools.svg?branch=master)](https://travis-ci.com/markosamuli/ansible-aws-tools) |\n| [markosamuli.gcloud]    | [![Build Status](https://travis-ci.com/markosamuli/ansible-gcloud.svg?branch=master)](https://travis-ci.com/markosamuli/ansible-gcloud)       |\n| [markosamuli.golang]    | [![Build Status](https://travis-ci.com/markosamuli/ansible-golang.svg?branch=master)](https://travis-ci.com/markosamuli/ansible-golang)       |\n| [markosamuli.nvm]       | [![Build Status](https://travis-ci.com/markosamuli/ansible-nvm.svg?branch=master)](https://travis-ci.com/markosamuli/ansible-nvm)             |\n| [markosamuli.packer]    | [![Build Status](https://travis-ci.com/markosamuli/ansible-packer.svg?branch=master)](https://travis-ci.com/markosamuli/ansible-packer)       |\n| [markosamuli.pyenv]     | [![Build Status](https://travis-ci.com/markosamuli/ansible-pyenv.svg?branch=master)](https://travis-ci.com/markosamuli/ansible-pyenv)         |\n| [markosamuli.rust]      | [![Build Status](https://travis-ci.com/markosamuli/ansible-rust.svg?branch=master)](https://travis-ci.com/markosamuli/ansible-rust)           |\n| [markosamuli.vagrant]   | [![Build Status](https://travis-ci.com/markosamuli/ansible-vagrant.svg?branch=master)](https://travis-ci.com/markosamuli/ansible-vagrant)     |\n| [zzet.rbenv]            | [![Build Status](https://travis-ci.org/zzet/ansible-rbenv-role.png?branch=master)](https://travis-ci.org/zzet/ansible-rbenv-role)             |\n\n[markosamuli.asdf]: https://github.com/markosamuli/ansible-asdf\n[markosamuli.aws_tools]: https://github.com/markosamuli/ansible-aws-tools\n[markosamuli.gcloud]: https://github.com/markosamuli/ansible-gcloud\n[markosamuli.golang]: https://github.com/markosamuli/ansible-golang\n[markosamuli.nvm]: https://github.com/markosamuli/ansible-nvm\n[markosamuli.packer]: https://github.com/markosamuli/ansible-packer\n[markosamuli.pyenv]: https://github.com/markosamuli/ansible-pyenv\n[markosamuli.rust]: https://github.com/markosamuli/ansible-rust\n[markosamuli.terraform]: https://github.com/markosamuli/ansible-terraform\n[markosamuli.vagrant]: https://github.com/markosamuli/ansible-vagrant\n[zzet.rbenv]: https://github.com/zzet/rbenv\n[requirements.yml]: requirements.yml\n\n## Development\n\nInstall [pre-commit] hooks:\n\n```bash\nmake setup-git-hooks\n```\n\nLint code and configuration:\n\n```bash\nmake lint\n```\n\n[pre-commit]: https://pre-commit.com/\n\n## References\n\nThis is based on my previous setup [markosamuli/machine] that was forked off\nfrom [caarlos0/machine] to suit my needs.\n\n[markosamuli/machine]: https://github.com/markosamuli/machine\n[caarlos0/machine]: https://github.com/caarlos0/machine\n\n## License\n\n- [MIT](LICENSE)\n\n## Authors\n\n- [@markosamuli](https://github.com/markosamuli)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkosamuli%2Fmacos-machine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkosamuli%2Fmacos-machine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkosamuli%2Fmacos-machine/lists"}