Closed
Description
Right now to use the CLI in a script, one needs to do something like this to set up the environment:
mergin login --login myUsername --password myPassword | tail -2 > env_vars
source env_vars
I would suggest that
- other commands recognize MERGIN_URL, MERGIN_USERNAME, MERGIN_PASSWORD env variables - so instead of requiring an existing token, if it is not present, commands would log in using the provided username/password. This would avoid the need to run 'mergin login' altogether.
- 'mergin login' should not output
"Mergin URL: " + c.url
so that a script does not need to do "tail -2" to remove it. The URL is in exported MERGIN_URL variable anyway...