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)
6 Comments
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.
@codex-maintainers As far as I am aware, this is still an issue in the new rust version as well.
Though personally, I would prefer to have this:
And then just a symlink into the appropriate apple location as suggested in:
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/
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
+1 to
$HOME/.config. This is consistent with many CLIs apps on Mac, e.g.git,helix,nvim,fish, ...