We need to decide on where we store user-specific configuration, data, and cache for applications such as sensu-cli.
I believe that we've figured out what the paths will be on Windows & Linux (I'd still love feedback) but I'm conflicted on which direction we should take for macOS.
I'm hoping to get some opinions from everyone so that we can get a sense of what people prefer.
Just as a note, all of these defaults should/will be able to be overridden with various environment variables.
/etc).$HOME/.config./var/cache).$HOME/.cache./usr/share).$HOME/.local/share.NOTE
As $XDG_RUNTIME_DIR does not have a default, it seems that people will sometimes use patterns similar to /tmp/servicename-$USER but systemd-based distros require the directories to exist in /run/user/$USER/service.
Read more: https://wiki.archlinux.org/index.php/XDG_Base_Directory_support
If you're happy with this proposal vote with a :+1: otherwise vote with a :-1:
C:\Users\<User>\AppData\Roaming\sensu\sensu-cliC:\Users\<User>\AppData\Local\sensu\sensu-cliC:\Users\<User>\AppData\Local\sensu\sensu-cli\cacheIf you're happy with this proposal vote with a :+1: otherwise vote with a :-1:
Please suggest additional pros & cons if you feel I've left something out.
As per Apple's Recommendations:
Caches/ directory to free up disk space, so your app must be able to re-create or download these files as needed.NOTE
In the case of sensu-cli:
$HOME/Library/Application Support/sensu/sensu-cli/$HOME/Library/Caches/sensu/sensu-cli/Vote with 馃帀 for using the XDG standard and :heart: for using macOS standard
I voted for the macOS standard as I personally feel that adhering to the various principles in each OS will make us more responsible members of each community. We implemented many of the OS guidelines with the ruby-based Sensu software on macOS, FreeBSD, Solaris, and AIX. Now that we no longer have a dependency on ruby I'm positive that we can do an even better job.
My argument against it would be that it's:
@calebhailey suggested the following when we last spoke:
~/Library/Application Support/sensu first.If no config exists, fallback to the XDG config path.
By default, creating a new profile/config will create files in Apple's path.
If we only want to deal with one specification we'll need to determine the following:
Do we want to allow for the possibility of a Mac app that can read the Sensu CLI config?
Is using a community-created convention more important than playing by Apple's rules?
/usr/bin is no longer possible (even with root) without disabling OS-security featuresIt's important to use Apple's path for cache so that time machine and iCloud won't back up unnecessary data but doing so will break away from what we do on Linux.
After thinking about this a bit more, I think we should just use the XDG path for configs and Apple path for cache.
If we ever release a Mac GUI app we can just add import functionality for configs / credentials.

Most helpful comment
macOS
Please suggest additional pros & cons if you feel I've left something out.
1. Use the same paths as Linux (XDG)
A few pros
and keybase).
A few cons
2. Use the paths that Apple wants developers to use
As per Apple's Recommendations:
$HOME/Library/Application support/sensu/sensu-cli
$HOME/Library/Caches/sensu/sensu-cli
Caches/directory to free up disk space, so your app must be able to re-create or download these files as needed.NOTE
In the case of sensu-cli:
$HOME/Library/Application Support/sensu/sensu-cli/$HOME/Library/Caches/sensu/sensu-cli/A few pros
A few cons
Read more: https://developer.apple.com/library/content/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/FileSystemOverview/FileSystemOverview.html
Vote with 馃帀 for using the XDG standard and :heart: for using macOS standard