{"id":37229409,"url":"https://github.com/jackchuka/dutix","last_synced_at":"2026-04-02T19:20:41.541Z","repository":{"id":332017253,"uuid":"1132351338","full_name":"jackchuka/dutix","owner":"jackchuka","description":"Set default apps, migrate file associations, and manage handlers on macOS","archived":false,"fork":false,"pushed_at":"2026-03-24T02:10:44.000Z","size":1816,"stargazers_count":14,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-25T01:50:39.764Z","etag":null,"topics":["cli","golang","macos","macosx"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jackchuka.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-11T19:52:37.000Z","updated_at":"2026-03-24T01:55:34.000Z","dependencies_parsed_at":"2026-02-18T17:00:30.499Z","dependency_job_id":null,"html_url":"https://github.com/jackchuka/dutix","commit_stats":null,"previous_names":["jackchuka/dutix"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/jackchuka/dutix","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackchuka%2Fdutix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackchuka%2Fdutix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackchuka%2Fdutix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackchuka%2Fdutix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jackchuka","download_url":"https://codeload.github.com/jackchuka/dutix/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackchuka%2Fdutix/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31314375,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","golang","macos","macosx"],"created_at":"2026-01-15T03:32:37.538Z","updated_at":"2026-04-02T19:20:41.513Z","avatar_url":"https://github.com/jackchuka.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dutix\n\n[![Test](https://github.com/jackchuka/dutix/workflows/Test/badge.svg)](https://github.com/jackchuka/dutix/actions)\n[![Go Report Card](https://goreportcard.com/badge/github.com/jackchuka/dutix)](https://goreportcard.com/report/github.com/jackchuka/dutix)\n\n![dutix-hero](assets/hero.png)\n\n**dutix** (Default UTI eXtension handler manager) is a command-line tool for managing default application handlers for file types, UTIs (Uniform Type Identifiers), and URL schemes on macOS.\n\n## Features\n\n- 🎯 Set default applications for file extensions, UTIs, and URL schemes\n- 🔄 Migrate all file associations from one app to another\n- 📋 List and inspect installed applications and their capabilities\n- 🔍 Query current default handlers for any file type or URL scheme\n- 🛡️ Safe operations with preview, confirmation, and dry-run modes\n- 📊 Multiple output formats (table, JSON, YAML)\n- 🚀 Fast native macOS integration\n\n![Screenshot](assets/screenshot.png)\n\n## Requirements\n\n- macOS 12.0 (Monterey) or later\n- Go 1.25 or later (for building from source)\n\n## Installation\n\n### Homebrew\n\n```bash\nbrew install jackchuka/tap/dutix\n```\n\n### From Source\n\n```bash\n# Go install\ngo install github.com/jackchuka/dutix/cmd/dutix@latest\n\n# Clone and build\ngit clone https://github.com/jackchuka/dutix.git\ncd dutix\ngo build -o dutix ./cmd/dutix/\n```\n\n## Quick Start\n\n```bash\n# Set VS Code as default for text files\ndutix set \"Visual Studio Code\" --extensions txt,md,json\n\n# Check what handles .txt files\ndutix targets show txt\n\n# Migrate all file associations from one app to another\ndutix apps migrate TextEdit \"Visual Studio Code\"\n\n# List all installed applications\ndutix apps list\n```\n\n## Usage\n\n### Global Flags\n\nAvailable on all commands:\n\n| Flag       | Short | Description                               |\n| ---------- | ----- | ----------------------------------------- |\n| `--debug`  | —     | Enable debug logging                      |\n| `--quiet`  | `-q`  | Suppress non-essential output             |\n| `--output` | `-o`  | Output format: `table`, `json`, or `yaml` |\n\n### Commands\n\n#### `dutix set \u003capp\u003e [flags]`\n\nSet default application for file extensions, UTIs, or URL schemes.\n\n**Flags:**\n\n- `--extensions` - Comma-separated file extensions (e.g., `txt,md,json`)\n- `--utis` - Comma-separated UTI identifiers (e.g., `public.plain-text`)\n- `--schemes` - Comma-separated URL schemes (e.g., `http,https`)\n- `--dry-run` - Preview changes without applying\n- `--yes` - Skip confirmation prompt\n\n**Examples:**\n\n```bash\n# Set default for file extensions\ndutix set \"Visual Studio Code\" --extensions txt,md,json\n\n# Set default for URL schemes\ndutix set Safari --schemes http,https\n\n# Preview changes first\ndutix set TextEdit --extensions txt --dry-run\n\n# Skip confirmation\ndutix set Finder --extensions zip,tar --yes\n```\n\n#### `dutix apps list [flags]`\n\nList all installed applications.\n\n**Flags:**\n\n- `--filter` - Filter by name or path (case-insensitive)\n\n**Examples:**\n\n```bash\n# List all applications\ndutix apps list\n\n# Find specific app\ndutix apps list --filter \"Visual\"\n\n# JSON output\ndutix apps list --output json\n```\n\n#### `dutix apps show \u003capp-name\u003e`\n\nShow detailed information about an application including supported file types and UTIs.\n\n**Examples:**\n\n```bash\ndutix apps show \"Visual Studio Code\"\ndutix apps show Safari --output json\n```\n\n#### `dutix apps migrate \u003cfrom-app\u003e \u003cto-app\u003e [flags]`\n\nMigrate all file type associations from one application to another.\n\n**Flags:**\n\n- `--dry-run` - Preview migration without applying changes\n- `--yes` - Skip confirmation prompt\n\n**Examples:**\n\n```bash\n# Preview migration\ndutix apps migrate TextEdit \"Visual Studio Code\" --dry-run\n\n# Migrate with confirmation\ndutix apps migrate TextEdit \"Visual Studio Code\"\n\n# Auto-migrate without prompts\ndutix apps migrate \"Old App\" \"New App\" --yes\n```\n\n#### `dutix targets show \u003ctarget\u003e`\n\nShow current default handler for a file extension, UTI, or URL scheme.\n\nThe command automatically detects the target type:\n\n- Extensions: `txt`, `json`, `pdf`\n- UTIs: `public.plain-text`, `public.json`\n- Schemes: `http`, `https`, `mailto`\n\n**Examples:**\n\n```bash\n# Check file extension\ndutix targets show txt\n\n# Check UTI\ndutix targets show public.plain-text\n\n# Check URL scheme\ndutix targets show http\n```\n\n#### `dutix version`\n\nDisplay version information including git commit and build date.\n\n```bash\ndutix version\n```\n\n## Common Use Cases\n\n### Setting Up a New Code Editor\n\n```bash\n# Set VS Code as default for common development files\ndutix set \"Visual Studio Code\" --extensions \\\n  \"txt,md,json,yaml,yml,toml,ini,conf,\\\n  js,ts,jsx,tsx,mjs,\\\n  py,rb,go,rs,java,c,cpp,h,hpp,\\\n  html,css,scss,sass\"\n\n# Preview first with dry-run\ndutix set \"VS Code\" --extensions txt,md --dry-run\n```\n\n### Switching from One App to Another\n\n```bash\n# Migrate everything from TextEdit to VS Code\ndutix apps migrate TextEdit \"Visual Studio Code\"\n\n# Preview the migration first\ndutix apps migrate Safari Chrome --dry-run\n```\n\n### Setting Default Web Browser\n\n```bash\n# Set Safari as default browser\ndutix set Safari --schemes http,ftp,ftps\n\n# Set Chrome\ndutix set \"Google Chrome\" --schemes http\n```\n\n### Checking Current Defaults\n\n```bash\n# What opens .txt files?\ndutix targets show txt\n\n# What opens HTTP links?\ndutix targets show http\n\n# Get JSON output for scripting\ndutix targets show txt --output json --quiet\n```\n\n### Finding App Capabilities\n\n```bash\n# See what file types an app supports\ndutix apps show \"Visual Studio Code\"\n\n# Find apps by name\ndutix apps list --filter code\n\n# Get machine-readable output\ndutix apps show Safari --output json\n```\n\n## Output Formats\n\n### Table (Default)\n\nHuman-readable formatted tables:\n\n```bash\ndutix apps list\n```\n\n### JSON\n\nMachine-parseable JSON output:\n\n```bash\ndutix apps list --output json\ndutix targets show txt --output json | jq '.defaultApp'\n```\n\n### YAML\n\nStructured YAML output:\n\n```bash\ndutix apps show \"Visual Studio Code\" --output yaml\n```\n\n## Development\n\n### Project Structure\n\n```\ndutix/\n├── cmd/dutix/           # Application entry point\n├── internal/\n│   ├── cli/            # CLI commands and subcommands\n│   ├── domain/         # Business logic (planner, applier)\n│   ├── formatter/      # Output formatters (table, JSON, YAML)\n│   ├── logger/         # Logging utilities\n│   └── macos/          # macOS bridge layer\n```\n\n### Build Commands\n\n```bash\nexport CGO_ENABLED=1\n\n# Build\ngo build -o dutix ./cmd/dutix/\n\n# Test\ngo test ./...\n\n# Lint\ngolangci-lint run ./...\n\n# Generate mocks\ngo generate ./...\n```\n\n## How It Works\n\ndutix relies on [macos-apphandlers-bridge](https://github.com/jackchuka/macos-apphandlers-bridge) to interface with macOS AppKit APIs for querying and setting default application handlers.\n\nThe tool uses a three-phase approach:\n\n1. **Plan** - Resolves targets and queries current defaults\n2. **Preview** - Shows what will change before applying\n3. **Apply** - Makes the changes to system defaults\n\n## Known Limitations\n\n- Some system-protected defaults (like http) may require user confirmation in System Settings\n- Changes to certain defaults may not be reflected immediately in all applications\n- Requires running as the logged-in user (not sandboxed)\n- Some system-internal UTIs are automatically filtered out during migration\n- `public.html` UTI cannot be set programmatically and is automatically skipped\n\n## License\n\n[MIT License](LICENSE)\n\n## Contributing\n\nContributions welcome! See [docs/DEVELOPMENT.md](docs/DEVELOPMENT.md) for development guidelines.\n\n## Credits\n\nInspired by:\n\n- [duti](https://github.com/moretension/duti) - Command-line default handler manager\n\nBuilt with:\n\n- [Cobra](https://github.com/spf13/cobra) - CLI framework\n- [tablewriter](https://github.com/rodaine/table) - Table formatting\n- [macos-apphandlers-bridge](https://github.com/jackchuka/macos-apphandlers-bridge) - macOS integration\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjackchuka%2Fdutix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjackchuka%2Fdutix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjackchuka%2Fdutix/lists"}