All Topics
All Topics
Technology
Technology
Design
Design
Programming
Programming
Science
Science
News
News
Gaming
Gaming
Entertainment
Entertainment
Business
Business
Finance
Finance
Sports
Sports
Health
Health
Food
Food
Travel
Travel
Art
Art
Music
Music
Books
Books
Education
Education
Politics
Politics
Personal
Personal
No algorithm. No AI slop. No ads. Just RSS. Pro-human. Indie writers. Real journalism. Open web. Chronological. Hand toasted.

Why macOS Command-Line Tools Should Use XDG Specification Instead of Application Support for Config Files

By

zdw

9mo ago· 8 min readenOpinion

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 pulled
One 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.
Snippet from the RSS feed
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