The WakaTime plugin works for Kakoune and is open-source on GitHub.
Put wakatime.kak in your autoload repository, located at
$XDG_CONFIG_HOME/kak/autoload, or one of its subdirectories.
Save your API key
Use Kakoune like you normally do and your time will be tracked for you automatically.
Visit https://wakatime.com/dashboard to see your coding activity.
For information about the
~/.wakatime.cfg format, see the wakatime-cli docs.
Note: The plugin will NOT work system-wide.