Adhere to the macOS File System Programming Guide on macOS

Resolved 💬 6 comments Opened Apr 16, 2025 by offsetcyan Closed Aug 7, 2025

The user's home directory is not the place to dump program data, and for future cross-platform compatibility handling this would be inappropriate. Currently Codex stores user data in ~/.codex, however Apple has a specification for where to place files of various types (link). In Codex's case, ~/Library/Application Support/Codex would be suitable. (more info)

View original on GitHub ↗

6 Comments

codex-maintainers · 1 year ago

Thank you for the feedback! We're primarily focused on the native/Rust implementation of Codex CLI and would love to see if this is still an issue on the latest version. If it is, please let us know, and we'll be happy to take a look.

0xdevalias · 1 year ago
If it is, please let us know, and we'll be happy to take a look.

@codex-maintainers As far as I am aware, this is still an issue in the new rust version as well.

0xdevalias · 1 year ago

Though personally, I would prefer to have this:

And then just a symlink into the appropriate apple location as suggested in:

On a mac ~/.config is probably better for a terminal app than going to the "correct" ~/Library/Application Support/aider/config.yaml. Tools like git, github copilot, gh cli, shells, neovim and many others use it or at least will make a symlink from there to Library. _Originally posted by @offsetcyan in https://github.com/Aider-AI/aider/issues/216#issue-1862732308_
ponychicken · 11 months ago

In the referenced apple doc "app" refers to packaged macos Apps (living in /Applications). They distinguish in the docs between Apps and CLI tools, and here the universal way that also CLI tools that Apple packages by default uses is indeed also the ~/.config dir. So for CLI tools Application Support is not the correct location. For more info: https://becca.ooo/blog/macos-dotfiles/

offsetcyan · 11 months ago

There was a good discussion about that article (which I disagree with the conclusions of wholly and totally) on Lobste.rs: https://lobste.rs/s/iv17mx/macos_dotfiles_should_not_go_library

afternoon · 1 month ago

+1 to $HOME/.config. This is consistent with many CLIs apps on Mac, e.g. git, helix, nvim, fish, ...