how does a beginner learn how to do all this, not how to instal but LEARN from beginnning. i am looking at this and i am like WTF is this.

This is written in Go. I'm not sure this uses cobra, but you could start easily by writing basic CLI tools using cobra[0]

[0] - https://github.com/spf13/cobra