├── .github └── workflows │ ├── publish.yml │ ├── tests.yml │ └── update.yml ├── .gitignore ├── Formula ├── hid_bootloader_cli.rb ├── mdloader.rb └── qmk.rb ├── LICENSE.md └── README.md /.github/workflows/publish.yml: -------------------------------------------------------------------------------- 1 | name: brew pr-pull 2 | on: 3 | pull_request_target: 4 | types: 5 | - labeled 6 | env: 7 | HOMEBREW_NO_INSTALL_FROM_API: 1 8 | jobs: 9 | pr-pull: 10 | if: contains(github.event.pull_request.labels.*.name, 'pr-pull') 11 | runs-on: ubuntu-22.04 12 | steps: 13 | - name: Set up Homebrew 14 | uses: Homebrew/actions/setup-homebrew@master 15 | 16 | - name: Set up git 17 | uses: Homebrew/actions/git-user-config@master 18 | with: 19 | username: qmk-bot 20 | 21 | - name: Pull bottles 22 | env: 23 | HOMEBREW_GITHUB_API_TOKEN: ${{ github.token }} 24 | HOMEBREW_GITHUB_PACKAGES_TOKEN: ${{ github.token }} 25 | HOMEBREW_GITHUB_PACKAGES_USER: ${{ github.repository_owner }} 26 | PULL_REQUEST: ${{ github.event.pull_request.number }} 27 | run: brew pr-pull --debug --tap="$GITHUB_REPOSITORY" "$PULL_REQUEST" 28 | 29 | - name: Push commits 30 | uses: Homebrew/actions/git-try-push@master 31 | with: 32 | token: ${{ github.token }} 33 | branch: master 34 | 35 | - name: Delete branch 36 | if: github.event.pull_request.head.repo.fork == false 37 | env: 38 | BRANCH: ${{ github.event.pull_request.head.ref }} 39 | run: git push --delete origin "$BRANCH" 40 | -------------------------------------------------------------------------------- /.github/workflows/tests.yml: -------------------------------------------------------------------------------- 1 | name: brew test-bot 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | pull_request: 8 | 9 | jobs: 10 | test-bot: 11 | strategy: 12 | matrix: 13 | os: [macos-13, macos-14, macos-15] 14 | runs-on: ${{ matrix.os }} 15 | steps: 16 | - name: Set up Homebrew 17 | id: set-up-homebrew 18 | uses: Homebrew/actions/setup-homebrew@master 19 | 20 | - name: Cache Homebrew Bundler RubyGems 21 | uses: actions/cache@v4 22 | with: 23 | path: ${{ steps.set-up-homebrew.outputs.gems-path }} 24 | key: ${{ matrix.os }}-rubygems-${{ steps.set-up-homebrew.outputs.gems-hash }} 25 | restore-keys: ${{ matrix.os }}-rubygems- 26 | 27 | - run: brew test-bot --only-cleanup-before 28 | 29 | - run: brew test-bot --only-setup 30 | 31 | - run: brew test-bot --only-tap-syntax 32 | 33 | - run: brew test-bot --only-formulae --root-url='https://ghcr.io/v2/qmk/qmk' 34 | if: github.event_name == 'pull_request' 35 | 36 | - name: Upload bottles as artifact 37 | if: always() && github.event_name == 'pull_request' 38 | uses: actions/upload-artifact@v4 39 | with: 40 | name: bottles_${{ matrix.os }} 41 | path: '*.bottle.*' 42 | -------------------------------------------------------------------------------- /.github/workflows/update.yml: -------------------------------------------------------------------------------- 1 | name: Autocreate PR for QMK CLI updates 2 | on: 3 | workflow_dispatch: 4 | schedule: 5 | - cron: '45 5 * * *' 6 | 7 | jobs: 8 | update: 9 | runs-on: macos-latest 10 | steps: 11 | - name: Update Homebrew formula 12 | uses: dawidd6/action-homebrew-bump-formula@v3 13 | with: 14 | # Required, custom GitHub access token with only the 'public_repo' scope enabled 15 | token: ${{secrets.QMK_BOT_TOKEN}} 16 | # Optional, use the origin repository instead of forking 17 | no_fork: true 18 | # Bump all outdated formulae in this tap 19 | tap: qmk/homebrew-qmk 20 | # Bump only these formulae if outdated 21 | formula: qmk 22 | # Optional, if don't want to check for already open PRs 23 | force: false # true 24 | # Need to set this input if want to use `brew livecheck` 25 | livecheck: true 26 | message: | 27 | **⚠️ Do not merge this PR directly! ⚠️** 28 | Wait for `brew test-bot` to complete, then label it with `pr-pull` instead to make the bot build and upload the bottle. 29 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | create 2 | test 3 | -------------------------------------------------------------------------------- /Formula/hid_bootloader_cli.rb: -------------------------------------------------------------------------------- 1 | class HidBootloaderCli < Formula 2 | desc "LUFA HID Bootloader CLI" 3 | homepage "https://www.lufa-lib.org" 4 | url "https://github.com/abcminiuser/lufa/archive/refs/tags/LUFA-210130.tar.gz" 5 | sha256 "9b56921d59a50099cc6a8026248380a10ff518c8d02b547d6e617f71e6038f57" 6 | license "GPL-3.0-only" 7 | revision 4 8 | head "https://github.com/abcminiuser/lufa.git", branch: "master" 9 | 10 | bottle do 11 | root_url "https://ghcr.io/v2/qmk/qmk" 12 | sha256 cellar: :any_skip_relocation, arm64_sequoia: "e6dba52e874d718b6c2ebd876cc200bfb95305831cfd6a8a6155eb0e05670e22" 13 | sha256 cellar: :any_skip_relocation, arm64_sonoma: "0d0749ff8bd4e1833ced1d17e87e089229345b148266f157d6f80ec100c58398" 14 | sha256 cellar: :any_skip_relocation, ventura: "e72d8880a479e2bb497e0691a80818b24c20dd13e0a6d53549e1b722bbfae740" 15 | end 16 | 17 | def install 18 | chdir "Bootloaders/HID/HostLoaderApp" do 19 | ENV["OS"] = "MACOSX" 20 | ENV["SDK"] = MacOS.sdk_path || "/" 21 | 22 | system "make" 23 | bin.install "hid_bootloader_cli" 24 | end 25 | end 26 | 27 | test do 28 | output = shell_output("#{bin}/hid_bootloader_cli 2>&1", 1) 29 | assert_match "Filename must be specified", output 30 | end 31 | end 32 | -------------------------------------------------------------------------------- /Formula/mdloader.rb: -------------------------------------------------------------------------------- 1 | class Mdloader < Formula 2 | desc "Massdrop Firmware Loader" 3 | homepage "https://github.com/Massdrop/mdloader" 4 | url "https://github.com/Massdrop/mdloader/archive/refs/tags/1.0.7.tar.gz" 5 | sha256 "a3c47ed285aaa94e9a5c00c84a15798e6d90f1bb13db846cc71cad6eb4a2d7c4" 6 | revision 4 7 | head "https://github.com/Massdrop/mdloader.git", branch: "master" 8 | 9 | bottle do 10 | root_url "https://ghcr.io/v2/qmk/qmk" 11 | sha256 cellar: :any_skip_relocation, arm64_sequoia: "48e4f992435b4c0b1650757da71f3833028647b5c8a5e0fab645c7abd4674184" 12 | sha256 cellar: :any_skip_relocation, arm64_sonoma: "a1a444177362de9263c2fdde57f8939d5fe1566d4372b5066d47c670a36cd90c" 13 | sha256 cellar: :any_skip_relocation, ventura: "2d583d0b049629045909ee41b651b735fef650d5088c284f05c1d843b4c68888" 14 | end 15 | 16 | def install 17 | system "make", "prefix=#{prefix}" 18 | 19 | Dir.chdir "build" 20 | bin.install "mdloader" 21 | end 22 | 23 | test do 24 | assert_equal `mdloader --version`.lines.first, "Massdrop Loader 1.07\n" 25 | end 26 | end 27 | -------------------------------------------------------------------------------- /Formula/qmk.rb: -------------------------------------------------------------------------------- 1 | class Qmk < Formula 2 | include Language::Python::Virtualenv 3 | 4 | desc "Quantum Mechanical Keyboard (QMK) Firmware" 5 | homepage "https://docs.qmk.fm/" 6 | url "https://files.pythonhosted.org/packages/3b/76/633222ed56333f0f6c82c29cb4afaa1e3e21b938445a34337978263d1e38/qmk-1.1.8.tar.gz" 7 | sha256 "0b426b6bf20aeb5b67806b2e127303e26c9245cfe265581d6046cc5edc29059d" 8 | license "MIT" 9 | 10 | bottle do 11 | root_url "https://ghcr.io/v2/qmk/qmk" 12 | sha256 cellar: :any, arm64_sonoma: "9a3503d5495e45d18e944f11e6c26326e725161bff4e8320aa8ff2bdbde5b61e" 13 | sha256 cellar: :any, ventura: "f8bb9c187b36cd48eb33417aed30d612b9f71f5ae8fd599845a789f98c78cc52" 14 | end 15 | 16 | depends_on "rust" => :build 17 | 18 | depends_on "avrdude" 19 | depends_on "bootloadhid" 20 | depends_on "clang-format" 21 | depends_on "dfu-programmer" 22 | depends_on "dfu-util" 23 | depends_on "hid_bootloader_cli" 24 | depends_on "hidapi" 25 | depends_on "libusb" 26 | depends_on "make" 27 | depends_on "mdloader" 28 | depends_on "osx-cross/arm/arm-none-eabi-gcc@8" 29 | depends_on "osx-cross/avr/avr-gcc@8" 30 | depends_on "pillow" 31 | depends_on "python" 32 | depends_on "teensy_loader_cli" 33 | 34 | on_arm do 35 | depends_on "pkg-config" => :build 36 | end 37 | 38 | resource "argcomplete" do 39 | url "https://files.pythonhosted.org/packages/16/0f/861e168fc813c56a78b35f3c30d91c6757d1fd185af1110f1aec784b35d0/argcomplete-3.6.2.tar.gz" 40 | sha256 "d0519b1bc867f5f4f4713c41ad0aba73a4a5f007449716b16f385f2166dc6adf" 41 | end 42 | 43 | resource "attrs" do 44 | url "https://files.pythonhosted.org/packages/5a/b0/1367933a8532ee6ff8d63537de4f1177af4bff9f3e829baf7331f595bb24/attrs-25.3.0.tar.gz" 45 | sha256 "75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b" 46 | end 47 | 48 | resource "colorama" do 49 | url "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz" 50 | sha256 "08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44" 51 | end 52 | 53 | resource "dotty-dict" do 54 | url "https://files.pythonhosted.org/packages/6a/ab/88d67f02024700b48cd8232579ad1316aa9df2272c63049c27cc094229d6/dotty_dict-1.3.1.tar.gz" 55 | sha256 "4b016e03b8ae265539757a53eba24b9bfda506fb94fbce0bee843c6f05541a15" 56 | end 57 | 58 | resource "halo" do 59 | url "https://files.pythonhosted.org/packages/ee/48/d53580d30b1fabf25d0d1fcc3f5b26d08d2ac75a1890ff6d262f9f027436/halo-0.0.31.tar.gz" 60 | sha256 "7b67a3521ee91d53b7152d4ee3452811e1d2a6321975137762eb3d70063cc9d6" 61 | end 62 | 63 | resource "hid" do 64 | url "https://files.pythonhosted.org/packages/d3/9c/6f33de7dbf6f9054ebf312c01b3440040526fb133f3e7de2b5fe81184163/hid-1.0.7.tar.gz" 65 | sha256 "3f809e292ab52c4435ad1442c8ef205be4c9ca4eeb80fb47c7d98e0c75527b2a" 66 | end 67 | 68 | resource "hjson" do 69 | url "https://files.pythonhosted.org/packages/82/e5/0b56d723a76ca67abadbf7fb71609fb0ea7e6926e94fcca6c65a85b36a0e/hjson-3.1.0.tar.gz" 70 | sha256 "55af475a27cf83a7969c808399d7bccdec8fb836a07ddbd574587593b9cdcf75" 71 | end 72 | 73 | resource "jsonschema" do 74 | url "https://files.pythonhosted.org/packages/bf/d3/1cf5326b923a53515d8f3a2cd442e6d7e94fcc444716e879ea70a0ce3177/jsonschema-4.24.0.tar.gz" 75 | sha256 "0b4e8069eb12aedfa881333004bccaec24ecef5a8a6a4b6df142b2cc9599d196" 76 | end 77 | 78 | resource "jsonschema-specifications" do 79 | url "https://files.pythonhosted.org/packages/bf/ce/46fbd9c8119cfc3581ee5643ea49464d168028cfb5caff5fc0596d0cf914/jsonschema_specifications-2025.4.1.tar.gz" 80 | sha256 "630159c9f4dbea161a6a2205c3011cc4f18ff381b189fff48bb39b9bf26ae608" 81 | end 82 | 83 | resource "log-symbols" do 84 | url "https://files.pythonhosted.org/packages/45/87/e86645d758a4401c8c81914b6a88470634d1785c9ad09823fa4a1bd89250/log_symbols-0.0.14.tar.gz" 85 | sha256 "cf0bbc6fe1a8e53f0d174a716bc625c4f87043cc21eb55dd8a740cfe22680556" 86 | end 87 | 88 | resource "milc" do 89 | url "https://files.pythonhosted.org/packages/f1/85/36cf4fd4cbcc25c6ee238056342decb800b6928080fe20b35d87f4c498ad/milc-1.9.1.tar.gz" 90 | sha256 "d89c9fa85984adca2e49b8f4a3a77bd649df6553c92583be38f55e9a9343a65e" 91 | end 92 | 93 | resource "pillow" do 94 | url "https://files.pythonhosted.org/packages/af/cb/bb5c01fcd2a69335b86c22142b2bccfc3464087efb7fd382eee5ffc7fdf7/pillow-11.2.1.tar.gz" 95 | sha256 "a64dd61998416367b7ef979b73d3a85853ba9bec4c2925f74e588879a58716b6" 96 | end 97 | 98 | resource "platformdirs" do 99 | url "https://files.pythonhosted.org/packages/fe/8b/3c73abc9c759ecd3f1f7ceff6685840859e8070c4d947c93fae71f6a0bf2/platformdirs-4.3.8.tar.gz" 100 | sha256 "3d512d96e16bcb959a814c9f348431070822a6496326a4be0911c40b5a74c2bc" 101 | end 102 | 103 | resource "pygments" do 104 | url "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" 105 | sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" 106 | end 107 | 108 | resource "pyserial" do 109 | url "https://files.pythonhosted.org/packages/1e/7d/ae3f0a63f41e4d2f6cb66a5b57197850f919f59e558159a4dd3a818f5082/pyserial-3.5.tar.gz" 110 | sha256 "3c77e014170dfffbd816e6ffc205e9842efb10be9f58ec16d3e8675b4925cddb" 111 | end 112 | 113 | resource "pyusb" do 114 | url "https://files.pythonhosted.org/packages/00/6b/ce3727395e52b7b76dfcf0c665e37d223b680b9becc60710d4bc08b7b7cb/pyusb-1.3.1.tar.gz" 115 | sha256 "3af070b607467c1c164f49d5b0caabe8ac78dbed9298d703a8dbf9df4052d17e" 116 | end 117 | 118 | resource "referencing" do 119 | url "https://files.pythonhosted.org/packages/2f/db/98b5c277be99dd18bfd91dd04e1b759cad18d1a338188c936e92f921c7e2/referencing-0.36.2.tar.gz" 120 | sha256 "df2e89862cd09deabbdba16944cc3f10feb6b3e6f18e902f7cc25609a34775aa" 121 | end 122 | 123 | resource "rpds-py" do 124 | url "https://files.pythonhosted.org/packages/8c/a6/60184b7fc00dd3ca80ac635dd5b8577d444c57e8e8742cecabfacb829921/rpds_py-0.25.1.tar.gz" 125 | sha256 "8960b6dac09b62dac26e75d7e2c4a22efb835d827a7278c34f72b2b84fa160e3" 126 | end 127 | 128 | resource "six" do 129 | url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" 130 | sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" 131 | end 132 | 133 | resource "spinners" do 134 | url "https://files.pythonhosted.org/packages/d3/91/bb331f0a43e04d950a710f402a0986a54147a35818df0e1658551c8d12e1/spinners-0.0.24.tar.gz" 135 | sha256 "1eb6aeb4781d72ab42ed8a01dcf20f3002bf50740d7154d12fb8c9769bf9e27f" 136 | end 137 | 138 | resource "termcolor" do 139 | url "https://files.pythonhosted.org/packages/ca/6c/3d75c196ac07ac8749600b60b03f4f6094d54e132c4d94ebac6ee0e0add0/termcolor-3.1.0.tar.gz" 140 | sha256 "6a6dd7fbee581909eeec6a756cff1d7f7c376063b14e4a298dc4980309e55970" 141 | end 142 | 143 | resource "types-colorama" do 144 | url "https://files.pythonhosted.org/packages/59/73/0fb0b9fe4964b45b2a06ed41b60c352752626db46aa0fb70a49a9e283a75/types-colorama-0.4.15.20240311.tar.gz" 145 | sha256 "a28e7f98d17d2b14fb9565d32388e419f4108f557a7d939a66319969b2b99c7a" 146 | end 147 | 148 | def install 149 | virtualenv_install_with_resources 150 | end 151 | 152 | def qmk_home_set? 153 | `#{HOMEBREW_PREFIX}/bin/qmk config`.include? "user.qmk_home" 154 | end 155 | 156 | def caveats 157 | if (HOMEBREW_PREFIX/"bin/qmk").exist? && !qmk_home_set? 158 | <<~EOS 159 | The QMK CLI has been installed but your QMK home is not set. 160 | 161 | This may be your first install. Please run `qmk setup` now to find or clone 162 | the repository to your home directory. 163 | 164 | If you have forked qmk/qmk_firmware on GitHub or are using a third-party fork, 165 | you can clone it instead like so: 166 | 167 | qmk setup /qmk_firmware 168 | 169 | To set a specific QMK home (the directory the repository is cloned into), 170 | use the -H flag: 171 | 172 | qmk setup -H /your/preferred/path 173 | EOS 174 | end 175 | end 176 | 177 | test do 178 | system bin/"qmk", "setup", "-n" 179 | end 180 | end 181 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Clueboard 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # QMK Homebrew 2 | 3 | This repository contains Homebrew formulae for QMK software. 4 | 5 | ## How do I install these formulae? 6 | 7 | `brew install qmk/qmk/` 8 | 9 | Or `brew tap qmk/qmk` and then `brew install `. 10 | 11 | ## Documentation 12 | 13 | `brew help`, `man brew` or check [Homebrew's documentation](https://docs.brew.sh). 14 | --------------------------------------------------------------------------------