This is nice but tackle it this ways might be unnecessarily complicated. I don't always need to look at the cost while writing code and it could fail to track, say, resources dynamically created with something like CDK.
More useful for me would be to plug directly into the account OR to analyse the cloud formation template, which can be easily obtained regardless of the IaC you're using.