A comprehensive Rust application for viewing file extensions supported by macOS applications and setting default applications for file types.
- 🔍 Scan System Applications: Automatically discovers all installed applications on macOS
- 📱 File Extension Analysis: Shows which file extensions each application supports
- 🎯 Interactive Query Mode: Search for applications that support specific file types
- ⚙️ Default App Setting: Set default applications for file types using the
duticommand - 🚀 UTI Detection: Intelligent UTI (Uniform Type Identifier) detection with retry mechanisms
- 📊 Categorized Display: File extensions are organized by category
- 🔧 Auto-dependency Management: Automatically installs
dutivia Homebrew if not available
- macOS 10.14 or later
- Homebrew (for automatic duti installation)
# Install dutis directly from Homebrew
brew install tsonglew/dutis/dutisThe application will automatically check for duti on startup and install it via Homebrew if it's not available. No manual installation is required!
# Clone the repository
git clone https://github.com/tsonglew/dutis.git
cd dutis
# Build the project
cargo build --release
# Run the application
cargo runcargo install --path .The application starts in interactive mode where you can:
- View All Applications: See a comprehensive list of all applications and their supported file extensions
- Search by Extension: Enter a file extension (e.g.,
txt,pdf,py) to find supporting applications - Set Default Apps: Choose an application to set as the default for a specific file type
- Debug Information: Access detailed scanning information
- System Directories: Scans
/Applications,/System/Applications, and~/Applications - Info.plist Parsing: Reads each application's
Info.plistfile to extract supported file extensions - UTI Mapping: Maps file extensions to their corresponding UTI (Uniform Type Identifier)
- Bundle ID Detection: Uses
mdlscommand to get the application's Bundle Identifier - UTI Detection: Creates temporary files with appropriate content to detect UTI
- Retry Mechanism: Implements intelligent retry logic for UTI detection
- duti Integration: Uses the
duticommand to set system-wide default applications
- Modular Design: Separated into logical modules (
app_scanner,plist_parser,platform) - Cross-Platform Ready: Platform-specific implementations with trait abstractions
- Error Handling: Comprehensive error handling using
anyhow - Async Ready: Designed to be easily extended with async operations
- anyhow: Error handling and propagation
- colored: Terminal output formatting and colors
- walkdir: Directory traversal
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.
If you encounter any issues or have questions, please create an issue on GitHub.