man defaults
defaults domains | tr " " "\n"
defaults read com.apple.Safari
For dot files, I personally use stow[1] but there are other utilities and workflows out there[2]. [0] https://ss64.com/osx/defaults.html
[1] https://www.gnu.org/software/stow/
[2] https://dotfiles.github.io/