{"id":17494360,"url":"https://github.com/lkubb/salt-tool-brew-formula","last_synced_at":"2026-04-18T00:02:31.328Z","repository":{"id":134852557,"uuid":"483878489","full_name":"lkubb/salt-tool-brew-formula","owner":"lkubb","description":"Bootstrap and configure Homebrew, also for M1. Allows managing custom mirror settings and taps.","archived":false,"fork":false,"pushed_at":"2024-11-29T18:01:00.000Z","size":128,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-22T21:32:30.212Z","etag":null,"topics":["devops","homebrew","macos","salt-formula","saltstack"],"latest_commit_sha":null,"homepage":"","language":"Jinja","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lkubb.png","metadata":{"files":{"readme":"docs/README.rst","changelog":null,"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}},"created_at":"2022-04-21T02:22:42.000Z","updated_at":"2024-11-29T18:01:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"dffa4492-4de4-45b0-b350-21932b5b21d9","html_url":"https://github.com/lkubb/salt-tool-brew-formula","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lkubb/salt-tool-brew-formula","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lkubb%2Fsalt-tool-brew-formula","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lkubb%2Fsalt-tool-brew-formula/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lkubb%2Fsalt-tool-brew-formula/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lkubb%2Fsalt-tool-brew-formula/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lkubb","download_url":"https://codeload.github.com/lkubb/salt-tool-brew-formula/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lkubb%2Fsalt-tool-brew-formula/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31950891,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-17T17:29:20.459Z","status":"ssl_error","status_checked_at":"2026-04-17T17:28:47.801Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["devops","homebrew","macos","salt-formula","saltstack"],"created_at":"2024-10-19T13:06:17.850Z","updated_at":"2026-04-18T00:02:31.292Z","avatar_url":"https://github.com/lkubb.png","language":"Jinja","funding_links":[],"categories":[],"sub_categories":[],"readme":".. _readme:\n\nHomebrew Formula\n================\n\nManages Homebrew.\n\n.. contents:: **Table of Contents**\n   :depth: 1\n\nUsage\n-----\nApplying ``tool_brew`` will make sure ``brew`` is configured as specified.\n\nConfiguration\n-------------\n\nThis formula\n~~~~~~~~~~~~\nThe general configuration structure is in line with all other formulae from the `tool` suite, for details see :ref:`toolsuite`. An example pillar is provided, see :ref:`pillar.example`. Note that you do not need to specify everything by pillar. Often, it's much easier and less resource-heavy to use the ``parameters/\u003cgrain\u003e/\u003cvalue\u003e.yaml`` files for non-sensitive settings. The underlying logic is explained in :ref:`map.jinja`.\n\nUser-specific\n^^^^^^^^^^^^^\nThe following shows an example of ``tool_brew`` per-user configuration. If provided by pillar, namespace it to ``tool_global:users`` and/or ``tool_brew:users``. For the ``parameters`` YAML file variant, it needs to be nested under a ``values`` parent key. The YAML files are expected to be found in\n\n1. ``salt://tool_brew/parameters/\u003cgrain\u003e/\u003cvalue\u003e.yaml`` or\n2. ``salt://tool_global/parameters/\u003cgrain\u003e/\u003cvalue\u003e.yaml``.\n\n.. code-block:: yaml\n\n  user:\n\n      # Persist environment variables used by this formula for this\n      # user to this file (will be appended to a file relative to $HOME)\n    persistenv: '.config/zsh/zshenv'\n\n      # Add runcom hooks specific to this formula to this file\n      # for this user (will be appended to a file relative to $HOME)\n    rchook: '.config/zsh/zshrc'\n\nFormula-specific\n^^^^^^^^^^^^^^^^\n\n.. code-block:: yaml\n\n  tool_brew:\n      # Specify global configuration env vars.\n    config:\n      - HOMEBREW_NO_ANALYTICS\n      - HOMEBREW_NO_INSECURE_REDIRECT\n      - HOMEBREW_CASK_OPTS:\n          - --require-sha\n          - --no-quarantine\n      # Ensure brew bin dir is globally in/absent from `$PATH`.\n    globalpath: true\n      # When initially installing brew, use this version. Defaults to latest.\n    init_version: null\n      # Helper to automatically install packages.\n    packages:\n      - git\n      - gpg\n      - wget\n    taps:\n        # List of taps that should not be available.\n      absent:\n        - unwanted/tap\n        # By default, taps not hosted on Github are not updated automatically\n        # (for performance reasons). Force automatic updates for taps managed\n        # with this formula, either by default or only for specific ones.\n        # This formula forces autoupdate for mirrors of offical taps automatically.\n      autoupdate:\n        default: false\n        my/customtap: true\n        # Force override of existing remotes with specified ones\n        # (not necessary for mirrors of official taps).\n      forced: false\n        # homebrew-cask* mirrors and custom taps go here:\n      wanted:\n            # If you specify the name of an official tap, the remote will be matched.\n            # If you specify the name of an existing non-official tap and\n            #   taps_forced is set to true, the remote will be matched.\n        - homebrew/cask: https://mygit.example.com/my/homebrew-cask\n            # brew tap short syntax works as well\n            # (mapped to github.com/\u003cfirst\u003e/homebrew-\u003csecond\u003e)\n        - blacktop/tap\n        - my/customtap: https://mygit.example.com/my/custom-tap\n\n\nAvailable states\n----------------\n\nThe following states are found in this formula:\n\n.. contents::\n   :local:\n\n\n``tool_brew``\n~~~~~~~~~~~~~\n*Meta-state*.\n\nPerforms all operations described in this formula according to the specified configuration.\n\n\n``tool_brew.package``\n~~~~~~~~~~~~~~~~~~~~~\nInstalls Homebrew using the official package.\n\n\n``tool_brew.globalpath``\n~~~~~~~~~~~~~~~~~~~~~~~~\nEnsures brew bin dir is globally in/absent from ``$PATH``.\n\nThis is achieved by appending it to/removing it from ``/etc/paths``.\n\n\n``tool_brew.env_vars``\n~~~~~~~~~~~~~~~~~~~~~~\nSets global homebrew environment variables.\n\nThese contain\n\n* most of the default settings issued by ``brew shellenv``\n  (not those modifying ``$PATH``, ``$MANPATH`` and ``$INFOPATH``)\n* possible necessary variables when using custom remote mirrors\n* as well as custom environment vars passed in ``config``.\n\nPermanent $PATH modification can be achieved via the ``globalenv`` setting.\nModifying $MANPATH, $INFOPATH and $fpath (for zsh) is left to the user.\n\n\n``tool_brew.taps``\n~~~~~~~~~~~~~~~~~~\nManages Homebrew taps. This allows to\n\n* add custom taps, either on Github or elsewhere and\n* replace default taps (e.g. `homebrew/cask`) with custom mirrors.\n\n\n``tool_brew.packages``\n~~~~~~~~~~~~~~~~~~~~~~\n\n\n\n``tool_brew.gnu``\n~~~~~~~~~~~~~~~~~\nCreates a special directory that contains unprefixed symlinks\nto GNU versions of tools (e.g. ``awk`` instead of ``gawk``).\n\nThis can be used to replace the BSD variants found in MacOS by default.\n\n\n``tool_brew.command_line_tools``\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n\n\n``tool_brew.clean``\n~~~~~~~~~~~~~~~~~~~\n*Meta-state*.\n\nUndoes everything performed in the ``tool_brew`` meta-state\nin reverse order.\n\n\n``tool_brew.package.clean``\n~~~~~~~~~~~~~~~~~~~~~~~~~~~\nRemoves Homebrew.\n\n   On systems where the prefix is not the installation dir,\n   which is the case on x86_64 Macs by default, this will first\n   uninstall all regular packages to not leave stuff behind\n   (eg in `/usr/local/bin`).\n\n\n``tool_brew.globalpath.clean``\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n\n\n``tool_brew.env_vars.clean``\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n\n\n``tool_brew.taps.clean``\n~~~~~~~~~~~~~~~~~~~~~~~~\n\n\n\n``tool_brew.packages.clean``\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n\n\n``tool_brew.gnu.clean``\n~~~~~~~~~~~~~~~~~~~~~~~\n\n\n\n\nDevelopment\n-----------\n\nContributing to this repo\n~~~~~~~~~~~~~~~~~~~~~~~~~\n\nCommit messages\n^^^^^^^^^^^^^^^\n\nCommit message formatting is significant.\n\nPlease see `How to contribute \u003chttps://github.com/saltstack-formulas/.github/blob/master/CONTRIBUTING.rst\u003e`_ for more details.\n\npre-commit\n^^^^^^^^^^\n\n`pre-commit \u003chttps://pre-commit.com/\u003e`_ is configured for this formula, which you may optionally use to ease the steps involved in submitting your changes.\nFirst install  the ``pre-commit`` package manager using the appropriate `method \u003chttps://pre-commit.com/#installation\u003e`_, then run ``bin/install-hooks`` and\nnow ``pre-commit`` will run automatically on each ``git commit``.\n\n.. code-block:: console\n\n  $ bin/install-hooks\n  pre-commit installed at .git/hooks/pre-commit\n  pre-commit installed at .git/hooks/commit-msg\n\nState documentation\n~~~~~~~~~~~~~~~~~~~\nThere is a script that semi-autodocuments available states: ``bin/slsdoc``.\n\nIf a ``.sls`` file begins with a Jinja comment, it will dump that into the docs. It can be configured differently depending on the formula. See the script source code for details currently.\n\nThis means if you feel a state should be documented, make sure to write a comment explaining it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flkubb%2Fsalt-tool-brew-formula","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flkubb%2Fsalt-tool-brew-formula","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flkubb%2Fsalt-tool-brew-formula/lists"}