Hacker News new | ask | show | jobs
by NoboruWataya 119 days ago
> For a program that's minimal it sure takes a long time to start up, the standard C-p and C-n bindings don't work, it doesn't follow the XDG Base Directory Specification and just pollutes my $HOME directory.

This drives me mad, I believe Ollama and Claude Code also do this. Seems to be rife in the LLM world. IMO there's no excuse for new software sticking dotfiles in my homedir in 2026.

4 comments

My impression is that it's the NodeJS, Go and Rust communities that don't care about XDG.

This 11 year old, open issue is very symptomatic of this IMHO: https://github.com/rust-lang/cargo/issues/1734

In my experience, the Rust community very much cares - it is a struggle to find a modern Rust application of any popularity that does not abide by XDG.

.cargo's placement is a historical mistake that can't be undone now, but ecosystem participants are generally good participants.

why can’t it be undone?

for new installations going forward, why not put the folder in XDG_CONFIG_DIR and an optional symlink from ~/.cargo that can be opted in

Not sure about use in the Go community at large but Go introduced os.UserConfigDir[1] which is portable across Windows, macOS, Plan 9 and Linux/BSD as per XDG back in 2019. Also CacheDir.

[1]: https://pkg.go.dev/os#UserConfigDir

> On Darwin, it returns $HOME/Library/Application Support

Which is not the behaviour most people would think is sensible, especially for CLI programs.

Ghostty has chosen to use that as the default and I feel like it's going to be the tipping point where people will assume $HOME/Library/Application Support is normal for CLI programs.
Mac users are used to checking ~/Library/Application Support/App, ~/.app, and ~/.local/config/app
fwiw, it absolutely drives me nuts that cli programs are putting configs in that hard to reach folder (long path name and _spaces_ in the folder name ugh)
Go isn't perfect, but $GOPATH isn't really used that much anymore. There's a bunch of stuff in ~/.config/ and ~/.cache/
Go creates `~/go` by default. It's not even hidden. Unfortunately, saying it's not really used that much doesn't help with this.
> IMO there's no excuse for new software sticking dotfiles in my homedir in 2026.

Agreed, and also, tinfoil hat time:

I believe they opt for this so that state and config files don’t need to be distinguished (it all goes into ~/.appname the same). It’s still not an excuse, but maybe laziness is the reason?

I'd also add that convenient recursive folder creation was only added relatively recent for many languages (eg: "std::filesystem::create_directories" was only added in C++17). And since "~/" is pretty much guaranteed to exist, the fewer folders you needed to create, the less code you had to write.
I think underuse/under-marketing of XDG_STATE_HOME is a contributing factor. Developers see XDG_DATA_HOME and XDG_CONFIG_HOME and, following the spec, don't feel like their app's files conform to either definition. It's easier to just not bother. Neovim now uses all 3 and it's very nice IMO.
The problem with the XDG spec is that it now forces you to have different paths on different platforms. It just increases the complexity and at the end of the day unless all software adheres to it, you still end up with a “polluted HOME”.

I’m not a fan of config directories being in different locations on different platforms because it’s now one extra thing everyone needs to handle.

(Disclaimer: I work on Pi but I dislike XDG in all settings)

Platform standards already require things to be in different locations compared to *NIX dotfiles and dotdirectories - for example Windows %APPDATA%.

I find it a bit shocking that someone working on an agent harness can't be bothered to spend 5 minutes to research this with the help of an LLM and holds such rigid and uninformed views.

And if you don't want to respect platform standards, just respect XDG on all platforms. The .app solution is the laziest one possible.

Just follow XDG everywhere and create .config/app & co everywhere, at least that way there's a chance more apps end up in subfolders instead of ending up with a million folders in the user directory on BOTH Linux and non-Linux.

I suspect some people are out there who actually like the single directory style. Obviously it's easier for the software developer, but I suspect some users like it too because everything's all in one place. It's very likely that Mario is one of those people.
it's certainly easier to keep a single directory under version control and share between Linux and macOS
Yeah but what happens when it's a mix of config and local state like logs and the app database?
Looking around my own cluttered home folder, the pattern seems to be that applications will split their "singlefolder" into a subtree.

For example:

- .sdkman has: bin, candidates, contrib, etc, ext, libexec, src, tmp, var

- .gitkraken has: logs, notif, profiles, repohooks, service, themes

- .mullvad-browser has: Downloads, .cache, .config, .local, .mullvad

- .dropbox has: events, instance1, instance_db, logs, machine_storage, metrics, ssa_events

- .steam has: bin, bin32, bin64, debian-installation, root, sdk32, sdk64, steam

- .xpipe has: cache, logs, settings, shell, storage, webview

...etc

I will say that even though I really don't like having a cluttered home folder, I do appreciate things being more or less in one place and so can be easily uninstalled and cleaned up. Flatsweep even being a thing is a testament to the tedium created by dispersing everything across the file system. It reminds me of macOS and not in a good way: I had an equivalent to Flatsweep on my old macbook but I couldn't remember its name so I searched "macos app cleanup tool", and the first page is just a bunch of comparison articles for the 10 (or whatever) best cleanup tools. This shouldn't be a thing. Alas, it is because applications can't or wont clean up after themselves.

As in, $HOME? Version controlling it needs to be done very carefully.
As a user I still prefer .pi right there in my home directory.
i raised a bug for this on the pi repo. it was immediately triaged into `wont do`.