Ask HN: Thoughts on a "Google Analytics" for CLI Tools?

2 points by BohdanPetryshyn ↗ HN
Hey HN,

I’m exploring an idea for a plug-and-play analytics solution specifically for CLI tools — think Google Analytics, but for the command line. After reviewing multiple open-source CLI tools, I noticed that many teams end up building analytics from scratch. Setting up and maintaining this kind of infrastructure can be resource-intensive and often lacks features that would make it more actionable.

Here’s what I imagine this solution would offer:

1. Automatic command tracking to capture usage patterns and activity frequency

2. Error and crash reporting to help identify pain points in real-time

3. Opt-in/opt-out strategies for respecting user privacy preferences

4. A web dashboard for data visualization and analysis

I’d love to get the community’s perspective on this. Is this something you’ve encountered a need for? If you’re already using or building a CLI, would such a tool be useful, and what features would be most valuable to you?

Also, if anyone here has tackled CLI analytics themselves, I’d be interested to hear about any challenges you faced or any DIY solutions you’ve found effective. Thanks for any feedback!

2 comments

[ 761 ms ] story [ 492 ms ] thread
I'm confused by your points.

What's wrong with using any current event tracking solution ?

Segment/GA/Posthog/Umami/.../.. even today published Trench [0]

[0 ]https://news.ycombinator.com/item?id=41945458

Thank you for the first comment and sorry for the broken formatting. I just improved it.

The existing solutions are tailored for website analytics and built around concepts like page views, clicks, sessions, etc. Some of them allow sending arbitrary events, but users still need to solve CLI-specific problems like reliable and non-blocking event delivery, user uniqueness, consent collection, and others.

I'd be happy to hear about people's experiences with using these platforms for CLI analytics.