Preview: Mattermost command line tools

As part of the new Admin Console for Beta2 we’re preparing command line tools to help IT admins setup and manage Mattermost.

Per our “Fast, Obvious, Forgiving” design principles, we’re requesting feedback on naming and descriptions of the early version to help improve the design.

Community input highly valued.

1 Like

The split between commands (create_team / create_user / assign_role) and their modifier options (config/email/password/team_name/role) is a bit confusing.

Suggestions:

  • firstly, split the arguments into two sections: commands (‘do this thing’), and options (‘do that thing like this’)
  • potentially disambiguate even further by removing the leading ‘-’ from commands, e.g. platform create_team -team_name=“foo” -email=“bar@baz”

I agree with @fooishbar and I go even further: we have four commands and some parameters, so why do we need to name them? I’m thinking how git does, git rebase <branch> or git push <remote> <branch>, the parameters are there, no need to add anything else.
Example:

platform assign_role team_name user@email.com admin
platform create_team team_name user@email.com
platform create_user team_name user@email.com password
Here we can have a flag for this specific command
platform create_user team_name user@email.com --create-random-password
platform config config.json

I linked this issue cli create doesn’t send email but I think it has bearing on @cifvts design suggestion above.

Quoted from above:

“”"
What I’d really love to see happen as a workflow is:

platform -create_user -team_name="myteam" -email="foo@bar.com" -generate_password

< system creates user, generates random password, expires password, sends password in confirmation email >
User logs in, puts in generated password, changes password, away they go.
"""

Thanks!

Please use double-dashes for long options and single dashes for short.
Most unix commands do this and I find it confusing when commands do it otherwise.

2 Likes

has anyone used the command line tools with an AWS Elastic Beanstalk instance? I am able to ssh into the instance and navigate to the correct folder var/app/current/app/mattermost but the ./platform command is not recognized? Any help is appreciated.

thanks