function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ken KoellnerKen Koellner 

CLI (Command Line Interface) Definition Tool and non-interactive login?

 

I read up on the CLI and it seems cool.  Now you can write shell scripts to do definition stuff.  But launching a browser and doing OAuth is a total bother.

 

Anyone know if there's a way to parameterize a login? 

 

If not navitely with the tool itself, mabe some curl commands or something like that?

 

 

My overall opinion of any computer utility program is it is 200% better if it can be run from another computer program as easily as it can be by a human.  That's why all the UNIX commands pipe together so well.

 

-Ken

 

John StevensonJohn Stevenson
Hello Ken,

A feature to login via SOAP was recently added to the code on Github, allowing you to login by specifying the username and password for your org on the command line.  This means that you can run a script without a browser launching for OAuth.  

This feature is not part of the pre-compiled binaries as yet, so you will need to create your own binary using the instructions on Github https://github.com/heroku/force - see the Readme at the bottom of the page.

The new code allows you to use the following commands:

# log in using SOAP to a production or developer org
force login username password   

# log in using SOAP to sandbox org
force login test un pw 

If you try this then please let me know if this works for you and please report any bugs on the Github page https://github.com/heroku/force

Thank you
John