It's still an open point of contention whether an API can be copyrighted. There's obvious benefits to GitHub to encourage the use of a 'gh' command over the 'git' command.
How can you say that? It's definitely a significant barrier.
"Open source" is often used to appear more "friendly" to outsiders.
Something can be open source and still be used to lock people into a particular environment. Case in point: Chromium, Android, etc.