I noticed that it created a database at /home/aaronfranke/.msf4/db on my system. This is not following the XDG Base Directory Specification.
How'd you do it?
Metasploit should create it in $XDG_CONFIG_HOME/msf4 or ~/.config/msf4.
Metasploit creates it in ~/.msf4
Framework: 5.0.5-dev-
Console : 5.0.5-dev-
Ubuntu 18.04.
Good suggestion, though it does come at a cost of invalidating a decade of documentation on the internet and in print. Any suggestions for avoiding mass confusion in the process?
I think if we moved to .config we would probably also change from msf4 to metasploit at the same time.

@busterb You could have it create a symlink while the documentation is catching up, and remove the symlink after all the documentation has changed. As long as you test that the program works without the symlink (i.e. Metasploit always points to $XDG_CONFIG_HOME/metasploit and/or .config/metasploit).
Hello,
since this issue is dead for 2 years now I would like to "reopen" it.
The application could simply check for configuration under $XDG_CONFIG_HOME/metasploit and if it wasn't available it would next look under $HOME/.config/metasploit and than fallback to currently used configuration which is $HOME/.msf4. If the configuration didn't exist in any of those locations the application would dump default configuration under $XDG_CONFIG_HOME/metasploit if the variable has been set or else under $HOME/.config/metasploit.
I just want to discuss it a little bit, because I hate last few dotfiles in my cluttered $HOME and I would like to manage my dotfiles properly in a standardized way.
Most helpful comment
Hello,
since this issue is dead for 2 years now I would like to "reopen" it.
The application could simply check for configuration under $XDG_CONFIG_HOME/metasploit and if it wasn't available it would next look under $HOME/.config/metasploit and than fallback to currently used configuration which is $HOME/.msf4. If the configuration didn't exist in any of those locations the application would dump default configuration under $XDG_CONFIG_HOME/metasploit if the variable has been set or else under $HOME/.config/metasploit.
I just want to discuss it a little bit, because I hate last few dotfiles in my cluttered $HOME and I would like to manage my dotfiles properly in a standardized way.