User Commands

With the users commands you can manage the users in the panel, from the command line.


Create a user

mlcli users create <username> <email>

The cli then prompts you to input a password for the user, in a secure manner.

Note: To grant permissions to a user via the cli, just add --permissions <permissions>

Arguments: ( Arguments )

  • <username> → The username for the user

  • <email>→ The email address for the user

Options: ( Options )

  • --permissions , -p → The permissions of the user, (in ", split with commas; eg. "admin.users.read,admin.api.*,admin.users.update")*

Flags: ( Flags )

  • --admin ,-a → Grants the user all permissions, option --permissions will be ignored

Example Usage:

mlcli users create johndoe john@example.com -p "admin.api,admin.users.*,admin.system.diagnose"

Update a user

mlcli users update <id>

The cli will prompt you if you want to change the password for the user, and if so, provide you with a secure way of inputting the password.

Arguments: ( Arguments )

  • <id>→ The id of the user which should get updated

Options: ( Options )

  • --username, -u → The new username for the user, if not specified, the username remains unchanged

  • --email, -e → The new email address for the user, if not specified, the email address remains unchanged

  • --permissions, -p → The new permissions for the user, if not specified, the permissions remain unchanged

Example usage:

mlcli users update 1 -u johndoe1 -e johndoe@example.net -p "*"

List users

mlcli users list

Note: To get listed more than 10 users, add -l <pagesize> to the command above, to change page, add -p <page>

Options: ( Options )

  • --pagesize , -l → The number of users which will get listed, must be between 1 and 100, default: 10

  • —-page , -p → The which will get displayed

Example Usage:

mlcli users list -p 2 -l 15

Delete a user

mlcli users delete <id>

Note: This can NOT be undone

Arguments: ( Arguments )

  • <id>→ The id of the user which should get deleted