I don't know if shameless plugs are allowed here (sorry if not!), but I have an open source project for Mac that's aimed at exactly this problem. Every ~10 minutes (configurable), it pops up an unobtrusive prompt to ask you what you're working on right now. It then has some basic reporting and aggregating functionality. It's not specifically targeted for consulting / invoicing (I made it because I often ended my day wondering what the heck I'd done all day), and it's sometimes a tad rough around the edges, but it could help. https://whatdid.yuvalshavit.com / https://github.com/yshavit/whatdid
(I'm newish to HN, so please let me know if this message is inappropriate!)