It is a command line tool https://force-cli.heroku.com

When use force login, it opens browser and ask for Oauth login. After authorization, the browser closes and go back to command line tool.

I am new to command line tool (Terminal.app or cmd.exe)

My question is how command line tool communicates with browser. i.e. How force login command opens browser and how browser closes and go back to command line.

  • My suggestion is that this is not real cmd.exe or terminal.app, but some modifications on it that can open external programs and get some data from it. P.S. If you go deeper you can find source code of that -- github.com/heroku/force.
    – kurunve
    Dec 18, 2015 at 8:08

1 Answer 1


Looking in the source for ForceLogin() in force.go you can see the current code determine the OAuth2 authorize url and then calling the Open method.

Open() is in open.go. It takes the URL and starts up the browser based on the OS in question.

Before this I think it starts a local HTTP Server to get the OAuth callback and extract the accessToken.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .