mmctl Command Line Tool (Beta)¶
The mmctl tool is a remote CLI tool for Mattermost which is installed locally and uses the Mattermost API. Authentication is done with either login credentials or an authentication token.
Being installed locally enables System Admins for both self-managed and Cloud Mattermost instances to run CLI commands even in instances where there is no access to the server (e.g., via SSH). This tool is currently in beta and can be used alongside the Mattermost CLI tool. In the future, the Mattermost CLI tool will be deprecated.
This feature was developed to a large extent by community contributions and we’d like to extend our gratitude to the contributors who have worked on this project. We are currently accepting pull requests for Help Wanted issues in the mattermost-server repo. You can learn more about the unit test coverage campaign for mmctl in the Unit testing mmctl commands blog post.
Notes
System Admins have two ways to run mmctl commands: by downloading mmctl from the repository, or by building it directly. See the mmctl readme for details.
mmctl comes bundled with the Mattermost distribution, and is located in the bin folder of the installation, next to the CLI.
Parameters in CLI commands are order-specific.
If special characters (
!
,|
,(
,)
,\
,'
, and"
) are used, the entire argument needs to be surrounded by single quotes (e.g.-password 'mypassword!'
, or the individual characters need to be escaped out (e.g.password mypassword\!
).Team name and channel name refer to the handles, not the display names. So in the URL
https://community.mattermost.com/core/channels/town-square
team name would becore
and channel name would betown-square
.
- Commands
mmctl auth - Authentication Management
mmctl bot - Bot Management
mmctl channel - Channel Management
mmctl command - Command Management
mmctl completion - Generates autocompletion scripts for bash and zsh
mmctl config - Configuration management
mmctl docs - Generates mmctl documentation
mmctl export - Exports management
mmctl group - Group management
mmctl group channel - Channel group management
mmctl group team - Team group management
mmctl import - Import Management
mmctl integrity - Database record integrity
mmctl ldap - LDAP management
mmctl license - License Management
mmctl logs - Log Management
mmctl permissions - Permissions Management
mmctl plugin - Plugin Management
mmctl post - Post Management
mmctl roles - Roles Management
mmctl system - System Management
mmctl team - Team Management
mmctl team users - Team user management
mmctl token - Token Management
mmctl user - User Management
mmctl version - Version Management
mmctl webhook - Webhook Management
mmctl websocket - Websocket Management
Options
--format string the format of the command output [plain, json] (default "plain")
-h, --help help for mmctl
--insecure-sha1-intermediate allows the use of insecure TLS protocols, such as SHA-1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
Installing mmctl¶
There are different methods available to install mmctl.
Using brew (Linux, macOS)
Use this option on Linux and macOS if you have Homebrew installed.
brew install mmctl
Using go get (Linux, macOS, Windows)
Use this option on Linux, macOS, and Windows if you have a go
environment configured.
To add the project in your $GOPATH run the following command:
go get -u github.com/mattermost/mmctl
Using release package (Linux, macOS, Windows)
Vist the mmctl releases page and download the appropriate release for your OS, and install the binary.
Building mmctl¶
The mmctl
tool uses go
modules to manage dependencies, so you need to have installed
go
1.11 or greater and compile the binary using:
make build
Local mode¶
Local mode allows platform administrators with access to the Mattermost server to run mmctl commands against the API without needing to have a user registered. To ensure secure usage of this API, the server exposes a local socket that only a user with access to the server’s file system can access. The requests coming from the socket are treated as authorized, so they can reach the handlers without requiring a user session.
The API that the socket exposes follows the same specification that can be found in the API documentation, so mmctl is able to interact with it without needing any modifications. When a request comes in through the socket, it is flagged as local by the server, and this flag is taken into account when checking for session permissions to correctly authorize the sessions.
Activating local mode¶
To use local mode, the Mattermost server first needs to have local mode enabled. When local mode is enabled, a socket is created at /var/tmp/mattermost_local.socket
by default.
Using local mode¶
You need to append --local
to the command you want to use, or set the environment variable as MMCTL_LOCAL=true
. To use a socket file other than the default, you need to set the environment variable to MMCTL_LOCAL_SOCKET_PATH
. This file must match the server configuration setting.
In versions prior to 5.26, only the commands config
, plugin
, and license
are available.
Running mmctl tests¶
mmctl has two types of tests: unit tests and end to end tests.
To run the unit tests, you need to execute:
make test
To run the end to end test suite, you need to have a Mattermost server instance running. Check the Developer Setup guide for instructions around how to configure a local test server instance.
Once the development server is set up, cd into the mattermost-server directory
:
Start it with
make run
. To confirm that the instance is running correctly, you can access the web interface athttp://localhost:8065
.Run
make test-data
to preload your server instance with initial seed data. Generated data such as users are typically used for logging, etc.
Change your directory to mmctl
and run the end to end test suite with:
make test-e2e
mmctl auth¶
Description
Manage the credentials and authentication methods of remote Mattermost instances.
Child Commands
mmctl auth clean - Clean credentials
mmctl auth current - Display current credentials
mmctl auth delete - Delete authentication details
mmctl auth list - List registered credentials
mmctl auth login - Log into Mattermost instance
mmctl auth renew - Renew login credentials
mmctl auth set - Set login credentials
Options
-h, --help help for auth
mmctl auth clean¶
Description
Clean the credentials associated with a Mattermost instance.
Format
mmctl auth clean [flags]
Examples
auth clean
Options
-h, --help help for clean
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl auth current¶
Description
Show the currently stored user credentials.
Format
mmctl auth current [flags]
Examples
auth current
Options
-h, --help help for current
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl auth delete¶
Description
Delete a named credential.
Format
mmctl auth delete [server name] [flags]
Examples
auth delete local-server
Options
-h, --help help for delete
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl auth list¶
Description
Print a list of registered credentials.
Format
mmctl auth list [flags]
Examples
auth list
Options
-h, --help help for auth list
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl auth login¶
Description
Log in to an instance and store credentials.
Format
mmctl auth login [instance url] --name [server name] --username [username] --password [password] [flags]
Examples
auth login https://mattermost.example.com
auth login https://mattermost.example.com --name local-server --username sysadmin --password mysupersecret
auth login https://mattermost.example.com --name local-server --username sysadmin --password mysupersecret --mfa-token 123456
auth login https://mattermost.example.com --name local-server --access-token myaccesstoken
Options
-a, --access-token string Access token to use instead of username/password
-h, --help help for login
-m, --mfa-token string MFA token for the credentials
-n, --name string Name for the credentials
--no-activate If present, it won't activate the credentials after login
-p, --password string Password for the credentials
-u, --username string Username for the credentials
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl auth renew¶
Description
Renew the credentials for a given server.
Format
mmctl auth renew [flags]
Examples
auth renew local-server
Options
-a, --access-token string Access token to use instead of username/password
-h, --help help for renew
-m, --mfa-token string MFA token for the credentials
-p, --password string Password for the credentials
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl auth set¶
Description
Set credentials to use in the following commands.
Format
mmctl auth set [server name] [flags]
Examples
auth set local-server
Options
-h, --help help for set
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
Authenticate to a server (e.g. >mmctl auth login https://test.mattermost.com), then enter your username and password (and MFA token if MFA is enabled on the account).
Password
$ mmctl auth login https://community.mattermost.com --name community --username my-username --password mysupersecret
The login
command can also work interactively, so if you leave any required flag empty, mmctl
will ask you for it interactively:
$ mmctl auth login https://community.mattermost.com
Connection name: community
Username: my-username
Password:
MFA
To log in with MFA, use the --mfa-token
flag:
$ mmctl auth login https://community.mattermost.com --name community --username my-username --password mysupersecret --mfa-token 123456
Access tokens¶
You can generate and use a personal access token to authenticate with a server, instead of using username and password to log in:
$ mmctl auth login https://community.mattermost.com --name community --access-token MY_ACCESS_TOKEN
Alternatively, you can log in to your Mattermost server with a username and password:
$ mmctl auth login https://my-instance.example.com --name my-instance --username john.doe --password mysupersecret
credentials for my-instance: john.doe@https://my-instance.example.com stored
We can check the currently stored credentials with:
$ mmctl auth list
| Active | Name | Username | InstanceUrl |
|--------|-------------|----------|---------------------------------|
| * | my-instance | john.doe | https://my-instance.example.com |
And now we can run commands normally:
$ mmctl user search john.doe
id: qykfw3t933y38k57ubct77iu9c
username: john.doe
nickname:
position:
first_name: John
last_name: Doe
email: john.doe@example.com
auth_service:
Installing shell completions¶
To install the shell completions for bash, add the following line to your ~/.bashrc
or ~/.profile
file:
source <(mmctl completion bash)
For zsh, add the following line to your ~/.zshrc
file:
source <(mmctl completion zsh)
mmctl bot¶
Management of bots.
- Child Commands
mmctl bot assign - Assign bot ownership
mmctl bot create - Create a new bot
mmctl bot disable - Disable a bot
mmctl bot enable - Enable a bot
mmctl bot list - List all bots
mmctl bot update - Update bot configuration
Options
-h, --help help for bot
mmctl bot assign¶
Description
Assign the ownership of a bot to another user.
Format
mmctl bot assign [bot-username] [new-owner-username] [flags]
Examples
bot assign testbot user2
Options
-h, --help help for assign
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl bot create¶
Description
Create a bot.
Format
mmctl bot create [username] [flags]
Examples
bot create testbot
Options
--description string Optional. The description text for the new bot.
--display-name string Optional. The display name for the new bot.
-h, --help help for create
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl bot disable¶
Description
Disable an enabled bot.
Format
mmctl bot disable [username] [flags]
Examples
bot disable testbot
Options
-h, --help help for disable
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl bot enable¶
Description
Enable a disabled bot.
Format
mmctl bot enable [username] [flags]
Examples
bot enable testbot
Options
-h, --help help for enable
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl bot list¶
Description
List the bot’s users.
Format
mmctl bot list [flags]
Examples
bot list
Options
--all Optional. Show all bots (including deleleted and orphaned)
-h, --help help for list
--orphaned Optional. Only show orphaned bots
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl bot update¶
Description
Update bot information.
Format
mmctl bot update [username] [flags]
Examples
bot update testbot --username newbotusername
Options
--description string Optional. The new description text for the bot
--display-name string Optional. The new display name for the bot
-h, --help help for update
--username string Optional. The new username for the bot
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl channel¶
Commands for channel management.
- Child Commands
mmctl channel archive - Archive a channel
mmctl channel create - Create a channel
mmctl channel delete - Delete a channel
mmctl channel list - List all channels on specified teams
mmctl channel make_private - Set a channel’s type to “private”
mmctl channel modify - Modify a channel’s type (private/public)
mmctl channel move - Move channels to the specified team
mmctl channel rename - Rename a channel
mmctl channel restore - (Deprecated) Restore a channel from the archive
mmctl channel search - Search a channel by name
mmctl channel unarchive - Unarchive a channel
mmctl channel users - Manage channel users
mmctl channel users add - Add a user to a channel
mmctl channel users remove - Remove a user from a channel
Options
-h, --help help for channel
mmctl channel archive¶
Description
Archive one or multiple channels along with all related information including posts from the database. Channels can be specified by [team]:[channel]
(i.e., myteam:mychannel) or by channel ID.
Format
mmctl channel archive [channels] [flags]
Examples
channel archive myteam:mychannel
Options
-h, --help help for archive
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows the use of insecure TLS protocols, such as SHA-1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl channel create¶
Description
Create a channel.
Format
mmctl channel create [flags]
Examples
channel create --team myteam --name mynewchannel --display_name "My New Channel"
channel create --team myteam --name mynewprivatechannel --display_name "My New Private Channel" --private
Options
--display_name string Channel Display Name
--header string Channel header
-h, --help help for create
--name string Channel Name
--private Create a private channel
--purpose string Channel purpose
--team string Team name or ID
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows the use of insecure TLS protocols, such as SHA-1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl channel delete¶
Description
Permanently delete one or multiple channels along with all related information including posts from the database.
Format
mmctl channel delete [channels] [flags]
Examples
channel delete myteam:mychannel
Options
--confirm Confirm you really want to delete the channel and a DB backup has been performed.
-h, --help help for delete
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl channel list¶
Description
List all Public and archived channels on specified teams. Archived channels are appended with (archived)
. Private channels the user is a member of or has access to are appended with (private)
.
Format
mmctl channel list [teams] [flags]
Examples
channel list myteam
Options
-h, --help help for list
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows the use of insecure TLS protocols, such as SHA-1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl channel make_private¶
Description
Set the type of a channel from Public to Private. Channel can be specified by [team]:[channel]
(e.g., myteam:mychannel) or by channel ID.
Format
mmctl channel make_private [channel] [flags]
Examples
channel make_private myteam:mychannel
Options
-h, --help help for make_private
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl channel modify¶
Description
Change the Public/Private type of a channel. Channel can be specified by [team]:[channel]
(e.g., myteam:mychannel) or by channel ID.
Format
mmctl channel modify [channel] [flags]
Examples
channel modify myteam:mychannel --private
channel modify channelId --public
Options
-h, --help help for modify
--private Convert the channel to a private channel
--public Convert the channel to a public channel
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows the use of insecure TLS protocols, such as SHA-1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl channel move¶
Description
Move the provided channels to the specified team. Validate that all users in the channel belong to the target team. Incoming/outgoing webhooks are moved along with the channel. Channels can be specified by [team]:[channel]
(e.g., myteam:mychannel) or by channel ID.
Format
mmctl channel move [team] [channels] [flags]
Examples
channel move newteam oldteam:mychannel
Options
-h, --help help for move
--force Remove users that are not members of target team before moving the channel.
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows the use of insecure TLS protocols, such as SHA-1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl channel rename¶
Description
Rename an existing channel.
Format
mmctl channel rename [channel] [flags]
Examples
channel rename myteam:oldchannel --name 'new-channel' --display_name 'New Display Name'
channel rename myteam:oldchannel --name 'new-channel'
channel rename myteam:oldchannel --display_name 'New Display Name'
Options
--display_name string Channel Display Name
-h, --help help for rename
--name string Channel Name
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows the use of insecure TLS protocols, such as SHA-1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl channel restore¶
Deprecated in favor of mmctl channel unarchive. Not used in Mattermost Server version v5.26 and later.
Description
Restore a previously deleted channel. Channels can be specified by [team]:[channel]
(e.g., myteam:mychannel) or by channel ID.
Format
mmctl channel restore [channels] [flags]
Examples
channel restore myteam:mychannel
Options
-h, --help help for restore
Options inherited from parent commands
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows the use of insecure TLS protocols, such as SHA-1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl channel search¶
Description
Search a channel by channel name. Channels can be specified by team (e.g., --team myteam mychannel
) or by team ID.
Format
mmctl channel search [channel]
mmctl search --team [team] [channel] [flags]
Examples
channel search mychannel
channel search --team myteam mychannel
Options
-h, --help help for search
--team string team name or ID
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows the use of insecure TLS protocols, such as SHA-1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl channel unarchive¶
Description
Unarchive a previously archived channel. Channels can be specified by [team]:[channel]
(e.g., myteam:mychannel) or by channel ID.
Format
mmctl channel unarchive [channels] [flags]
Examples
channel unarchive myteam:mychannel
Options
-h, --help help for unarchive
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl channel users¶
Description
Manage channel users.
Options
-h, --help help for users
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl channel users add¶
Description
Add one or multiple users to a channel.
Format
mmctl channel users add [channel] [users] [flags]
Examples
channel users add myteam:mychannel user@example.com username
Options
-h, --help help for add
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl channel users remove¶
Description
Remove one or multiple users from a channel.
Format
mmctl channel users remove [channel] [users] [flags]
Examples
channel users remove myteam:mychannel user@example.com username
channel users remove myteam:mychannel --all-users
Options
--all-users Remove all users from the indicated channel
-h, --help help for remove
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl command¶
Management of slash commands.
- Child Commands
mmctl command archive - Archive a slash command
mmctl command create - Create a custom command
mmctl command delete - Delete a specified slash command
mmctl command list - List slash commands on specified teams
mmctl command modify - Modify a slash command
mmctl command move - Move a slash command to a different team
mmctl command show - Show a custom slash command
Options
-h, --help help for command
mmctl command archive¶
Description
Archive a slash command. Commands can be specified by command ID.
Format
mmctl command archive [commandID] [flags]
Examples
command archive commandID
Options
-h, --help help for archive
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl command create¶
Description
Create a custom slash command for the specified team.
Format
mmctl command create [team] [flags]
Examples
command create myteam --title MyCommand --description "My Command Description" --trigger-word mycommand --url http://localhost:8000/my-slash-handler --creator myusername --response-username my-bot-username --icon http://localhost:8000/my-slash-handler-bot-icon.png --autocomplete --post
Options
--autocomplete Show Command in autocomplete list
--autocompleteDesc string Short Command Description for autocomplete list
--autocompleteHint string Command Arguments displayed as help in autocomplete list
--creator string Command Creator's Username (required)
--description string Command Description
-h, --help help for create
--icon string Command Icon URL
--post Use POST method for Callback URL
--response-username string Command Response Username
--title string Command Title
--trigger-word string Command Trigger Word (required)
--url string Command Callback URL (required)
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl command delete¶
Dscription
Delete a slash command. Commands can be specified by command ID.
Note
This command has been deprecated in favor of mmctl command archive.
Format
mmctl command delete [flags]
Examples
command delete commandID
Options
-h, --help help for delete
Options inherited from parent commands
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows the use of insecure TLS protocols, such as SHA-1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl command list¶
Description
List all commands on specified teams.
Format
mmctl command list [flags]
Examples
command list myteam
Options
-h, --help help for list
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl command modify¶
Description
Modify a slash command. Commands can be specified by command ID.
Format
mmctl command modify [commandID] [flags]
Examples
command modify commandID --title MyModifiedCommand --description "My Modified Command Description" --trigger-word mycommand --url http://localhost:8000/my-slash-handler --creator myusername --response-username my-bot-username --icon http://localhost:8000/my-slash-handler-bot-icon.png --autocomplete --post
Options
--autocomplete Show Command in autocomplete list
--autocompleteDesc string Short Command Description for autocomplete list
--autocompleteHint string Command Arguments displayed as help in autocomplete list
--creator string Command Creator's username, email or id (required)
--description string Command Description
-h, --help help for modify
--icon string Command Icon URL
--post Use POST method for Callback URL
--response-username string Command Response Username
--title string Command Title
--trigger-word string Command Trigger Word (required)
--url string Command Callback URL (required)
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl command move¶
Description
Move a slash command to a different team. Commands can be specified by command ID.
Format
mmctl command move [team] [commandID] [flags]
Examples
command move newteam commandID
Options
-h, --help help for move
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl command show¶
Description
Show a custom slash command. Commands can be specified by command ID. Returns command ID, team ID, trigger word, display name, and creator username.
Format
mmctl command show [commandID] [flags]
Examples
command show commandID
Options
-h, --help help for show
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl completion¶
Generates autocompletion scripts for bash
and zsh
.
- Child Commands
mmctl completion bash - Edit the configuration settings
mmctl completion zsh - Get the value of a configuration setting
Options
-h, --help help for completion
mmctl completion bash¶
Description
Generates the bash
autocompletion scripts.
To load completion, run:
. <(mmctl completion bash)
To configure your bash
shell to load completions for each session, add the above line to your ~/.bashrc
.
Format
mmctl completion bash [flags]
Options
-h, --help help for bash
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl completion zsh¶
Description
Generates the zsh
autocompletion scripts.
To load completion, run”
. <(mmctl completion zsh)
To configure your zsh
shell to load completions for each session, add the above line to your ~/.zshrc
.
Format
mmctl completion zsh [flags]
Options
-h, --help help for zsh
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl config¶
Configuration settings.
- Child Commands
mmctl config edit - Edit the configuration settings
mmctl config get - Get the value of a configuration setting
mmctl config migrate - Migrate existing configuration between backends
mmctl config reload - Reload the server configuration
mmctl config reset - Reset the configuration
mmctl config set - Set the value of a configuration
mmctl config show - Write the server configuration to STDOUT
mmctl config subpath - Update client asset loading to use the configured subpath
Options
-h, --help help for config
mmctl config edit¶
Description
Open the editor defined in the EDITOR environment variable to modify the server’s configuration. Once complete, save the file, then upload it to your server.
Format
mmctl config edit [flags]
Examples
config edit
Options
-h, --help help for edit
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl config get¶
Description
Get the value of a configuration setting by its name in dot notation.
Format
mmctl config get [flags]
Examples
config get SqlSettings.DriverName
Options
-h, --help help for get
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl config migrate¶
Description
Migrates a file-based configuration to (or from) a database-based configuration. Point the Mattermost server at the target configuration to start using it. This command only migrates the configuration data from one type to another.
Note
To change the store type to use the database, a System Admin needs to set a MM_CONFIG
environment variable and restart the Mattermost server.
Format
mmctl config migrate [from_config] [to_config] [flags]
Examples
config migrate path/to/config.json "postgres://mmuser:mostest@localhost:5432/mattermost_test?sslmode=disable&connect_timeout=10"
Options
-h, --help help for migrate
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl config reload¶
Description
Reloads the server configuration and applies new settings.
Format
mmctl config reload [flags]
Examples
config reload
Options
-h, --help help for reload
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl config reset¶
Description
Reset the value of a configuration setting by its name in dot notation or a setting section. Accepts multiple values for array settings.
Format
mmctl config reset [flags]
Examples
config reset SqlSettings.DriverName LogSettings
Options
--confirm Confirm you really want to reset all configuration settings to the default value
-h, --help help for reset
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl config set¶
Description
Set the value of a config setting by its name in dot notation. Accepts multiple values for array settings.
Format
mmctl config set [flags]
Examples
config set SqlSettings.DriverName mysql
config set SqlSettings.DataSourceReplicas "replica1" "replica2"
Options
-h, --help help for set
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl config show¶
Description
Print the server configuration and writes to STDOUT in JSON format.
Format
mmctl config show [flags]
Examples
config show
Options
-h, --help help for show
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl config subpath¶
Description
Update the hard-coded production client asset paths to take into account Mattermost running on a subpath. This command needs access to the Mattermost assets directory to be able to rewrite the paths.
Format
mmctl config subpath [flags]
Examples
# you can rewrite the assets to use a subpath
mmctl config subpath --assets-dir /opt/mattermost/client --path /mattermost
# the subpath can have multiple steps
mmctl config subpath --assets-dir /opt/mattermost/client --path /my/custom/subpath
# or you can fallback to the root path passing /
mmctl config subpath --assets-dir /opt/mattermost/client --path /
Options
-a, --assets-dir string directory of the Mattermost assets in the local filesystem
-h, --help help for subpath
-p, --path string path to update the assets with
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl docs¶
Description
Generates mmctl documentation.
Format
mmctl docs [flags]
Options
-d, --directory string The directory where the docs would be generated in. (default "docs")
-h, --help help for docs
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl export¶
Management of exports.
- Child Commands
mmctl export create - Create an export file
mmctl export delete - Delete an export file
mmctl export download - Download export files
mmctl export job - List and show export jobs
mmctl export job list - List export jobs
mmctl export job show - Show export job
mmctl export list - List export files
Options
-h, --help help for group
mmctl export create¶
Description
Create an export file.
Format
mmctl export create [flags]
Options
--attachments Set to true to include file attachments in the export file.
-h, --help help for create
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl export delete¶
Description
Delete an export file.
Format
mmctl export delete [exportname] [flags]
Example
export delete export_file.zip
Options
-h, --help help for delete
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl export download¶
Description
Download export files.
Format
mmctl export download [exportname] [filepath] [flags]
Example
# You can indicate the name of the export and its destination path
$ mmctl export download samplename sample_export.zip
# If you only indicate the name, the path will match it
$ mmctl export download sample_export.zip
Options
-h, --help help for download
--resume Set to true to resume an export download.
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl export job¶
Description
List and show export jobs.
Options
-h, --help help for job
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl export job list¶
Description
List export jobs.
Format
mmctl export job list [flags]
Example
export job list
Options
--all Fetch all export jobs. ``--page`` flag will be ignored if provided
-h, --help help for list
--page int Page number to fetch for the list of export jobs
--per-page int Number of export jobs to be fetched (default 200)
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl export job show¶
Description
Show export job.
Format
mmctl export job show [exportJobID] [flags]
Example
export job show
Options
-h, --help help for show
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl export list¶
Description
List export files.
Format
mmctl export list [flags]
Options
-h, --help help for list
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl group¶
Management of groups (channel and teams).
- Child Commands
mmctl group channel - Manage channel groups
mmctl group list-ldap - List LDAP groups
mmctl group team - Manage team groups
mmctl group channel¶
Management of channel groups
- Child Commands
mmctl group channel disable - Disable group channel constrains
mmctl group channel enable - Enable group channel constrains
mmctl group channel list - List channel groups
mmctl group channel status - Check group status
Options
-h, --help help for group
mmctl group channel disable¶
Description
Disable group constrains in the specified channel.
Format
mmctl group channel disable [team]:[channel] [flags]
Examples
group channel disable myteam:mychannel
Options
-h, --help help for disable
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl group channel enable¶
Description
Enable group constrains in the specified channel.
Format
mmctl group channel enable [team]:[channel] [flags]
Examples
group channel enable myteam:mychannel
Options
-h, --help help for enable
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl group channel list¶
Description
List the groups associated with a channel.
Format
mmctl group channel list [team]:[channel] [flags]
Examples
group channel list myteam:mychannel
Options
-h, --help help for list
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl group channel status¶
Description
Show the group constrain status for the specified channel.
Format
mmctl group channel status [team]:[channel] [flags]
Examples
group channel status myteam:mychannel
Options
-h, --help help for status
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl group list-ldap¶
Description
List LDAP groups.
Format
mmctl group list-ldap [flags]
Examples
group list-ldap
Options
-h, --help help for list-ldap
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl group team¶
Management of team groups.
- Child Commands
mmctl group team disable - Disable group team constrains
mmctl group team enable - Enable group team constrains
mmctl group team list - List team groups
mmctl group team status - Check group constrain status
Options
-h, --help help for group
mmctl group team disable¶
Description
Disable group constrains in the specified team.
Format
mmctl group team disable [team] [flags]
Examples
group team disable myteam
Options
-h, --help help for disable
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl group team enable¶
Description
Enable group constrains in the specified team.
Format
mmctl group team enable [team] [flags]
Examples
group team enable myteam
Options
-h, --help help for enable
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl group team list¶
Description
List the groups associated with a team.
Format
mmctl group team list [team] [flags]
Examples
group team list myteam
Options
-h, --help help for list
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl group team status¶
Description
Show the group constrain status for the specified team.
Format
mmctl group team status [team] [flags]
Examples
group channel status myteam
Options
-h, --help help for status
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl import¶
Description
Manage imports.
- Child Commands
mmctl import job - List and show import jobs
mmctl import job list - List import jobs
mmctl import job show - Show import job
mmctl import list - List all import files
mmctl import list available - List available import files
mmctl import list incomplete - List incomplete import files uploads
mmctl import process - Start an import job
mmctl import upload - Upload import files
Options
-h, --help help for import
mmctl import job¶
Description
List and show import jobs.
Options
-h, --help help for status
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl import job list¶
Description
List import jobs
Format
mmctl import job list [flags]
Examples
import job list
Options
--all Fetch all import jobs. --page flag will be ignore if provided
-h, --help help for list
--page int Page number to fetch for the list of import jobs
--per-page int Number of import jobs to be fetched (default 200)
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl import job show¶
Description
Show import job.
Format
mmctl import job show [importJobID] [flags]
Examples
import job show f3d68qkkm7n8xgsfxwuo498rah
Options
-h, --help help for status
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl import list¶
Description
List all import files.
Examples
import list
Options
-h, --help help for status
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl import list available¶
Description
List available import files.
Format
mmctl import list available [flags]
Examples
import list available
Options
-h, --help help for status
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl import list incomplete¶
Description
List incomplete import files uploads.
Format
mmctl import list incomplete [flags]
Examples
import list incomplete
Options
-h, --help help for status
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl import process¶
Description
Start an import job.
Format
mmctl import process [importname] [flags]
Examples
import process 35uy6cwrqfnhdx3genrhqqznxc_import.zip
Options
-h, --help help for status
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl import upload¶
Description
Upload import files.
Format
mmctl import upload [filepath] [flags]
Examples
import upload import_file.zip
Options
-h, --help help for upload
--resume Set to true to resume an incomplete import upload.
--upload string The ID of the import upload to resume.
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl integrity¶
Description
Perform a relational integrity check which returns information about any orphaned record found.
Note
This command can only be run using local mode.
Format
mmctl integrity [flags]
Options
--confirm Confirm you really want to run a complete integrity check that may temporarily harm system performance
-h, --help help for integrity
-v, --verbose Show detailed information on integrity check results
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl ldap¶
LDAP-related utilities.
- Child Commands
mmctl ldap idmigrate - Migrate LDAP IdAttribute to a new value
mmctl ldap sync - Sync all LDAP users and groups
Options
-h, --help help for ldap
mmctl ldap idmigrate¶
Description
Migrate LDAP IdAttribute
to a new value. Run this utility then change the IdAttribute to the new value.
Format
mmctl ldap idmigrate <objectGUID> [flags]
Examples
ldap idmigrate objectGUID
Options
-h, --help help for sync
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl ldap sync¶
Description
Synchronize all LDAP users and groups now.
Format
mmctl ldap sync [flags]
Examples
ldap sync
Options
-h, --help help for sync
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl license¶
Licensing management commands.
- Child Commands
mmctl license remove - Remove the current license
mmctl license upload - Upload a new license
Options
-h, --help help for license
mmctl license remove¶
Description
Remove the current license and use Mattermost in Team Edition.
Format
mmctl license remove [flags]
Examples
license remove
Options
-h, --help help for remove
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl license upload¶
Description
Upload a license. Replaces current license.
Format
mmctl license upload [license] [flags]
Examples
license upload /path/to/license/mylicensefile.mattermost-license
Options
-h, --help help for upload
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl logs¶
Description
Display logs in a human-readable format. As the log format depends on the server, the --format
flag cannot be used with this command.
Format
mmctl logs [flags]
Options
-h, --help help for logs
-l, --logrus Use logrus for formatting
-n, --number int Number of log lines to retrieve (default 200)
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl permissions¶
Management of permissions and roles.
- Child Commands
mmctl permissions add - Add permissions to a role
mmctl permissions remove - Remove permissions from a role
mmctl permissions reset - Reset default permissions for a role
mmctl permissions role assign - Assign users to role
mmctl permissions role show - Show the role information
mmctl permissions role unassign - Unassign users from a role
Options
-h, --help help for permissions
mmctl permissions add¶
Description
Add one or more permissions to an existing role. Available in Mattermost Enterprise Edition E10 and E20.
Format
mmctl permissions add [role_name] [permission...] [flags]
Examples
permissions add system_user list_open_teams
permissions add system_manager sysconsole_read_user_management_channels
Options
-h, --help help for add
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl permissions remove¶
Description
Remove one or more permissions from an existing role. Available in Mattermost Enterprise Edition E10 and E20.
Format
mmctl permissions remove [role_name] [permission...] [flags]
Examples
permissions remove system_user list_open_teams
permissions remove system_manager sysconsole_read_user_management_channels
Options
-h, --help help for remove
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl permissions reset¶
Description
Reset the given role’s permissions to the default settings and overwrite custom settings. Available in Mattermost Enterprise Edition E10 and E20.
Format
mmctl permissions reset [role_name] [flags]
Examples
# Reset the permissions of the 'system_read_only_admin' role.
$ mmctl permissions reset system_read_only_admin
Options
-h, --help help for reset
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl permissions role assign¶
Description
Assign users to a role by username. Available in Mattermost Enterprise Edition E10 and E20.
Format
mmctl permissions role assign [role_name] [username...] [flags]
Examples
# Assign users with usernames 'john.doe' and 'jane.doe' to the role named 'system_admin'.
permissions assign system_admin john.doe jane.doe
# Examples using other system roles
permissions assign system_manager john.doe jane.doe
permissions assign system_user_manager john.doe jane.doe
permissions assign system_read_only_admin john.doe jane.doe
Options
-h, --help help for assign
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl permissions role show¶
Description
Show all the information about a role.
Format
mmctl permissions role show [role_name] [flags]
Examples
permissions show system_user
Options
-h, --help help for show
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl permissions role unassign¶
Description
Unassign users from a role by username. Available in Mattermost Professional and Mattermost Enterprise.
Format
mmctl permissions role unassign [role_name] [username...] [flags]
Examples
# Unassign users with usernames 'john.doe' and 'jane.doe' from the role named 'system_admin'.
permissions unassign system_admin john.doe jane.doe
# Examples using other system roles
permissions unassign system_manager john.doe jane.doe
permissions unassign system_user_manager john.doe jane.doe
permissions unassign system_read_only_admin john.doe jane.doe
Options
-h, --help help for unassign
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl plugin¶
Management of plugins.
- Child Commands
mmctl plugin add - Add plugins
mmctl plugin delete - Remove plugins
mmctl plugin disable - Disable plugins
mmctl plugin enable - Enable plugins
mmctl plugin install-url - Install plugin from URL
mmctl plugin list - List plugins
Options
-h, --help help for plugin
mmctl plugin add¶
Description
Add plugins to your Mattermost server.
Format
mmctl plugin add [plugins] [flags]
Examples
plugin add hovercardexample.tar.gz pluginexample.tar.gz
Options
-h, --help help for add
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl plugin delete¶
Description
Delete previously uploaded plugins from your Mattermost server.
Format
mmctl plugin delete [plugins] [flags]
Examples
plugin delete hovercardexample pluginexample
Options
-h, --help help for delete
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl plugin disable¶
Description
Disable plugins. Disabled plugins are immediately removed from the user interface and logged out of all sessions.
Format
mmctl plugin disable [plugins] [flags]
Examples
plugin disable hovercardexample pluginexample
Options
-h, --help help for disable
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl plugin enable¶
Description
Enable plugins for use on your Mattermost server.
Format
mmctl plugin enable [plugins] [flags]
Examples
plugin enable hovercardexample pluginexample
Options
-h, --help help for enable
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl plugin install-url¶
Description
Supply one or multiple URLs to plugins compressed in a .tar.gz
file. Plugins must be enabled in the server’s config settings.
Format
mmctl plugin install-url <url>... [flags]
Examples
# You can install one plugin
$ mmctl plugin install-url https://example.com/mattermost-plugin.tar.gz
# Or install multiple in one go
$ mmctl plugin install-url https://example.com/mattermost-plugin-one.tar.gz https://example.com/mattermost-plugin-two.tar.gz
Options
-f, --force overwrite a previously installed plugin with the same ID, if any
-h, --help help for install-url
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl plugin list¶
Description
List all active and inactive plugins installed on your Mattermost server.
Format
mmctl plugin list [flags]
Examples
plugin list
Options
-h, --help help for list
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl plugin marketplace¶
Management of Plugin Marketplace plugins.
- Child Commands
mmctl plugin marketplace install - Install a plugin from the Plugin Marketplace
mmctl plugin marketplace list - List plugins on the Plugin Marketplace
Options
-h, --help help for marketplace
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl plugin marketplace install¶
Description
Install a plugin listed on the Plugin Marketplace server.
Format
mmctl plugin marketplace install <id> [version] [flags]
Examples
# You can specify using both the plugin ID and its version
$ mmctl plugin marketplace install jitsi 2.0.0
# If you don't specify the version, the latest one will be installed
$ mmctl plugin marketplace install jitsi
Options
-h, --help help for install
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl plugin marketplace list¶
Description
Get all plugins from the Plugin Marketplace server, merging data from locally installed plugins as well as prepackaged plugins shipped with the server.
Format
mmctl plugin marketplace list [flags]
Examples
# You can list all the plugins
$ mmctl plugin marketplace list --all
# Pagination options can be used too
$ mmctl plugin marketplace list --page 2 --per-page 10
# Filtering will narrow down the search
$ mmctl plugin marketplace list --filter jit
# You can only retrieve local plugins
$ mmctl plugin marketplace list --local-only
Options
--all Fetch all plugins. --page flag will be ignore if provided
--filter string Filter plugins by ID, name or description
-h, --help help for list
--local-only Only retrieve local plugins
--page int Page number to fetch for the list of users
--per-page int Number of users to be fetched (default 200)
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl post¶
Management of posts.
- Child Commands
mmctl post create - Create a post
mmctl post list - List posts
Options
-h, --help help for post
mmctl post create¶
Description
Create a post.
Format
mmctl post create [flags]
Examples
post create myteam:mychannel --message "some text for the post"
Options
-h, --help help for create
-m, --message string Message for the post
-r, --reply-to string Post id to reply to
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl post list¶
Description
List posts for a channel.
Format
mmctl post list [flags]
Examples
post list myteam:mychannel
post list myteam:mychannel --number 20
Options
-f, --follow Output appended data as new messages are posted to the channel
-h, --help help for list
-n, --number int Number of messages to list (default 20)
-i, --show-ids Show posts ids
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl roles¶
Description
Promote users to the System Admin role, or remove System Admin privileges from users.
Format
Promote users to the System Admin role:
mmctl roles system_admin [users] [flags]
Remove System Admin privileges:
mmctl roles member [users] [flags]
Examples
Promote a user to the System Admin role:
mmctl roles system_admin john_doe
Promote multiple users to the System Admin role:
mmctl roles system_admin john_doe jane_doe
Remove System Admin privileges from a user:
mmctl roles member john_doe
Remove System Admin privileges from multiple users:
mmctl roles member john_doe jane_doe
Options
-h, --help help for roles
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl system¶
System management commands for interacting with the server state and configuration.
- Child Commands
mmctl system clearbusy - Clear the busy state
mmctl system getbusy - Get the current busy state
mmctl system setbusy - Set the busy state to
true
mmctl system status - Print the status of the server
mmctl system version - Print the remote server version
Options
-h, --help help for system
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl system clearbusy¶
Description
Clear the busy state which re-enables non-critical services.
Format
mmctl system clearbusy [flags]
Examples
system clearbusy
Options
-h, --help help for clearbusy
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl system getbusy¶
Description
Get the server busy state (high load) and timestamp corresponding to when the server busy flag will be automatically cleared.
Format
mmctl system getbusy [flags]
Examples
system getbusy
Options
-h, --help help for getbusy
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl system setbusy¶
Description
Set the busy state to true
for the specified number of seconds, which disables non-critical services.
Format
mmctl system setbusy -s [seconds] [flags]
Examples
system setbusy -s 3600
Options
-h, --help help for setbusy
-s, --seconds uint Number of seconds until server is automatically marked as not busy (default 3600)
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl system status¶
Description
Print the server status calculated using several basic server healthchecks.
Format
mmctl system status [flags]
Examples
system status
Options
-h, --help help for status
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl system version¶
Description
Print the server version of the currently connected Mattermost instance.
Format
mmctl system version [flags]
Examples
system version
Options
-h, --help help for version
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl team¶
Management of teams.
- Child Commands
mmctl team archive - Archive some teams
mmctl team create - Create teams
mmctl team delete - Delete teams
mmctl team list - List teams
mmctl team modify - Modify teams
mmctl team rename - Rename teams
mmctl team restore - Restore teams
mmctl team search - Search teams
mmctl team users - Manage team users
Options
-h, --help help for team
mmctl team archive¶
Description
Archive a team along with all related information including posts from the database.
Format
mmctl team archive [teams] [flags]
Examples
team archive myteam
Options
--confirm Confirm you really want to archive the team and a DB backup has been performed
-h, --help help for archive
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl team create¶
Description
Create a team.
Format
mmctl team create [flags]
Examples
team create --name mynewteam --display_name "My New Team"
team create --name private --display_name "My New Private Team" --private
Options
--display_name string Team Display Name
--email string Administrator Email (anyone with this email is automatically a team admin)
-h, --help help for create
--name string Team Name
--private Create a private team
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl team delete¶
Description
Permanently delete a team along with all related information including posts from the database.
Format
mmctl team delete [teams] [flags]
Examples
team delete myteam
Options
--confirm Confirm you really want to delete the team and a DB backup has been performed
-h, --help help for delete
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl team list¶
Description
List all teams on the server.
Format
mmctl team list [flags]
Examples
team list
Options
-h, --help help for list
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl team modify¶
Description
Modify a team’s privacy setting to public or private.
Format
mmctl team modify [teams] [flag] [flags]
Examples
team modify myteam --private
Options
-h, --help help for modify
--private Modify team to be private
--public Modify team to be public
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl team rename¶
Description
Rename an existing team.
Format
mmctl team rename [team] [flags]
Examples
team rename old-team --display_name 'New Display Name'
Options
--display_name string Team Display Name
-h, --help help for rename
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl team restore¶
Description
Restore archived teams.
Format
mmctl team restore [teams] [flags]
Examples
team restore myteam
Options
-h, --help help for restore
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl team search¶
Description
Search for teams based on name.
Format
mmctl team search [teams] [flags]
Examples
team search team1
Options
-h, --help help for search
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl team users¶
Management of team users.
- Child Commands
mmctl team users add - Add users to a team
mmctl team users remove - Remove users from a team
Options
-h, --help help for token
mmctl team users add¶
Description
Add specified users to a team.
Format
mmctl team users add [team] [users] [flags]
Examples
team add myteam user@example.com username
Options
-h, --help help for add
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl team users remove¶
Description
Remove some users from a team.
Format
mmctl team users remove [team] [users] [flags]
Examples
team remove myteam user@example.com username
Options
-h, --help help for remove
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl token¶
Management of users’ access tokens.
- Child Commands
mmctl token generate - Generate token for a user
mmctl token list - List users’ tokens
mmctl token revoke - Revoke tokens for a user
Options
-h, --help help for token
mmctl token generate¶
Description
Generate token for a user.
Format
mmctl token generate [user] [description] [flags]
Examples
generate testuser test-token
Options
-h, --help help for generate
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl token list¶
Description
List the tokens belonging to a user.
Format
mmctl token list [user] [flags]
Examples
user tokens testuser
Options
--active List only active tokens (default true)
--all Fetch all tokens. --page flag will be ignore if provided
-h, --help help for list
--inactive List only inactive tokens
--page int Page number to fetch for the list of users
--per-page int Number of users to be fetched (default 200)
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl token revoke¶
Description
Revoke tokens for a user.
Format
mmctl token revoke [token-ids] [flags]
Examples
revoke testuser test-token-id
Options
-h, --help help for revoke
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl user¶
Management of users.
- Child Commands
mmctl user activate - Activate a user
mmctl user change-password - Change a user’s password
mmctl user convert - Convert users to bots or convert bots to users
mmctl user create - Create user
mmctl user deactivate - Deactivate user
mmctl user delete - Delete users
mmctl user deleteall - Delete all users and all posts (local command only)
mmctl user email - Set user email
mmctl user invite - Invite user
mmctl user list - List users
mmctl user migrate_auth - Bulk migrate user accounts authentication type
mmctl user reset_password - Reset user password
mmctl user resetmfa - Reset a user’s MFA token
mmctl user search - Search for a user
mmctl user username - Change username of the user
mmctl user verify - Verify user’s email address
Options
-h, --help help for user
mmctl user activate¶
Description
Activate users that have been deactivated.
Format
mmctl user activate [emails, usernames, userIds] [flags]
Examples
user activate user@example.com
user activate username
Options
-h, --help help for activate
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl user change-password¶
Description
Changes the password of a user to the one provided. If the user is changing their own password, the flag --current
must indicate the current password. The flag --hashed
can be used to indicate that the new password has been introduced as already hashed.
Format
mmctl user change-password <user> [flags]
Examples
# If you have system permissions, you can change other users' passwords
$ mmctl user change-password john_doe --password new-password
# If you're changing your own password, you need to include the current one
$ mmctl user change-password my-username --current current-password --password new-password
# You can omit these flags to introduce them interactively
$ mmctl user change-password my-username
Are you changing your own password? (YES/NO): YES
Current password:
New password:
# If you have system permissions, you can update the password with the already hashed new
# password. The hashing method should be the same that the server uses internally
$ mmctl user change-password john_doe --password HASHED_PASSWORD --hashed
Options
-c, --current string The current password of the user. Use only if changing your own password
--hashed The supplied password is already hashed
-h, --help help for change-password
-p, --password string The new password for the user
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl user convert¶
Description
Convert user accounts to bots or convert bots to user accounts.
Format
mmctl user convert (--bot [emails] [usernames] [userIds] | --user <username> --password PASSWORD [--email EMAIL]) [flags]
Examples
# You can convert a user to a bot providing an email, an ID, or a username
$ mmctl user convert user@example.com --bot
# Or multiple users in one go
$ mmctl user convert user@example.com anotherUser --bot
# You can convert a bot to a user specifying the email and password that the user will have after conversion
$ mmctl user convert botusername --email new.email@email.com --password password --user
Options
--bot If supplied, convert users to bots
--email string The email address for the converted user account. Required when the "bot" flag is set
--firstname string The first name for the converted user account. Required when the "bot" flag is set
-h, --help help for convert
--lastname string The last name for the converted user account. Required when the "bot" flag is set
--locale string The locale (e.g., EN, FR) for the converted new user account. Required when the "bot" flag is set
--nickname string The nickname for the converted user account. Required when the "bot" flag is set
--password string The password for converted new user account. Required when "user" flag is set
--system_admin If supplied, the converted user will be a System Admin. Defaults to false. Required when the "bot" flag is set
--user If supplied, convert a bot to a user
--username string Username for the converted user account. Required when the "bot" flag is set
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl user create¶
Description
Create a user.
Format
mmctl user create [flags]
Examples
# You can create a user
$ mmctl user create --email user@example.com --username userexample --password Password1
# You can define optional fields like first name, last name, and nickname
$ mmctl user create --email user@example.com --username userexample --password Password1 --firstname User --lastname Example --nickname userex
# You can also create the user as a System Admin
$ mmctl user create --email user@example.com --username userexample --password Password1 --system-admin
# Finally you can verify user on creation if you have the correct permissions
$ mmctl user create --email user@example.com --username userexample --password Password1 --system-admin --email-verified
Options
--email string Required. The email address for the new user account
--email_verified Optional. If supplied, the new user will have the email verified. Defaults to "false"
--firstname string Optional. The first name for the new user account
-h, --help help for create
--lastname string Optional. The last name for the new user account
--guest Optional. If supplied, the new user will be a guest. (default "false")
--locale string Optional. The locale (ex: en, fr) for the new user account
--nickname string Optional. The nickname for the new user account
--password string Required. The password for the new user account
--system_admin Optional. If supplied, the new user will be a system administrator. Defaults to false
--username string Required. Username for the new user account
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl user deactivate¶
Description
Deactivate users. Deactivated users are immediately logged out of all sessions and are unable to log back in.
Format
mmctl user deactivate [emails, usernames, userIds] [flags]
Examples
user deactivate user@example.com
user deactivate username
Options
-h, --help help for deactivate
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl user delete¶
Description
Permanently delete one or multiple users along with all related information including posts from the database.
Format
mmctl user delete [users] [flags]
Examples
user delete user@example.com
Options
--confirm Confirm you really want to delete the user and a DB backup has been performed
-h, --help help for delete
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl user deleteall¶
Description
Permanently delete all users and all related information including posts.
Note
This command can only be run using local mode.
Format
mmctl user deleteall [flags]
Examples
user deleteall
Options
--confirm Confirm you really want to delete the user and a DB backup has been performed
-h, --help help for delete
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl user demote¶
Description
Convert a user into a guest.
Format
mmctl user demote [users] [flags]
Examples
user demote user1 user2
Options
-h, --help help for demote
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl user email¶
Description
Change the email address associated with a user.
Format
mmctl user email [user] [new email] [flags]
Examples
user email testuser user@example.com
Options
-h, --help help for email
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl user invite¶
Description
Send an email invite to a user, to join a team. You can invite a user to multiple teams by listing them. You can specify teams by name or ID.
Format
mmctl user invite [email] [teams] [flags]
Examples
user invite user@example.com myteam
user invite user@example.com myteam1 myteam2
Options
-h, --help help for invite
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl user list¶
Description
List all users.
Format
mmctl user list [flags]
Examples
user list
Options
--all Fetch all users. --page flag will be ignore if provided
-h, --help help for list
--page int Page number to fetch for the list of users
--per-page int Number of users to be fetched (default 200)
--team string If supplied, only users belonging to this team will be listed
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl user migrate_auth¶
Description
Migrate accounts from one authentication provider to another. For example, you can upgrade your authentication provider from email to LDAP.
Format
mmctl user migrate_auth [from_auth] [to_auth] [migration-options] [flags]
Examples
user migrate_auth email saml users.json
Options
--auto Automatically migrate all users. Assumes the usernames and emails are identical between Mattermost and SAML services. (saml only)
--confirm Confirm you really want to proceed with auto migration. (saml only)
--force Force the migration to occur even if there are duplicates on the LDAP server. Duplicates will not be migrated. (ldap only)
-h, --help help for migrate_auth
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl user promote¶
Description
Promote a guest to user.
Format
mmctl user promote [guests] [flags]
Examples
user promote guest1 guest2
Options
-h, --help help for promote
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl user reset_password¶
Description
Send users an email to reset their password.
Format
mmctl user reset_password [users] [flags]
Examples
user reset_password user@example.com
Options
-h, --help help for reset_password
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl user resetmfa¶
Description
Turn off multi-factor authentication for a user. If MFA enforcement is enabled, the user will be forced to re-enable MFA as soon as they log in.
Format
mmctl user resetmfa [users] [flags]
Examples
user resetmfa user@example.com
Options
-h, --help help for resetmfa
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl user search¶
Description
Search for users based on username, email, or user ID.
Format
mmctl user search [users] [flags]
Examples
user search user1@mail.com user2@mail.com
Options
-h, --help help for search
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl user username¶
Description
Change the username of the user.
Format
mmctl user username [user] [new username] [flags]
Examples
user username testuser newusername
Options
-h, --help help for version
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl user verify¶
Description
Verify the user’s email address.
Format
mmctl user verify [users] [flags]
Examples
user verify user1
Options
-h, --help help for version
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl version¶
Description
Print the version of mmctl.
Format
mmctl version [flags]
Options
-h, --help help for version
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl webhook¶
Description
Manage webhooks.
- Child Commands
mmctl webhook create-incoming - Create an incoming webhook
mmctl webhook create-outgoing - Create an outgoing webhook
mmctl webhook delete - Delete webhooks
mmctl webhook list - List webhooks
mmctl webhook modify-incoming - Modify an incoming webhook
mmctl webhook modify-outgoing - Modify an outgoing webhook
mmctl webhook show - Show a webhook
Format
mmctl websocket [flags]
Options
-h, --help help for webhook
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl webhook create-incoming¶
Description
Create an incoming webhook to allow external posting of messages to a specific channel.
Format
mmctl webhook create-incoming [flags]
Examples
webhook create-incoming --channel [channelID] --user [userID] --display-name [displayName] --description [webhookDescription] --lock-to-channel --icon [iconURL]
Options
--channel string Channel name or ID of the new webhook
--description string Incoming webhook description
--display-name string Incoming webhook display name
-h, --help help for create-incoming
--icon string Icon URL
--lock-to-channel Lock to channel
--owner string The username, email, or ID of the owner of the webhook
--user string The username, email, or ID of the user that the webhook should post as
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl webhook create-outgoing¶
Description
Create an outgoing webhook to allow external posting of messages from a specific channel.
Format
mmctl webhook create-outgoing [flags]
Examples
webhook create-outgoing --team myteam --user myusername --display-name mywebhook --trigger-word "build" --trigger-word "test" --url http://localhost:8000/my-webhook-handler
webhook create-outgoing --team myteam --channel mychannel --user myusername --display-name mywebhook --description "My cool webhook" --trigger-when start --trigger-word build --trigger-word test --icon http://localhost:8000/my-slash-handler-bot-icon.png --url http://localhost:8000/my-webhook-handler --content-type "application/json"
Options
--channel string Channel name or ID
--content-type string Content-type
--description string Outgoing webhook description
--display-name string Outgoing webhook display name
-h, --help help for create-outgoing
--icon string Icon URL
--owner string The username, email, or ID of the owner of the webhook
--team string Team name or ID (required)
--trigger-when string When to trigger webhook (exact: for first word matches a trigger word exactly, start: for first word starts with a trigger word) (default "exact")
--trigger-word stringArray Word to trigger webhook (required)
--url stringArray Callback URL (required)
--user string The username, email, or ID of the user that the webhook should post as (required)
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl webhook delete¶
Description
Delete a webhook with a given ID.
Format
mmctl webhook delete [flags]
Examples
webhook delete [webhookID]
Options
-h, --help help for delete
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl webhook list¶
Description
Print a list of all webhooks.
Format
mmctl webhook list [flags]
Examples
webhook list myteam
Options
-h, --help help for list
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl webhook modify-incoming¶
Description
Modify an existing incoming webhook by changing its title, description, channel, or icon URL.
Format
mmctl webhook modify-incoming [flags]
Examples
webhook modify-incoming [webhookID] --channel [channelID] --display-name [displayName] --description [webhookDescription] --lock-to-channel --icon [iconURL]
Options
--channel string Channel ID
--description string Incoming webhook description
--display-name string Incoming webhook display name
-h, --help help for modify-incoming
--icon string Icon URL
--lock-to-channel Lock to channel
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl webhook modify-outgoing¶
Description
Modify an existing outgoing webhook by changing its title, description, channel, icon, url, content-type, or triggers.
Format
mmctl webhook modify-outgoing [flags]
Examples
webhook modify-outgoing [webhookId] --channel [channelId] --display-name [displayName] --description "New webhook description" --icon http://localhost:8000/my-slash-handler-bot-icon.png --url http://localhost:8000/my-webhook-handler --content-type "application/json" --trigger-word test --trigger-when start
Options
--channel string Channel name or ID
--content-type string Content-type
--description string Outgoing webhook description
--display-name string Outgoing webhook display name
-h, --help help for modify-outgoing
--icon string Icon URL
--trigger-when string When to trigger webhook (exact: for first word matches a trigger word exactly, start: for first word starts with a trigger word)
--trigger-word stringArray Word to trigger webhook
--url stringArray Callback URL
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl webhook show¶
Description
Show the webhook specified by [webhookId].
Format
mmctl webhook show [webhookId] [flags]
Examples
webhook show w16zb5tu3n1zkqo18goqry1je
Options
-h, --help help for show
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one
mmctl websocket¶
Description
Display websocket in a human-readable format.
Format
mmctl websocket [flags]
Options
-h, --help help for websocket
Options inherited from parent commands
--config-path string path to the configuration directory. If "$HOME/.mmctl" exists it will take precedence over the default value (default "$XDG_CONFIG_HOME")
--format string the format of the command output [plain, json] (default "plain")
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--local allows communicating with the server through a unix socket
--strict will only run commands if the mmctl version matches the server one