OpenWith is a small Rust-based macOS terminal tool for inspecting and managing default apps for file types. It lets you see which app is currently set as the default for each file extension and update those associations from one place, without repetitive clicks or guessing bundle IDs.
OpenWith requires Rust. Install it via rustup:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh# From GitHub
cargo install --git https://github.com/ColeMei/openwith
# Or clone and build locally
cargo install --path .openwith # Launch interactive TUI (extensions view)
openwith list # Same as above
openwith apps # Launch interactive TUI (apps view)
openwith current pdf # Show default app for .pdf
openwith set md Typora # Set Typora as default for .mdRun openwith --help to see all commands.
Run openwith with no arguments to browse all file extensions, see their current defaults, and change them interactively. The TUI has two tabs you can switch between with Tab:
- Extensions — browse all file extensions, see their current default app, and change defaults via an app picker
- Apps — browse all installed apps in a master-detail view, see which extensions each app supports and which it's the default for
Press ? inside the TUI for keyboard shortcuts.
You can export your current associations to a TOML file and import them on another machine — making your "Open With" preferences portable, like a dotfile.
openwith export -o openwith.toml # Export
openwith import openwith.toml # Import on a new machineImport skips associations where the app isn't found, so the same config works across machines with different setups.
- Scans
/Applications,/System/Applications, and~/Applicationsfor.appbundles - Reads each app's
Info.plistto discover supported file extensions - Queries and sets defaults via native macOS Launch Services APIs
MIT
Special thanks to linux.do