I want to build an app that does some functionality when called from command line by typing the app name and the command to be executed. Like for example in git we do the following :
git commit -m "a comment"
The way I think about it is that git app would be called with the arguments commit, -m, and "a comment"
and it would process them and does some functionality. My question is whether how I think it's done is actually correct, what is this type of apps called and are there any sources I can read about this?
Note: I am using c++ to program my app.