Why macOS Command-Line Tools Should Use XDG Specification Instead of Application Support for Config Files
By
zdw
An everything bagel for the brain. Substantive, layered, well-seasoned.
Summary
The article argues that command-line tools on macOS should not store configuration files in ~/Library/Application Support, as this location is intended for GUI applications rather than CLI tools. The author contends that developers misinterpret Apple's documentation and should instead follow the XDG Base Directory Specification, placing config files in $XDG_CONFIG_HOME (defaulting to ~/.config) for better user experience and proper adherence to standards.
Key quotes
· 4 pulledOne of my pet peeves is when command-line tools look for user configuration files in ~/Library/Application Support when running on macOS.
Instead, command-line tools should implement the XDG Base Directory Specification and look for configuration files in $XDG_CONFIG_HOME, which defaults to ~/.config.
Usually, when a program looks for configuration files in ~/Library/Application Support, it's not because of an intentional design decision.
A CLI tool is not an app, and none of you are reading the docs as carefully as you think you are.
You might also wanna read
Developer Tests Apple's Fix for macOS Window-Resizing Bug in 26.3 Release Candidate
A developer investigates Apple's claim that a window-resizing bug in macOS 26.3 Release Candidate has been fixed. The developer created a te
noheger.at·3mo agoWhy Average LLM Use Is Likely Destroying Value in Software Development
The author argues that, contrary to prevailing hype, the average use of Large Language Models (LLMs) is likely destroying value rather than
How AI Accelerated Prototyping: From Idea to Tangible in Record Time
The author reflects on how AI has transformed their prototyping workflow. Previously, the biggest bottleneck was the time needed to scaffold
GitLab 19.0 launches with Secrets Manager, agentic workflows, and self-hosted AI models
GitLab 19.0 has been released, positioning itself as an intelligent orchestration platform for DevSecOps. The release includes expanded secr
bit.ly·23h agoCentralizing Error Handling in Rust with Custom AppError Enums
This article discusses the importance of centralizing error handling in Rust applications using a custom AppError enum combined with map_err
Zig Devlog: Build System Rework Separates Maker and Configurer Processes
This devlog entry from the Zig programming language project announces a major rework of the build system, separating the maker process from
