TGViewer
yshalsager's Channel yshalsager's Channel @yshalsager_projects · 2.59K subscribers
Post #996 550
Managing macOS apps with mise

Mise downloads GitHub release assets, but it does not install DMG applications into /Applications. Add this custom global task to ~/.config/mise/config.toml:


[tasks."macos:install-dmg-app"]
hide = true
run = '''
set -euo pipefail

install_path="${MISE_TOOL_INSTALL_PATH:?MISE_TOOL_INSTALL_PATH is required}"
dmg_pattern="${MACOS_DMG_PATTERN:-*.dmg}"
app_pattern="${MACOS_APP_PATTERN:-*.app}"

dmg="$(find "$install_path" -maxdepth 1 -name "$dmg_pattern" -type f -print -quit)"
app_root="$install_path"

if [ -n "$dmg" ]; then
mount="$(hdiutil attach "$dmg" -nobrowse -readonly |
awk '/\/Volumes\// {print substr($0, index($0, "/Volumes/")); exit}')"

cleanup() {
hdiutil detach "$mount" -quiet 2>/dev/null || true
}
trap cleanup EXIT
app_root="$mount"
fi

app="$(find "$app_root" -maxdepth 1 -name "$app_pattern" -type d -print -quit)"
[ -n "$app" ] || { echo "No .app found in $app_root"; exit 1; }

app_name="${MACOS_APP_NAME:-$(basename "$app")}"
case "$app_name" in
*.app) ;;
*) app_name="$app_name.app" ;;
esac

ditto "$app" "/Applications/$app_name"
'''


Then declare apps using mise’s GitHub backend:


[tools."github:user/repo"]
version = "latest"
asset_pattern = "App-darwin-arm64-{{ version }}.dmg"
postinstall = "mise run --skip-tools --raw macos:install-dmg-app"


For ZIP releases containing an .app:


asset_pattern = "App-*.zip"
strip_components = 0
postinstall = "mise run --skip-tools --raw macos:install-dmg-app"


Install or upgrade:


mise install
mise upgrade
More from @yshalsager_projects
  1. Sep 21, 2026https://github.com/px0-ai/px0
  2. Sep 8, 2026Xiaomi Flashable Firmware Creator GUI v2.3.19 Highlights • Uses Xiaomi Flashable Firmware…
  3. Sep 8, 2026Xiaomi Flashable Firmware Creator v2.3.3 Highlights • Fixes #388: payload/A/B firmware pac…
  4. Aug 24, 2026Thinking in Python (Score: 150+ in 13 hours) Link: https://readhacker.news/s/73jgc Comment…
  5. Aug 21, 2026HTML Can Do That (Score: 157+ in 1 day) Link: https://readhacker.news/s/736EB Comments: ht…
  6. Aug 19, 2026PostgreSQL for Everything (🔥 Score: 153+ in 3 hours) Link: https://readhacker.news/s/736d…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →