Note: This is not a duplicate of these questions:
Create a new GitHub repository
How to publish Github repository
I could see that "GitHub Desktop" has the feature to publish a new local repository into GitHub without manually create a new repository in GitHub.
How can I achieve the same using commands?
In other words, how to publish a new repository without opening a browser?
From this article, we see the requirement to use the browser for Step 1 and Step 7.
Is this possible only for GitHub Desktop since it is a first-party application?
P.S: Looking for a solution without using GitHub APIs. Any git command is fine.