Overriding juju command

I am looking into a way if it is possible to replicate etckeeper like functionality to juju. So that before config changes are made the current ‘state’ can be recorded in a version control system, with ideally the command run as the commit message.

Looking to see if this is possible in some way. So I am definitely not talking about charm hooks.