Azion CLI login
Azion CLI command that logs in to your Azion account and saves a personal token locally, with its flags and the questions it asks.
The Azion CLI login command logs in to your Azion account and saves a personal token on your machine. The CLI uses that token to authorize the commands you run after the login. The options every command accepts, such as --help, --token, and -c, are on Global options.
Usage
azion login asks its questions in the terminal and logs in with the method you choose:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--password | — | string | — | Your password. |
--username | — | string | — | Your email address. |
The command asks these questions, in this order:
Would you like to create a new profile for this login? (Y/n). With yes, it asks for the name of the profile inEnter a name for the new profile:.Choose a login method:, with the options Log in via browser and Log in via terminal.- With Log in via terminal,
Enter your email address:.
Passing --username does not skip the profile question or the login method question. Run the command in an interactive terminal: without one, it stops at the profile name question with Failed to get profile name.
To authorize the CLI without these questions, such as in a CI job, pass a personal token with the global -t option. The CLI saves the token in the settings.toml file of the profile and uses it for every later command.
Examples
Each example shows the questions the command prints, up to the point where it waits for your answer.
Choose a login method
This command starts the login:
The command asks whether to create a profile, then shows the login methods. In this output, the answer to the profile question is n:
With Log in via terminal selected, the command asks for the email address of your account:
Pass the email address
This command passes the email address of the account with --username:
The command still asks the profile question and shows the login methods: