Infat is an ultra-powerful, macOS-native CLI tool for declaritively managing both file-type and URL-scheme associations. Avoid the hassle of navigating sub-menus to setup your default browser or image viewer, and the pain of doing that every time you get a new machine. Setup the rules once, and bask in your own ingenuity forevermore. Take back control, and bind your openers to whatever. You. Want. Override everything! Who's going to stop you?
- List which apps open a given file extension or URL scheme
- Set a default application for a file extension or URL scheme
- Load associations from a TOML config ([files] and [schemes] tables)
- Verbose, scriptable, and ideal for power users and admins
Get started by installing Infat — jump to the Install section below.
Place a TOML file at $XDG_CONFIG_HOME/infat/config.toml (or pass --config path/to/config.toml) with two tables:
Run without arguments to apply all entries.
-
Minimal & Scriptable
Infat is a single-binary tool that plays well in shells and automation pipelines. -
macOS-First
Leverages native NSWorkspace, Launch Services, and UTType for robust integration. -
Declarative Configuration
TOML support allows you to version-control your associations alongside other dotfiles.
You’ll need just and Swift 5.9+:
For the full history of changes, see CHANGELOG.md.
- Inspired by duti
- Built with Swift, thanks to corporate overlord Apple’s frameworks
- Thanks to all contributors and issue submitters (One day!!)
Infat is licensed under the MIT License.
Feel free to use, modify, and distribute!