Skip to content

CLI: make login easier for use in scripts #76

Closed
@wonder-sk

Description

@wonder-sk

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

  1. 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.
  2. '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...

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions