cask "pycharm-oss" do arch arm: "-aarch64" version "2026.2.3" sha256 arm: "262c1b411ffe4df76f49db142a0ee64f69b23bc998bb56cad7c4cb4d665e056f", intel: "35fc8bcdd9f0922a2351ee83bee587a7b3ea854694d4070bc58494e01974fb19" url "https://github.com/JetBrains/intellij-community/releases/download/pycharm%2F#{version}/pycharm-#{version}#{arch}.dmg" name "PyCharm OSS" desc "Open-source edition of PyCharm" homepage "https://github.com/JetBrains/intellij-community" # Not every GitHub release provides a file for macOS, so we check multiple # recent releases instead of only the "latest" release. livecheck do url :url regex(/^pycharm[._-]v?(\d+(?:\.\d+)+)#{arch}\.dmg$/i) strategy :github_releases do |json, regex| json.map do |release| next if release["draft"] || release["prerelease"] release["assets"]&.map do |asset| match = asset["name"]&.match(regex) next if match.blank? match[1] end end.flatten end end depends_on :macos app "PyCharm OSS.app" uninstall quit: "com.jetbrains.pycharm.ce" zap trash: [ "~/Library/Application Support/JetBrains/PyCharmCE*", "~/Library/Caches/JetBrains/PyCharmCE*", "~/Library/Logs/JetBrains/PyCharmCE*", "~/Library/Preferences/com.jetbrains.pycharm.ce.plist", "~/Library/Saved Application State/com.jetbrains.pycharm.ce.savedState", ] end