Dutis CLI

A Rust CLI for macOS that inspects and changes default apps for files and links, with an MCP server and an agent skill

  • 257 ★ on the repository
  • Last commit
CLI

Extended access

Why this level

  • Changes default apps for files and links across the whole macOS account
  • MCP write mode is switched on with a flag and needs an approval token
  • Drift monitoring can restore associations on its own if policy allows it
All reasons and checks

tsonglew/dutis

Install

Manual install

brew install tsonglew/tap/dutis

Installs the universal dutis and dutis-event-http binaries and the duti dependency. The skill is installed separately: npx skills add tsonglew/dutis --skill dutis --global --agent claude-code.

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • Changes default apps for files and links across the whole macOS account
  • MCP write mode is switched on with a flag and needs an approval token
  • Drift monitoring can restore associations on its own if policy allows it

This is third-party code. Review the repository files before installing.

What it does

Dutis is a Rust program that reads and changes which app opens a file extension, UTI, MIME type or URL scheme on macOS. Without a subcommand it opens a terminal menu that shows the current app, compares it with the new one and changes the value only after confirmation. For scripts the CLI gives stable JSON output, dry runs, precise selectors and explicit exit codes. Every change follows one path: inspect, plan, policy check, approval, apply, verify. A snapshot is saved before the edit, and a rollback goes through the same verified plan. There is a declarative TOML file with plan and diff, profiles for a developer, designer or minimal set, and drift monitoring: Dutis notices that associations changed and can restore them by policy. For agents Dutis runs a local MCP server with `dutis mcp`; it starts read-only, and writes are enabled with `--allow-writes`. A separate skill walks the agent down the same path.

Who it is for. macOS users and admins of Mac fleets who set which app opens files and links and want an agent to do it.

Good fit when

  • An agent was asked to make VS Code the default for Markdown and you want a plan before the edit
  • You need to know which app opens PDFs and which installed programs can handle them
  • File associations broke after a system update and need to be restored from a snapshot
  • Several Macs need one set of default apps written in a TOML file

Not a fit when

  • You are on a system other than macOS: Dutis works through Launch Services and `duti`
  • You only need to open one file in another program without changing the association
  • An agent should change associations without your approval: MCP writes are off by default

Example request

Show which app currently opens .md files and propose a plan to switch to VS Code without applying it

Limitations

Runs on macOS 10.14 and newer. Changing default apps requires `duti`, which the Homebrew formula installs itself; browsing does not need it. The skill and the MCP server do not install the `dutis` executable, so it has to be on the client's `PATH`. In a restricted agent shell Launch Services can be hidden, and `dutis get` then reports no default even when one is set, so reading the value through MCP is more reliable. The repository states no license.

How to disable. Remove the skill by deleting its folder from the agent skills directory, drop the MCP server from the client configuration, for example `codex mcp remove dutis`, and uninstall the program with `brew uninstall dutis`. Saved snapshots stay on disk.

FAQ

How do I connect Dutis to Claude Code?

For the skill run `npx skills add tsonglew/dutis --skill dutis --global --agent claude-code`; for MCP register the server with `claude mcp add --scope user --transport stdio dutis -- dutis mcp`. Both steps need `dutis` on the `PATH`.

Can an agent change default apps over MCP?

Not by default: the server starts read-only. Write tools appear with `--allow-writes` and require a fresh plan digest and the `DUTIS_MCP_APPROVAL_TOKEN` token set on the server side.

How do I roll back a bad change?

Before a change Dutis saves a snapshot of the previous associations. Rollback goes through the same verified plan; details are in docs/snapshots-and-rollback.md.

How is Dutis different from duti itself?

`duti` only sets a value. Dutis adds inspection, planning, policy, snapshots, result verification and drift monitoring, and uses `duti` for the write.

What are profiles?

They are built-in sets for a developer, designer, media work and a minimal setup. Dutis builds a proposal with evidence from them and changes nothing in the system until you confirm.

Discussion

No questions or reviews yet.

CLI tools

A local MCP server for Mac: Claude, Codex and ChatGPT work in apps, files, terminal and browser under your permissions

MCP serverBroad access97Repository stars

CLI that sorts a messy folder such as Downloads into places with natural-language rules, while an agent judges the files.

CLIExtended access109Repository stars

Cunzhi (寸止)

寸止 (Cunzhi)

MCP server in Rust and Tauri: the agent shows a dialog with options before ending a reply, keeps project rules and searches code

MCP serverBroad access1.4KRepository stars

An MCP server and Mac app that keeps one local index of repos, agent sessions and tickets, with semantic search and work threads

MCP serverExtended access76Repository stars

MCP server and shell history replacement: a SQLite command log with context that agents read over MCP

MCP serverExtended access127Repository stars

A macOS menu bar app writes the text of your focused windows into markdown, and its MCP server serves that record to agents

MCP serverBroad access210Repository stars

README in short

The project description covers the terminal menu, the JSON mode for scripts, policy, snapshots, drift monitoring and events. Installation goes through Homebrew or a source build, and connecting to an agent is split into a skill and an MCP server. Details sit in the docs folder.

README badge

Report a problem