Dooti overview
Manage default handlers for files and URI schemes on MacOS 12.0+.
Features
Manage handlers by specifying file extension, UTI or URI scheme.
Specify handlers by name, bundle ID or absolute path.
Check your associations into a dotfiles repository and ensure an idempotent state by simply running dooti apply.
Installation
I recommend installing with pipx, although pip will work fine as well:
pipx install dooti
Quickstart
dooti currently supports three specific subcommands (ext, scheme, uti) and a broad one (apply).
Lookup handlers
Simply pass a list of one specific type to the appropriate command. Example:
$ dooti ext html xml
html: /Applications/Firefox.app
xml: /Applications/Sublime Text.app
$ dooti --format json scheme http https ftp | jq
{
"http": "/Applications/Firefox.app",
"https": "/Applications/Firefox.app",
"ftp": "/System/Library/CoreServices/Finder.app"
}
$ dooti uti public.html
public.html: /Applications/Firefox.app
Set handlers
Changing the default handler can be requested by adding -x <handler_ref> to the lookup command. The handler reference can be a name, bundle ID or absolute filesystem path. Example:
$ dooti ext csv xml -x "Sublime Text"
The following extensions are set to be changed:
csv: /Applications/Numbers.app -> /Applications/Sublime Text.app
xml: /Applications/Firefox.app -> /Applications/Sublime Text.app
$ dooti scheme ftp -x /Applications/Firefox.app
The following scheme is set to be changed:
ftp: /System/Library/CoreServices/Finder.app -> /Applications/Firefox.app
$ dooti -tf json uti public.c-source -x com.sublimetext.4
{"changes": {"utis": {"public.c-source": {"from": "/Applications/Notes.app", "to": "/Applications/Sublime Text.app"}}}, "errors": []}
Ensure state
dooti can ingest and apply a YAML configuration like this:
ext:
jpeg: Preview
scheme:
http: Firefox
mailto: Mail
uti:
public.c‑source: Sublime Text
app:
Sublime Text:
ext:
- py
- rst
- yml
- yaml
uti:
- public.fortran‑source
Brave Browser:
scheme:
- ipfs
By default, it looks at $XDG_CONFIG_HOME/dooti/config.yaml (and others, see docs/usage.rst).
Limitations
The designated handler has to be installed before running the command.
Setting some URI scheme handlers (especially for http) might cause a prompt.
Setting some file extension handlers might be restricted (especially html seems to fail silently).
Why?
Most existing tools use LSSetDefaultRoleHandlerForContentType and LSSetDefaultHandlerForURLScheme, which are deprecated in macOS 12.0. dooti uses a more recent API and should work on Monterey (12.0) and above.
Similar tools
Metadata
Release files for dooti 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dooti-0.2.2.tar.gz | 43.0 kB | Without provenance | Details for dooti-0.2.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dooti-0.2.2-py3-none-any.whl | Python 3 | none | any | Details for dooti-0.2.2-py3-none-any.whl |
Total release size: 64.4 kB
Release files / dooti-0.2.2.tar.gz
| Download URL | dooti-0.2.2.tar.gz |
|---|---|
| Size | 43.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
57ccf3323a79b46b6d94f02a47a75c857d666e9c9561e82e248b641102fe0194
|
|
BLAKE2b-256 checksum How to use checksums |
0bb5e8ed3df1891601dd0661c0fbad817196d3decea3491e32104d6fe7497e3e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Release files / dooti-0.2.2-py3-none-any.whl
| Download URL | dooti-0.2.2-py3-none-any.whl |
|---|---|
| Size | 21.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f41c1bc3f8c6b16a28b1e4e79e55eda7fb76f92c173a293adc7eb25b1661e1e5
|
|
BLAKE2b-256 checksum How to use checksums |
b9c6e7edf8aa123ae5443cb76b70898e3872fab6fe93b944ffe85e5681790627
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Security for dooti 0.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.