MacOS Dotfiles: Where to Store Them – Rebecca®
Okay, here’s a breakdown of the argument presented in the text, focusing on the author’s core point and supporting reasoning.
Core Argument:
The author argues that the official Apple guidelines for file system organization on macOS are not applicable to command-line tools. They believe these guidelines are designed for full-fledged “apps” (applications with a GUI) and don’t logically extend to simpler command-line utilities. Therefore, the standard Unix practice of using ~/.config for configuration files is perfectly acceptable (and arguably more appropriate) for command-line tools on macOS.
Supporting Reasoning (broken down):
- XDG Base Directory Specification: the author points out that the XDG specification, a common standard for Unix-like systems, doesn’t explicitly exclude macOS. If
~/.configis standard on other Unix systems,there’s no reason to deviate on macOS,which is Unix-based.
- Definition of ”App” on macOS: This is the central point. The author meticulously dissects Apple’s documentation to demonstrate that Apple’s definition of an “app” is far more rigorous than simply an executable. Apple “apps” are:
Installed in /Applications.
Subject to a complex set of requirements: bundle IDs, icons, launch screens, code signing, notarization, sandboxing, hardening.
Fundamentally different from a simple command-line tool.
- Apple’s Documentation Focus: The author highlights that Apple’s documentation consistently frames its guidelines around “apps” managing data on behalf of the user. Command-line tools don’t fit this model.They don’t have ”app-specific data” likewise, and users typically create configuration files (dotfiles) directly, not through the tool itself.
- Specific Examples from Documentation: The author quotes directly from Apple’s documentation to support their claims:
The documentation for ~/Library/Application Support explicitly mentions “app-specific data” and using a subdirectory named after the “bundle identifier” – concepts irrelevant to command-line tools. The documentation distinguishes between “apps” and “command-line binaries” (located in /bin).In essence, the author is arguing for a pragmatic approach: Don’t apply standards designed for complex GUI applications to simple command-line utilities. Stick to established Unix conventions when they make sense. They believe many developers incorrectly apply Apple’s guidelines because they misunderstand the scope of what Apple considers an “app.”*
