cask "trae-cn" do arch arm: "arm64", intel: "x64" os macos: "darwin", linux: "linux" url_end = on_system_conditional macos: "dmg", linux: "tar.gz" version "2.3.62837" sha256 arm: "b8a033c4a4ebbd4802a14d517f802e12c506504edfe2fe957ecde700ae615b64", intel: "1b805bf6f3e1fc1ffac7807e3c6ea51d9c2bed8927a96829f7d23ea163117d54", arm64_linux: "aab2675b754aea1f921bf5b0a7f19188a25aae80e4e46b0870a8069b8946ad4f", x86_64_linux: "b84c558c5328e241ca35c53748bf56b098662a49989ec73c13f0f8abdd13589b" on_macos do depends_on macos: :monterey app "Trae CN.app" uninstall launchctl: "cn.trae.ShipIt", quit: "cn.trae.app" zap trash: [ "~/.trae-cn", "~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/cn.trae.app.sfl*", "~/Library/Application Support/Trae CN", "~/Library/Caches/cn.trae.app", "~/Library/Caches/cn.trae.ShipIt", "~/Library/HTTPStorages/cn.trae.app", "~/Library/Preferences/ByHost/cn.trae.ShipIt.*.plist", "~/Library/Preferences/cn.trae.app.helper.plist", "~/Library/Preferences/cn.trae.app.plist", "~/Library/Saved Application State/cn.trae.app.savedState", ] end on_linux do binary "bin/trae-cn" bash_completion "#{staged_path}/resources/completions/bash/trae-cn" zsh_completion "#{staged_path}/resources/completions/zsh/_trae-cn" zap trash: [ "~/.config/Trae CN", "~/.local/share/Trae CN", "~/.trae-cn", ] end url "https://lf-cdn.trae.com.cn/obj/trae-com-cn/pkg/app/releases/stable/#{version}/#{os}/Trae_CN-#{os}-#{arch}.#{url_end}" name "Trae CN" desc "Adaptive AI IDE" homepage "https://www.trae.com.cn/" livecheck do url "https://api.trae.ai/icube/api/v1/native/version/trae/cn/latest" strategy :json do |json| json.dig("data", "manifest", os, "version") end end auto_updates true end