mirror of
https://github.com/hanzoai/team.git
synced 2026-09-30 01:57:35 +00:00
Ports content drift from the legacy Sphinx docs repo (mattermost/docs) since the P13 migration fork point into the corresponding Administration Guide > Manage MDX pages: - ABAC v11.7/v11.8: public channel membership policies (advisory vs. hard-gate behavior), channel-level permission policies, policy simulation, and team-scoped membership policies in Team Settings (abac-channel-access-rules, abac-system-wide-policies, attribute-based-access-control) - User Attributes: separate Display Name/Attribute name fields, backfill note, terminology updates - Content flagging: quarantined message report generation and post deletion report documentation - Autotranslation: translation target language and language-pair clarifications - Generating support packet: sanitize typo fixes, removed stale ElasticsearchSettings.ClientKey reference - Installing license key: Site Statistics -> System Statistics rename - Team/channel members: SetChannelMembers bulk API note - Telemetry: removed Rudder/Segment-specific reporting details following the telemetry stack migration - Statistics: Site Statistics -> System Statistics rename - Health check probes: corrected Go import path example - mmctl: documented --workers flag for import process, renamed Custom Profile Attribute -> User Attribute in cpa command docs - Logging: removed unused audit log file rotation settings from the Cloud defaults note Co-authored-by: Hanzo Dev <[email protected]>
8144 lines
254 KiB
Plaintext
8144 lines
254 KiB
Plaintext
---
|
||
title: "mmctl command line tool"
|
||
---
|
||
import Tabs from '@theme/Tabs';
|
||
import TabItem from '@theme/TabItem';
|
||
|
||
<PlanAvailability slug="all-commercial" />
|
||
|
||
The mmctl is a CLI tool for the Mattermost server which is installed locally and uses the Mattermost API, but may also be used remotely. Authentication is done with either login credentials or an authentication token. This mmctl tool is included and replaces the [CLI](/administration-guide/manage/command-line-tools). The mmctl can currently be used alongside the Mattermost CLI tool. The Mattermost CLI tool will be deprecated in a future release.
|
||
|
||
Being installed locally enables system admins for both self-hosted and Cloud Mattermost instances to run CLI commands even in instances where there's no access to the server (e.g., via SSH).
|
||
|
||
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](https://github.com/mattermost/mattermost/issues?q=is%3Aissue+is%3Aopen+label%3A%22Help+Wanted%22+label%3AArea%2Fmmctl) repo. You can learn more about the unit test coverage campaign for mmctl in the [Unit testing mmctl commands](https://mattermost.com/blog/unit-testing-mmctl-commands/) blog post.
|
||
|
||
## mmctl usage notes
|
||
|
||
- System admins have two ways to run `mmctl` commands: by downloading `mmctl` from the release URLs, which you can find in the [installation instructions](#install-mmctl), or by building it directly, for which you can check the [build instructions](#build-mmctl) below. The source code lives in the [server/cmd/mmctl directory within the mattermost repository](https://github.com/mattermost/mattermost/tree/master/server/cmd/mmctl).
|
||
- `mmctl` also comes bundled with the Mattermost distribution, and is located in the `bin` folder of the installation, next to the `CLI`.
|
||
- We recommend you add the path to the Mattermost `bin` folder into your `$PATH` environment variable. This ensures that you can run mmctl commands locally regardless of your current directory location.
|
||
- If the `bin` directory is not added to the `$PATH` environment variable, each time you use mmctl you must be in the `bin` directory to run mmctl commands, and the commands must be prefixed with `./`. If you're working from a different directory, make sure you specify the full path to mmctl when running mmctl commands.
|
||
- Parameters in mmctl commands are order-specific.
|
||
- You can use the `--local` flag with mmctl commands to run them without authentication by allowing communicating with the server through a Unix socket. See the [local mode](#local-mode) documentation for activation and usage details.
|
||
- 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 be `core` and channel name would be `town-square`.
|
||
|
||
## mmctl commands
|
||
|
||
- [mmctl auth](#mmctl-auth) - Authentication Management
|
||
- [mmctl bot](#mmctl-bot) - Bot Management
|
||
- [mmctl channel](#mmctl-channel) - Channel Management
|
||
- [mmctl command](#mmctl-command) - Command Management
|
||
- [mmctl cpa](#mmctl-cpa) - User Attribute Management
|
||
- [mmctl completion](#mmctl-completion) - Generate autocompletion scripts for bash, fish, powershell, and zsh
|
||
- [mmctl compliance-export](#mmctl-compliance-export) - Compliance Export Management
|
||
- [mmctl config](#mmctl-config) - Configuration Management
|
||
- [mmctl docs](#mmctl-docs) - Generate mmctl documentation
|
||
- [mmctl export](#mmctl-export) - Exports Management
|
||
- [mmctl group](#mmctl-group) - Group Management
|
||
- [mmctl group channel](#mmctl-group-channel) - Channel Group Management
|
||
- [mmctl group team](#mmctl-group-team) - Team Group Management
|
||
- [mmctl group user](#mmctl-group-user) - Custom User Group Management
|
||
- [mmctl import](#mmctl-import) - Import Management
|
||
- [mmctl extract](#mmctl-extract) - Content Extraction Job Management
|
||
- [mmctl integrity](#mmctl-integrity) - (Deprecated) Database Record Integrity
|
||
- [mmctl job](#mmctl-job) - Job Management
|
||
- [mmctl ldap](#mmctl-ldap) - LDAP Management
|
||
- [mmctl license](#mmctl-license) - License Management
|
||
- [mmctl logs](#mmctl-logs) - Log Management
|
||
- [mmctl oauth](#mmctl-oauth) - OAuth2 application management
|
||
- [mmctl permissions](#mmctl-permissions) - Permissions Management
|
||
- [mmctl plugin](#mmctl-plugin) - Plugin Management
|
||
- [mmctl post](#mmctl-post) - Post Management
|
||
- [mmctl roles](#mmctl-roles) - Roles Management
|
||
- [mmctl saml](#mmctl-saml) - SAML Management
|
||
- [mmctl sampledata](#mmctl-sampledata) - Generate sample data
|
||
- [mmctl system](#mmctl-system) - System Management
|
||
- [mmctl team](#mmctl-team) - Team Management
|
||
- [mmctl team users](#mmctl-team-users) - Team User Management
|
||
- [mmctl token](#mmctl-token) - Token Management
|
||
- [mmctl user](#mmctl-user) - User Management
|
||
- [mmctl user preference](#mmctl-user-preference) - Manage User Preferences
|
||
- [mmctl version](#mmctl-version) - Version Management
|
||
- [mmctl webhook](#mmctl-webhook) - Webhook Management
|
||
- [mmctl websocket](#mmctl-websocket) - Websocket Management
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
-h, --help help for mmctl
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
## Install mmctl
|
||
|
||
The mmctl tool comes bundled with Mattermost package. For customers that want to setup it independently from the package, the following methods are available to install mmctl.
|
||
|
||
<div id="install-mmctl-options">
|
||
|
||
<Tabs>
|
||
<TabItem value="release-package" label="Release package">
|
||
|
||
If you're using a release page for Linux, macOS, or Windows, we recommend downloading the mmctl builds through their release URL: `https://releases.mattermost.com/mmctl/${MATTERMOST_VERSION}/${PLATFORM}_${ARCHITECTURE}.tar` (for windows, substitute the `.tar` suffix with `.zip`)
|
||
|
||
E.g. to download version `v10.7.0` of the mmctl amd64 build for linux, you can run the following:
|
||
|
||
``` sh
|
||
curl -vfsSL -O https://releases.mattermost.com/mmctl/v10.7.0/linux_amd64.tar
|
||
```
|
||
|
||
Supported platforms, and corresponding supported architectures include linux (amd64 and arm64), darwin (amd64 and arm64), windows (amd64 only).
|
||
|
||
</TabItem>
|
||
<TabItem value="local-git-clone" label="Local git clone">
|
||
|
||
You can build mmctl from a local Git clone to work directly with the source code, use the latest features, and experiment with custom changes. This workflow is ideal if you need a tailored version of mmctl, want to fix bugs, or test new updates before they’re officially released.
|
||
|
||
``` sh
|
||
git clone https://github.com/mattermost/mattermost.git
|
||
cd mattermost/server
|
||
go install ./cmd/mmctl
|
||
```
|
||
|
||
</TabItem>
|
||
<TabItem value="homebrew" label="Homebrew">
|
||
|
||
**On Linux or macOS, this isn't an officially supported method** This installation channel is managed by the community. Please refer to the [homebrew/homebrew-core repo](https://github.com/Homebrew/homebrew-core) for reporting issues.
|
||
|
||
Use this option on Linux and macOS if you have Homebrew installed.
|
||
|
||
``` sh
|
||
brew install mmctl
|
||
```
|
||
|
||
</TabItem>
|
||
</Tabs>
|
||
|
||
</div>
|
||
|
||
## Build mmctl
|
||
|
||
<div id="build-mmctl">
|
||
|
||
The `mmctl` tool uses `go` modules to manage dependencies, so you need to have installed `go` 1.19 or greater on your machine.
|
||
|
||
</div>
|
||
|
||
After checking out the [mattermost repository](https://github.com/mattermost/mattermost) locally to your machine, from the root directory of the project, you can compile the mmctl binary by running:
|
||
|
||
``` sh
|
||
make -C server mmctl-build
|
||
```
|
||
|
||
## Local mode
|
||
|
||
**Local mode is available for self-hosted deployments only.**
|
||
|
||
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](https://api.mattermost.com), 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](/administration-guide/configure/experimental-configuration-settings#enable-local-mode-for-mmctl). When local mode is enabled, a socket is created at `/var/tmp/mattermost_local.socket` by default.
|
||
|
||
<Tip>
|
||
|
||
When trying to use local mode with mmctl, ensure you're using the same user when running the server and mmctl, or clean up the socket file before switching to a new user. If you encounter an error like `socket file "/var/tmp/mattermost_local.socket" doesn't exists, please check the server configuration for local mode`, this can be resolved by setting this configuration setting to `true`.
|
||
|
||
</Tip>
|
||
|
||
### Using local mode
|
||
|
||
From Mattermost v10.8, when no authentication credentials are found in the authentication configuration, mmctl automatically assumes local mode, eliminating the need to manually append the `--local` flag to the command you want to use. When valid credentials exist, Mattermost will continue to validate them as expected.
|
||
|
||
Prior to Mattermost v10.8, you must 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](/administration-guide/configure/experimental-configuration-settings#enable-local-mode-socket-location).
|
||
|
||
## Running mmctl tests
|
||
|
||
**Available for self-hosted deployments only.**
|
||
|
||
mmctl has two types of tests: unit tests and end to end tests.
|
||
|
||
To execute them, you can run the following commands from the mattermost project root directory:
|
||
|
||
``` sh
|
||
# For the unit tests
|
||
make -C server test-mmctl-unit
|
||
|
||
# For the end to end tests
|
||
make -C server test-mmctl-e2e
|
||
```
|
||
|
||
## mmctl auth
|
||
|
||
**Description**
|
||
|
||
Manage the credentials and authentication methods of remote Mattermost instances.
|
||
|
||
> Child Commands
|
||
> - [mmctl auth clean](#mmctl-auth-clean) - Clean credentials
|
||
> - [mmctl auth current](#mmctl-auth-current) - Display current credentials
|
||
> - [mmctl auth delete](#mmctl-auth-delete) - Delete authentication details
|
||
> - [mmctl auth list](#mmctl-auth-list) - List registered credentials
|
||
> - [mmctl auth login](#mmctl-auth-login) - Log into Mattermost instance
|
||
> - [mmctl auth renew](#mmctl-auth-renew) - Renew login credentials
|
||
> - [mmctl auth set](#mmctl-auth-set) - Set login credentials
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for auth
|
||
```
|
||
|
||
### mmctl auth clean
|
||
|
||
**Description**
|
||
|
||
Clean the credentials associated with a Mattermost instance.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl auth clean [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl auth clean
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for clean
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl auth current
|
||
|
||
**Description**
|
||
|
||
Show the currently stored user credentials.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl auth current [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl auth current
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for current
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl auth delete
|
||
|
||
**Description**
|
||
|
||
Delete a named credential.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl auth delete [server name] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl auth delete local-server
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for delete
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl auth list
|
||
|
||
**Description**
|
||
|
||
Print a list of registered credentials.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl auth list [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl auth list
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for auth list
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl auth login
|
||
|
||
**Description**
|
||
|
||
Log in to an instance and store credentials. You can log in with [a personal access token](https://developers.mattermost.com/integrate/reference/personal-access-token) instead of using username/password. See [access tokens](#access-tokens) for details.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl auth login [instance url] --name [server name] --username [username] --password-file [password-file] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl auth login https://mattermost.example.com
|
||
mmctl auth login https://mattermost.example.com --name local-server --username sysadmin --password-file mysupersecret.txt
|
||
mmctl auth login https://mattermost.example.com --name local-server --username sysadmin --password-file mysupersecret.txt --mfa-token 123456
|
||
mmctl auth login https://mattermost.example.com --name local-server --access-token myaccesstoken
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` text
|
||
-t, --access-token-file string Access token file to be read 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
|
||
-f, --password-file string Password file to be read for the credentials
|
||
-u, --username string Username for the credentials
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
#### Password
|
||
|
||
``` sh
|
||
$ mmctl auth login https://community.mattermost.com --name community --username my-username --password-file mysupersecret
|
||
```
|
||
|
||
The `login` command can also work interactively, so if you leave any required flag empty, `mmctl` will ask you for it interactively:
|
||
|
||
``` sh
|
||
$ mmctl auth login https://community.mattermost.com
|
||
Connection name: community
|
||
Username: my-username
|
||
Password File:
|
||
```
|
||
|
||
#### MFA
|
||
|
||
To log in with MFA, use the `--mfa-token` flag:
|
||
|
||
``` sh
|
||
$ mmctl auth login https://community.mattermost.com --name community --username my-username --password-file 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:
|
||
|
||
``` sh
|
||
$ 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:
|
||
|
||
``` sh
|
||
$ mmctl auth login https://my-instance.example.com --name my-instance --username john.doe --password-file mysupersecret
|
||
credentials for my-instance: john.doe@https://my-instance.example.com stored
|
||
```
|
||
|
||
We can check the currently stored credentials with:
|
||
|
||
``` sh
|
||
$ mmctl auth list
|
||
|
||
| Active | Name | Username | InstanceUrl |
|
||
|--------|-------------|----------|---------------------------------|
|
||
| * | my-instance | john.doe | https://my-instance.example.com |
|
||
```
|
||
|
||
And now we can run commands normally:
|
||
|
||
``` sh
|
||
$ mmctl user search john.doe
|
||
id: qykfw3t933y38k57ubct77iu9c
|
||
username: john.doe
|
||
nickname:
|
||
position:
|
||
first_name: John
|
||
last_name: Doe
|
||
email: [email protected]
|
||
auth_service:
|
||
auth_data:
|
||
```
|
||
|
||
#### Installing shell completions
|
||
|
||
mmctl supports shell completions for bash, fish, powershell, and zsh from Mattermost v11.
|
||
|
||
To install the shell completions for **bash**, add the following line to your `~/.bashrc` or `~/.profile` file:
|
||
|
||
``` sh
|
||
source <(mmctl completion bash)
|
||
```
|
||
|
||
For **zsh**, add the following line to your `~/.zshrc` file:
|
||
|
||
``` sh
|
||
source <(mmctl completion zsh)
|
||
```
|
||
|
||
For **fish**, add the following line to your fish configuration:
|
||
|
||
``` sh
|
||
mmctl completion fish | source
|
||
```
|
||
|
||
For **powershell**, add the following line to your PowerShell profile:
|
||
|
||
``` powershell
|
||
mmctl completion powershell | Out-String | Invoke-Expression
|
||
```
|
||
|
||
### mmctl auth renew
|
||
|
||
**Description**
|
||
|
||
Renew the credentials for a given server.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl auth renew [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl auth renew local-server
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-t, --access-token-file string Access token file to be read to use instead of username/password
|
||
-h, --help help for renew
|
||
-m, --mfa-token string MFA token for the credentials
|
||
-f, --password-file string Password file to be read for the credentials
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl auth set
|
||
|
||
**Description**
|
||
|
||
Set credentials to use in the following commands.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl auth set [server name] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl auth set local-server
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for set
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
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).
|
||
|
||
## mmctl bot
|
||
|
||
Manage bots.
|
||
|
||
> Child Commands
|
||
> - [mmctl bot assign](#mmctl-bot-assign) - Assign bot ownership
|
||
> - [mmctl bot create](#mmctl-bot-create) - Create a new bot
|
||
> - [mmctl bot disable](#mmctl-bot-disable) - Disable a bot
|
||
> - [mmctl bot enable](#mmctl-bot-enable) - Enable a bot
|
||
> - [mmctl bot list](#mmctl-bot-list) - List all bots
|
||
> - [mmctl bot update](#mmctl-bot-update) - Update bot configuration
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for bot
|
||
```
|
||
|
||
### mmctl bot assign
|
||
|
||
**Description**
|
||
|
||
Assign the ownership of a bot to another user.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl bot assign [bot-username] [new-owner-username] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl bot assign testbot user2
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for assign
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl bot create
|
||
|
||
**Description**
|
||
|
||
Create a bot.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl bot create [username] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl bot create testbot
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
--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
|
||
--with-token Optional. Auto genreate access token for the bot.
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl bot disable
|
||
|
||
**Description**
|
||
|
||
Disable an enabled bot.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl bot disable [username] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl bot disable testbot
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for disable
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl bot enable
|
||
|
||
**Description**
|
||
|
||
Enable a disabled bot.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl bot enable [username] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl bot enable testbot
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for enable
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl bot list
|
||
|
||
**Description**
|
||
|
||
List the bot's users.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl bot list [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl bot list
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
--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**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl bot update
|
||
|
||
**Description**
|
||
|
||
Update bot information.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl bot update [username] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl bot update testbot --username newbotusername
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
--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**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
## mmctl channel
|
||
|
||
Manage channels.
|
||
|
||
> Child Commands
|
||
> - [mmctl channel add](#mmctl-channel-add) - (Deprecated) Add a user to a channel
|
||
> - [mmctl channel archive](#mmctl-channel-archive) - Archive a channel
|
||
> - [mmctl channel create](#mmctl-channel-create) - Create a channel
|
||
> - [mmctl channel delete](#mmctl-channel-delete) - Delete a channel
|
||
> - [mmctl channel list](#mmctl-channel-list) - List all channels on specified teams
|
||
> - [mmctl channel make-private](#mmctl-channel-make-private) - (Deprecated) Set a channel's type to "private"
|
||
> - [mmctl channel modify](#mmctl-channel-modify) - Modify a channel's type (private/public)
|
||
> - [mmctl channel move](#mmctl-channel-move) - Move channels to the specified team
|
||
> - [mmctl channel remove](#mmctl-channel-remove) - (Deprecated) Remove a user from a channel
|
||
> - [mmctl channel rename](#mmctl-channel-rename) - Rename a channel
|
||
> - [mmctl channel restore](#mmctl-channel-restore) - (Deprecated) Restore a channel from the archive
|
||
> - [mmctl channel search](#mmctl-channel-search) - Search a channel by name
|
||
> - [mmctl channel unarchive](#mmctl-channel-unarchive) - Unarchive a channel
|
||
> - [mmctl channel users](#mmctl-channel-users) - Manage channel users
|
||
> - [mmctl channel users add](#mmctl-channel-users-add) - Add a user to a channel
|
||
> - [mmctl channel users remove](#mmctl-channel-users-remove) - Remove a user from a channel
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for channel
|
||
```
|
||
|
||
### mmctl channel archive
|
||
|
||
**Description**
|
||
|
||
Archive 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**
|
||
|
||
``` sh
|
||
mmctl channel archive [channels] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl channel archive myteam:mychannel
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for archive
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl channel add
|
||
|
||
This command is deprecated in favor of [mmctl channel users add](/administration-guide/manage/mmctl-command-line-tool#mmctl-channel-users-add).
|
||
|
||
**Description**
|
||
|
||
Add a user to a channel.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl channel add [channel] [users] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl channel add myteam:mychannel [email protected] username
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for add
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl channel create
|
||
|
||
**Description**
|
||
|
||
Create a channel.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl channel create [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl channel create --team myteam --name mynewchannel --display-name "My New Channel"
|
||
mmctl channel create --team myteam --name mynewprivatechannel --display-name "My New Private Channel" --private
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
--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**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl channel delete
|
||
|
||
**Description**
|
||
|
||
Permanently delete channels along with all related information including posts from the database.
|
||
|
||
<Note>
|
||
|
||
Requires the [Enable API Channel Deletion](/administration-guide/configure/environment-configuration-settings#enable-api-channel-deletion) configuration setting to be set to `true`. If this configuration setting is set to `false`, attempting to delete the channel using mmctl fails.
|
||
|
||
</Note>
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl channel delete [channels] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl channel delete myteam:mychannel
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
--confirm Confirm you really want to delete the channel and a database backup has been performed.
|
||
-h, --help help for delete
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl channel list
|
||
|
||
**Description**
|
||
|
||
List all Public, Private, 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**
|
||
|
||
``` sh
|
||
mmctl channel list [teams] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl channel list myteam
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for list
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl channel make-private
|
||
|
||
This command is deprecated in favour of [mmctl channel modify](/administration-guide/manage/mmctl-command-line-tool#mmctl-channel-modify) and the `--private` flag.
|
||
|
||
**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**
|
||
|
||
``` sh
|
||
mmctl channel make-private [channel] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl channel make-private myteam:mychannel
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for make-private
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### 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**
|
||
|
||
``` sh
|
||
mmctl channel modify [channel] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl channel modify myteam:mychannel --private
|
||
mmctl channel modify channelId --public
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-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**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### 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**
|
||
|
||
``` sh
|
||
mmctl channel move [team] [channels] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl channel move newteam oldteam:mychannel
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for move
|
||
--force Remove users that are not members of target team before moving the channel.
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl channel rename
|
||
|
||
**Description**
|
||
|
||
Rename an existing channel.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl channel rename [channel] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl channel rename myteam:oldchannel --name 'new-channel' --display-name 'New Display Name'
|
||
mmctl channel rename myteam:oldchannel --name 'new-channel'
|
||
mmctl channel rename myteam:oldchannel --display-name 'New Display Name'
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
--display-name string Channel Display Name
|
||
-h, --help help for rename
|
||
--name string Channel Name
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl channel remove
|
||
|
||
This command is deprecated in favor of [mmctl channel users remove](/administration-guide/manage/mmctl-command-line-tool#mmctl-channel-users-remove).
|
||
|
||
**Description**
|
||
|
||
Remove a user from a channel.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl channel remove [channel] [users] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl channel remove myteam:mychannel [email protected] username
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for remove
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl channel restore
|
||
|
||
This command is deprecated in favor of [mmctl channel unarchive](#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**
|
||
|
||
``` sh
|
||
mmctl channel restore [channels] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl channel restore myteam:mychannel
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for restore
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--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 for channel details by channel name. Channels can be specified by team (e.g., `--team myteam mychannel`), or by team ID. Returns channel name, display name, and channel ID.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl channel search [channel]
|
||
mmctl search --team [team] [channel] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl channel search mychannel
|
||
mmctl channel search --team myteam mychannel
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for search
|
||
--team string team name or ID
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### 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**
|
||
|
||
``` sh
|
||
mmctl channel unarchive [channels] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl channel unarchive myteam:mychannel
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for unarchive
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl channel users
|
||
|
||
**Description**
|
||
|
||
Manage channel users.
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for users
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl channel users add
|
||
|
||
**Description**
|
||
|
||
Add users to a channel.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl channel users add [channel] [users] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl channel users add myteam:mychannel [email protected] username
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for add
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl channel users remove
|
||
|
||
**Description**
|
||
|
||
Remove users from a channel.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl channel users remove [channel] [users] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl channel users remove myteam:mychannel [email protected] username
|
||
mmctl channel users remove myteam:mychannel --all-users
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
--all-users Remove all users from the indicated channel
|
||
-h, --help help for remove
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
## mmctl command
|
||
|
||
Manage slash commands.
|
||
|
||
> Child Commands
|
||
> - [mmctl command archive](#mmctl-command-archive) - Archive a slash command
|
||
> - [mmctl command create](#mmctl-command-create) - Create a custom command
|
||
> - [mmctl command delete](#mmctl-command-delete) - (Deprecated) Delete a specified slash command
|
||
> - [mmctl command list](#mmctl-command-list) - List slash commands on specified teams
|
||
> - [mmctl command modify](#mmctl-command-modify) - Modify a slash command
|
||
> - [mmctl command move](#mmctl-command-move) - Move a slash command to a different team
|
||
> - [mmctl command show](#mmctl-command-show) - Show a custom slash command
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for command
|
||
```
|
||
|
||
### mmctl command archive
|
||
|
||
**Description**
|
||
|
||
Archive a slash command. Commands can be specified by command ID.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl command archive [commandID] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl command archive commandID
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for archive
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl command create
|
||
|
||
**Description**
|
||
|
||
Create a custom slash command for the specified team.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl command create [team] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl 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**
|
||
|
||
``` text
|
||
--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**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl command delete
|
||
|
||
This command is deprecated in favor of [mmctl command archive](#mmctl-command-archive).
|
||
|
||
**Description**
|
||
|
||
Delete a slash command. Commands can be specified by command ID.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl command delete [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl command delete commandID
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for delete
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--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**
|
||
|
||
``` sh
|
||
mmctl command list [teams] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl command list myteam
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for list
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl command modify
|
||
|
||
**Description**
|
||
|
||
Modify a slash command. Commands can be specified by command ID.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl command modify [commandID] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl 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**
|
||
|
||
``` text
|
||
--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**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl command move
|
||
|
||
**Description**
|
||
|
||
Move a slash command to a different team. Commands can be specified by command ID.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl command move [team] [commandID] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl command move newteam commandID
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for move
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### 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**
|
||
|
||
``` sh
|
||
mmctl command show [commandID] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl command show commandID
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for show
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
## mmctl completion
|
||
|
||
Generate autocompletion scripts for `bash`, `fish`, `powershell`, and `zsh`.
|
||
|
||
> Child Commands
|
||
> - [mmctl completion bash](#mmctl-completion-bash) - Generate the autocompletion script for bash
|
||
> - [mmctl completion fish](#mmctl-completion-fish) - Generate the autocompletion script for fish
|
||
> - [mmctl completion powershell](#mmctl-completion-powershell) - Generate the autocompletion script for powershell
|
||
> - [mmctl completion zsh](#mmctl-completion-zsh) - Generate the autocompletion script for zsh
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for completion
|
||
```
|
||
|
||
### mmctl completion bash
|
||
|
||
**Description**
|
||
|
||
Generate the `bash` autocompletion scripts. This script depends on the 'bash-completion' package. If it is not installed already, you can install it via your OS's package manager.
|
||
|
||
To load completion, run:
|
||
|
||
``` sh
|
||
. <(mmctl completion bash)
|
||
```
|
||
|
||
To configure your `bash` shell to load completions for each session, add the above line to your `~/.bashrc`.
|
||
|
||
To load completion, run:
|
||
|
||
``` sh
|
||
mmctl completion bash [flags]
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for bash
|
||
--no-descriptions disable completion descriptions
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl completion fish
|
||
|
||
**Description**
|
||
|
||
Generate the `fish` autocompletion scripts.
|
||
|
||
To load completion, run:
|
||
|
||
``` sh
|
||
mmctl completion fish | source
|
||
```
|
||
|
||
To configure your `fish` shell to load completions for each session, add the above line to your fish configuration.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl completion fish [flags]
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for fish
|
||
--no-descriptions disable completion descriptions
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl completion powershell
|
||
|
||
**Description**
|
||
|
||
Generate the `powershell` autocompletion scripts.
|
||
|
||
To load completion, run:
|
||
|
||
``` powershell
|
||
mmctl completion powershell | Out-String | Invoke-Expression
|
||
```
|
||
|
||
To configure your `powershell` shell to load completions for each session, add the above line to your PowerShell profile.
|
||
|
||
**Format**
|
||
|
||
``` powershell
|
||
mmctl completion powershell [flags]
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for powershell
|
||
--no-descriptions disable completion descriptions
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl completion zsh
|
||
|
||
**Description**
|
||
|
||
Generate the `zsh` autocompletion scripts.
|
||
|
||
To load completion, run:
|
||
|
||
``` sh
|
||
. <(mmctl completion zsh)
|
||
```
|
||
|
||
To configure your `zsh` shell to load completions for each session, add the above line to your `~/.zshrc`.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl completion zsh [flags]
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for zsh
|
||
--no-descriptions disable completion descriptions
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
## mmctl cpa
|
||
|
||
<PlanAvailability slug="ent-adv" />
|
||
|
||
Manage User Attributes for extended user profile information.
|
||
|
||
> Child Commands
|
||
> - [mmctl cpa field](#mmctl-cpa-field) - Manage User Attribute fields
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for cpa
|
||
```
|
||
|
||
### mmctl cpa field
|
||
|
||
**Description**
|
||
|
||
Manage User Attribute fields.
|
||
|
||
> Child Commands
|
||
> - [mmctl cpa field create](#mmctl-cpa-field-create) - Create a new User Attribute field
|
||
> - [mmctl cpa field delete](#mmctl-cpa-field-delete) - Delete a User Attribute field
|
||
> - [mmctl cpa field edit](#mmctl-cpa-field-edit) - Edit a User Attribute field
|
||
> - [mmctl cpa field list](#mmctl-cpa-field-list) - List User Attribute fields
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for field
|
||
```
|
||
|
||
### mmctl cpa field create
|
||
|
||
**Description**
|
||
|
||
Create a new User Attribute field.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl cpa field create [field-name] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl cpa field create "Department" --type text
|
||
mmctl cpa field create "Location" --type select --options "New York,London,Tokyo"
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for create
|
||
--type string field type (text, select, number, date)
|
||
--options string comma-separated list of options for select fields
|
||
--required mark field as required
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl cpa field delete
|
||
|
||
**Description**
|
||
|
||
Delete an existing User Attribute field.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl cpa field delete [field-id] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl cpa field delete department-field-001
|
||
mmctl cpa field delete location-field-002 --force
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for delete
|
||
--force skip confirmation prompt
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl cpa field edit
|
||
|
||
**Description**
|
||
|
||
Edit an existing User Attribute field.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl cpa field edit [field-id] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl cpa field edit department-field-001 --name "Department/Division"
|
||
mmctl cpa field edit location-field-002 --options "New York,London,Tokyo,Sydney"
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for edit
|
||
--name string update field name
|
||
--type string update field type (text, select, number, date)
|
||
--options string update comma-separated list of options for select fields
|
||
--required mark field as required
|
||
--not-required mark field as not required
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl cpa field list
|
||
|
||
**Description**
|
||
|
||
List all User Attribute fields.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl cpa field list [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl cpa field list
|
||
mmctl cpa field list --json
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for list
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
## mmctl compliance-export
|
||
|
||
<PlanAvailability slug="ent-plus" />
|
||
|
||
Manage compliance export jobs for archiving channel data to third-party compliance systems.
|
||
|
||
> Child Commands
|
||
> - [mmctl compliance-export cancel](#mmctl-compliance-export-cancel) - Cancel a compliance export job
|
||
> - [mmctl compliance-export create](#mmctl-compliance-export-create) - Create a new compliance export job
|
||
> - [mmctl compliance-export download](#mmctl-compliance-export-download) - Download a compliance export file
|
||
> - [mmctl compliance-export list](#mmctl-compliance-export-list) - List compliance export jobs, sorted by creation date descending (newest first)
|
||
> - [mmctl compliance-export show](#mmctl-compliance-export-show) - Show compliance export job
|
||
|
||
### mmctl compliance-export cancel
|
||
|
||
**Description**
|
||
|
||
Cancel an ongoing compliance export job.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl compliance-export cancel [complianceExportJobID] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl compliance-export cancel o98rj3ur83dp5dppfyk5yk6osy
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for cancel
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl compliance-export create
|
||
|
||
**Description**
|
||
|
||
Create a new compliance export job to archive channel messages, direct messages, file uploads, and posts from plugins, bots, or webhooks. Supported export formats include CSV, Actiance XML, and Global Relay EML for integration with third-party compliance systems.
|
||
|
||
> - If `--date` is set, the job will run for one day, from 12am to 12am (minus one millisecond) inclusively.
|
||
> - Running a compliance export job from mmctl will NOT affect the next scheduled job's `batch_start_time`. This means that if you run a compliance export job from mmctl, the next scheduled job will run from the `batch_end_time` of the previous scheduled job, as usual.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl compliance-export create [complianceExportType] --date "2025-03-27 -0400" [flags]
|
||
```
|
||
|
||
**Example**
|
||
|
||
``` sh
|
||
mmctl compliance-export create csv --date "2025-03-27 -0400"
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
--date "YYYY-MM-DD -0000" Run the export for one day, from 12am to 12am (minus one millisecond) inclusively, in the format with timezone offset: ``YYYY-MM-DD -0000``. E.g., ``2024-10-21 -0400`` for Oct 21, 2024 EDT timezone. ``2023-11-01 +0000`` for Nov 01, 2023 UTC. If set, the ``start`` and ``end`` flags will be ignored.
|
||
--end 1743134400000 The end timestamp in unix milliseconds. Posts with updateAt <= end will be exported. If set, ``start`` must be set as well. eg, ``1743134400000`` for 2025-03-28 EDT.
|
||
-h, --help help for create
|
||
--start 1743048000000 The start timestamp in unix milliseconds. Posts with updateAt >= start will be exported. If set, ``end`` must be set as well. eg, ``1743048000000`` for 2025-03-27 EDT.
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl compliance-export download
|
||
|
||
**Description**
|
||
|
||
Download a compliance export file.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl compliance-export download [complianceExportJobID] [output filepath (optional)] [flags]
|
||
```
|
||
|
||
**Example**
|
||
|
||
``` sh
|
||
mmctl compliance-export download o98rj3ur83dp5dppfyk5yk6osy
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for list
|
||
--num-retries int Number of retries if the download fails (default 5)
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl compliance-export list
|
||
|
||
**Description**
|
||
|
||
Lists all compliance export jobs, sorted by creation date descending (newest first).
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl compliance-export list [flags]
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for list
|
||
--all Fetch all compliance export jobs. --page flag will be ignored if provided
|
||
--page int Page number to fetch for the list of compliance export jobs
|
||
--per-page int Number of compliance export jobs to be fetched (default 200)
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl compliance-export show
|
||
|
||
**Description**
|
||
|
||
Show details of a compliance export job.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl compliance-export show [complianceExportJobID] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl compliance-export show o98rj3ur83dp5dppfyk5yk6osy
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for show
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
## mmctl config
|
||
|
||
Configuration settings.
|
||
|
||
> Child Commands
|
||
> - [mmctl config edit](#mmctl-config-edit) - Edit the configuration settings
|
||
> - [mmctl config export](#mmctl-config-export) - Export the server configuration
|
||
> - [mmctl config get](#mmctl-config-get) - Get the value of a configuration setting
|
||
> - [mmctl config migrate](#mmctl-config-migrate) - Migrate existing configuration between backends
|
||
> - [mmctl config patch](#mmctl-config-patch) - Patch the configuration
|
||
> - [mmctl config reload](#mmctl-config-reload) - Reload the server configuration
|
||
> - [mmctl config reset](#mmctl-config-reset) - Reset the configuration
|
||
> - [mmctl config set](#mmctl-config-set) - Set the value of a configuration
|
||
> - [mmctl config show](#mmctl-config-show) - Write the server configuration to STDOUT
|
||
> - [mmctl config subpath](#mmctl-config-subpath) - Update client asset loading to use the configured subpath
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-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**
|
||
|
||
``` sh
|
||
mmctl config edit [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl config edit
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for edit
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl config export
|
||
|
||
**Description**
|
||
|
||
Use this command to export the server configuration, which can then be imported into another server or environment. Masked values are only exported when the tool is running in [local mode](#local-mode).
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl config export [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl config export --remove-masked --remove-defaults
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for export
|
||
--remove-defaults remove default values from the exported configuration
|
||
--remove-masked remove masked values from the exported configuration (default true)
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl config get
|
||
|
||
**Description**
|
||
|
||
Get the value of a configuration setting by its name in dot notation.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl config get [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl config get SqlSettings.DriverName
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for get
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl config migrate
|
||
|
||
**Description**
|
||
|
||
Migrate 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](/administration-guide/configure/configuration-in-your-database#create-an-environment-file) and restart the Mattermost server.
|
||
|
||
- The `migrate` function requires local mode to be enabled. To do this, add the following line to your Mattermost Environment file:
|
||
|
||
> ``` sh
|
||
> MM_SERVICESETTINGS_ENABLELOCALMODE=true
|
||
> ```
|
||
|
||
</Note>
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl config migrate [from_config] [to_config] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl config migrate path/to/config.json "postgres://mmuser:mostest@localhost:5432/mattermost_test?sslmode=disable&connect_timeout=10" --local
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for migrate
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl config patch
|
||
|
||
**Description**
|
||
|
||
Patch the server configuration with the specified configuration file.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl config patch <config-file> [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl config patch /path/to/config.json
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for reload
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl config reload
|
||
|
||
**Description**
|
||
|
||
Reload the server configuration and apply new settings.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl config reload [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl config reload
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for reload
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### 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**
|
||
|
||
``` sh
|
||
mmctl config reset [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl config reset SqlSettings.DriverName LogSettings
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
--confirm Confirm you really want to reset all configuration settings to the default value
|
||
-h, --help help for reset
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl config set
|
||
|
||
**Description**
|
||
|
||
Set the value of a config setting by its name in dot notation. Accepts multiple values for array settings.
|
||
|
||
<Note>
|
||
|
||
Mattermost plugin uploads can't be enabled through the API or using mmctl in local mode.
|
||
|
||
</Note>
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl config set [flags]
|
||
```
|
||
|
||
**4 Examples**
|
||
|
||
``` sh
|
||
mmctl config set SqlSettings.DriverName postgres
|
||
mmctl config set SqlSettings.DataSourceReplicas "replica1" "replica2"
|
||
mmctl config set PluginSettings.Plugins.com.mattermost.calls.rtcdserviceurl "http://mattermost-rtcd"
|
||
mmctl config set LogSettings.AdvancedLoggingJSON '{"console1":{"Type":"console","Format":"json","Levels":[{"ID":5,"Name":"debug","Stacktrace":false},{"ID":4,"Name":"info","Stacktrace":false,"color":36},{"ID":3,"Name":"warn","Stacktrace":false},{"ID":2,"Name":"error","Stacktrace":true,"color":31},{"ID":1,"Name":"fatal","Stacktrace":true,"color":31},{"ID":0,"Name":"panic","Stacktrace":true,"color":31},{"ID":10,"Name":"stdlog","Stacktrace":false}],"Options":{"Out":"stdout"},"MaxQueueSize":1000}}'
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for set
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl config show
|
||
|
||
**Description**
|
||
|
||
Print the server configuration and write to STDOUT in JSON format.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl config show [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl config show
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for show
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### 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**
|
||
|
||
``` sh
|
||
mmctl config subpath [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
# 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**
|
||
|
||
``` sh
|
||
-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**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
## mmctl docs
|
||
|
||
**Description**
|
||
|
||
Generate mmctl documentation.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl docs [flags]
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-d, --directory string The directory where the docs would be generated in. (default "docs")
|
||
-h, --help help for docs
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
## mmctl export
|
||
|
||
Manage exports.
|
||
|
||
> Child Commands
|
||
> - [mmctl export create](#mmctl-export-create) - Create an export file
|
||
> - [mmctl export delete](#mmctl-export-delete) - Delete an export file
|
||
> - [mmctl export download](#mmctl-export-download) - Download export files
|
||
> - [mmctl export generate-presigned-url](#mmctl-export-generate-presigned-url) - Generate a pre-signed URL for an export file
|
||
> - [mmctl export job](#mmctl-export-job) - List, show, and cancel export jobs
|
||
> - [mmctl export job cancel](#mmctl-export-job-cancel) - Cancel export job
|
||
> - [mmctl export job list](#mmctl-export-job-list) - List export jobs
|
||
> - [mmctl export job show](#mmctl-export-job-show) - Show export job
|
||
> - [mmctl export list](#mmctl-export-list) - List export files
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for group
|
||
```
|
||
|
||
### mmctl export create
|
||
|
||
**Description**
|
||
|
||
Create an export file including message attachments.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl export create [flags]
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
--no-attachments Omit file attachments in the export file.
|
||
--include-archived-channels Include archived channels in the export file.
|
||
-h, --help help for create
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl export delete
|
||
|
||
**Description**
|
||
|
||
Delete an export file.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl export delete [exportname] [flags]
|
||
```
|
||
|
||
**Example**
|
||
|
||
``` sh
|
||
mmctl export delete export_file.zip
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for delete
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl export download
|
||
|
||
**Description**
|
||
|
||
Download export files.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl export download [exportname] [filepath] [flags]
|
||
```
|
||
|
||
**Example**
|
||
|
||
``` sh
|
||
# 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**
|
||
|
||
``` sh
|
||
-h, --help help for download
|
||
--num-retries int Number of retries to resume a download. (Default is 5)
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl export generate-presigned-url
|
||
|
||
**Description**
|
||
|
||
Generate a pre-signed URL for an export file in cases where a Mattermost Cloud export is large and challenging to download from the Mattermost server.
|
||
|
||
Requires the `EnableExportDirectDownload` feature flag to be set to `true`.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl export generate-presigned-url [exportname] [flags]
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for generate-presigned-url
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl export job
|
||
|
||
**Description**
|
||
|
||
List, show, and export jobs.
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for job
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl export job cancel
|
||
|
||
**Description**
|
||
|
||
Cancel an export job.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl export job cancel [exportJobID] [flags]
|
||
```
|
||
|
||
**Example**
|
||
|
||
``` sh
|
||
export job cancel o98rj3ur83dp5dppfyk5yk6osy
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for download
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl export job list
|
||
|
||
**Description**
|
||
|
||
List export jobs. Export files include the Job ID in the file name.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl export job list [flags]
|
||
```
|
||
|
||
**Example**
|
||
|
||
``` sh
|
||
mmctl export job list
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
--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 (maximum 200)
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl export job show
|
||
|
||
**Description**
|
||
|
||
Show export job.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl export job show [exportJobID] [flags]
|
||
```
|
||
|
||
**Example**
|
||
|
||
``` sh
|
||
mmctl export job show
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for show
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl export list
|
||
|
||
**Description**
|
||
|
||
List export files. Export files include the job ID in the file name.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl export list [flags]
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for list
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
## mmctl group
|
||
|
||
Manage channel and team groups.
|
||
|
||
> Child Commands
|
||
> - [mmctl group channel](#mmctl-group-channel) - Manage channel groups
|
||
> - [mmctl group list-ldap](#mmctl-group-list-ldap) - List LDAP groups
|
||
> - [mmctl group team](#mmctl-group-team) - Manage team groups
|
||
> - [mmctl group user](#mmctl-group-user) - Manage custom user groups
|
||
|
||
## mmctl group channel
|
||
|
||
Management of channel groups
|
||
|
||
> Child Commands
|
||
> - [mmctl group channel disable](#mmctl-group-channel-disable) - Disable group channel constrains
|
||
> - [mmctl group channel enable](#mmctl-group-channel-enable) - Enable group channel constrains
|
||
> - [mmctl group channel list](#mmctl-group-channel-list) - List channel groups
|
||
> - [mmctl group channel status](#mmctl-group-channel-status) - Check group status
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for group
|
||
```
|
||
|
||
### mmctl group channel disable
|
||
|
||
**Description**
|
||
|
||
Disable group constrains in the specified channel.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl group channel disable [team]:[channel] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl group channel disable myteam:mychannel
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for disable
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl group channel enable
|
||
|
||
**Description**
|
||
|
||
Enable group constrains in the specified channel.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl group channel enable [team]:[channel] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl group channel enable myteam:mychannel
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for enable
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl group channel list
|
||
|
||
**Description**
|
||
|
||
List the groups associated with a channel.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl group channel list [team]:[channel] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl group channel list myteam:mychannel
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for list
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl group channel status
|
||
|
||
**Description**
|
||
|
||
Show the group constrain status for the specified channel.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl group channel status [team]:[channel] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl group channel status myteam:mychannel
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for status
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl group list-ldap
|
||
|
||
**Description**
|
||
|
||
List LDAP groups.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl group list-ldap [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl group list-ldap
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for list-ldap
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
## mmctl group team
|
||
|
||
Manage team groups.
|
||
|
||
> Child Commands
|
||
> - [mmctl group team disable](#mmctl-group-team-disable) - Disable group team constrains
|
||
> - [mmctl group team enable](#mmctl-group-team-enable) - Enable group team constrains
|
||
> - [mmctl group team list](#mmctl-group-team-list) - List team groups
|
||
> - [mmctl group team status](#mmctl-group-team-status) - Check group constrain status
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for group
|
||
```
|
||
|
||
### mmctl group team disable
|
||
|
||
**Description**
|
||
|
||
Disable group constrains in the specified team.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl group team disable [team] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl group team disable myteam
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for disable
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl group team enable
|
||
|
||
**Description**
|
||
|
||
Enable group constrains in the specified team.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl group team enable [team] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl group team enable myteam
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for enable
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl group team list
|
||
|
||
**Description**
|
||
|
||
List the groups associated with a team.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl group team list [team] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl group team list myteam
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for list
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl group team status
|
||
|
||
**Description**
|
||
|
||
Show the group constrain status for the specified team.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl group team status [team] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl group channel status myteam
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for status
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
## mmctl group user
|
||
|
||
Manage custom user groups.
|
||
|
||
> Child Commands
|
||
> - [mmctl group user restore](#mmctl-group-user-restore) - Restore custom user group
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for group
|
||
```
|
||
|
||
### mmctl group user restore
|
||
|
||
**Description**
|
||
|
||
Restore custom user group.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl group user restore [groupname] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl group user restore examplegroup
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for disable
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
## mmctl extract
|
||
|
||
Manage content extraction jobs.
|
||
|
||
> Child Commands
|
||
> - [mmctl extract job](#mmctl-extract-job) - List and show content extraction jobs
|
||
> - [mmctl extract run](#mmctl-extract-run) - Start a content extraction job
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for list
|
||
```
|
||
|
||
### mmctl extract job
|
||
|
||
List and show content extraction jobs.
|
||
|
||
> Child Commands
|
||
> - [mmctl extract job list](#mmctl-extract-job-list) - List content extraction jobs
|
||
> - [mmctl extract job show](#mmctl-extract-job-show) - Show extract job
|
||
|
||
### mmctl extract job list
|
||
|
||
**Description**
|
||
|
||
List content extraction jobs.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl extract job list [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl extract job list
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
--all Fetch all export jobs. --page flag will be ignore 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 (maximum 200)
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl extract job show
|
||
|
||
**Description**
|
||
|
||
Show extract job.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl extract job show [extractJobID] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl extract job show f3d68qkkm7n8xgsfxwuo498rah
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for disable
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl extract run
|
||
|
||
**Description**
|
||
|
||
Start a content extraction job.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl extract run [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl extract run
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
--from int The timestamp of the earliest file to extract, expressed in seconds since the unix epoch.
|
||
-h, --help help for run
|
||
--to int The timestamp of the latest file to extract, expressed in seconds since the unix epoch. Defaults to the current time.
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
## mmctl import
|
||
|
||
**Description**
|
||
|
||
Manage imports.
|
||
|
||
> Child Commands
|
||
> - [mmctl import delete](#mmctl-import-delete) - Delete import files
|
||
> - [mmctl import job](#mmctl-import-job) - List and show import jobs
|
||
> - [mmctl import job list](#mmctl-import-job-list) - List import jobs
|
||
> - [mmctl import job show](#mmctl-import-job-show) - Show import job
|
||
> - [mmctl import list](#mmctl-import-list) - List all import files
|
||
> - [mmctl import list available](#mmctl-import-list-available) - List available import files
|
||
> - [mmctl import list incomplete](#mmctl-import-list-incomplete) - List incomplete import files uploads
|
||
> - [mmctl import process](#mmctl-import-process) - Start an import job
|
||
> - [mmctl import upload](#mmctl-import-upload) - Upload import files
|
||
> - [mmctl import validate](#mmctl-import-validate) - Validate an import file
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for import
|
||
```
|
||
|
||
### mmctl import delete
|
||
|
||
**Description**
|
||
|
||
Delete import files from the server.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl import delete [import-name] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl import delete 35uy6cwrqfnhdx3genrhqqznxc_import.zip
|
||
mmctl import delete import1.zip import2.zip
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
--confirm Confirm you really want to delete the import file(s)
|
||
-h, --help help for delete
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl import job
|
||
|
||
**Description**
|
||
|
||
List and show import jobs.
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for status
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl import job list
|
||
|
||
**Description**
|
||
|
||
List import jobs
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl import job list [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl import job list
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
--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 (maximum 200)
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl import job show
|
||
|
||
**Description**
|
||
|
||
Show import job.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl import job show [importJobID] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl import job show f3d68qkkm7n8xgsfxwuo498rah
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for status
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl import list
|
||
|
||
**Description**
|
||
|
||
List all import files.
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl import list
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for status
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl import list available
|
||
|
||
**Description**
|
||
|
||
List available import files.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl import list available [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl import list available
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for status
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl import list incomplete
|
||
|
||
**Description**
|
||
|
||
List incomplete import files uploads.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl import list incomplete [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl import list incomplete
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for status
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl import process
|
||
|
||
**Description**
|
||
|
||
Start an import job.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl import process [importname] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl import process 35uy6cwrqfnhdx3genrhqqznxc_import.zip
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for status
|
||
--bypass-upload File is read directly from the filesystem, instead of being processed from the server. Supported in --local mode only.
|
||
--extract-content Document attachments will be extracted and indexed during the import process. We recommend disabling this to improve performance.
|
||
--workers int The number of concurrent import worker goroutines. Controls database load during import. When set to `0` (default), uses the number of CPUs available. Maximum allowed is 4x the CPU count.
|
||
```
|
||
|
||
Use `--workers` to reduce concurrency, for example `--workers 1`, when running imports against a live server to minimize database load at the cost of longer import duration.
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl import upload
|
||
|
||
**Description**
|
||
|
||
Upload import files.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl import upload [filepath] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl import upload import_file.zip
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-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**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl import validate
|
||
|
||
**Description**
|
||
|
||
Validate an import file.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl import validate [filepath] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
import validate import_file.zip --team myteam --team myotherteam
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
--check-missing-teams Check for teams that are not defined but referenced in the archive
|
||
--check-server-duplicates Set to false to ignore teams, channels, and users already present on the server (Default true)
|
||
-h, --help help for validate
|
||
--ignore-attachments Do not check if the attached files are present in the archive
|
||
--team stringarray Predefined teams to assume as already present on the destination server. Implies --check-missing-teams. The flag can be repeated
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
## mmctl integrity
|
||
|
||
**Description**
|
||
|
||
This command is deprecated from Mattermost v9.3. Performs a relational integrity check which returns information about any orphaned record found. This command can only be run using [local mode](#local-mode).
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl integrity [flags]
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
--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**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
## mmctl job
|
||
|
||
Management of jobs.
|
||
|
||
> Child Commands
|
||
> - [mmctl job list](#mmctl-job-list) - List the latest jobs
|
||
> - [mmctl job update](#mmctl-job-update) - Update the status of a job
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for ldap
|
||
```
|
||
|
||
### mmctl job list
|
||
|
||
**Description**
|
||
|
||
List the latest jobs.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl job list [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
job list
|
||
job list --ids jobID1,jobID2
|
||
job list --type ldap_sync --status success
|
||
job list --type ldap_sync --status success --page 0 --per-page 10
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
--all Fetch all import jobs. --page flag will be ignored if provided
|
||
-h, --help help for list
|
||
--ids strings Comma-separated list of job IDs to which the operation will be applied. All other flags are ignored
|
||
--page int Page number to fetch for the list of import jobs
|
||
--per-page int Number of import jobs to be fetched (default 5)
|
||
--status string Filter by job status
|
||
--type string Filter by job type
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl job update
|
||
|
||
**Description**
|
||
|
||
Update the status of a job.
|
||
|
||
<Important>
|
||
|
||
The following status rules are permitted:
|
||
|
||
- `in_progress` can be changed to `pending`
|
||
- `in_progress` or `pending` can be changed to `cancel_requested`
|
||
- `cancel_requested` can be changed to `canceled`
|
||
|
||
These restrictions can be bypassed with `--force=true`. Bypassing restrictions can have unexpected consequences on your Mattermost server and should be used with caution.
|
||
|
||
</Important>
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl job update [job] [status] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
job update myJobID pending
|
||
job update myJobID pending --force true
|
||
job update myJobID canceled --force true
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
--force Setting a job status is restricted to certain statuses. You can overwrite these restrictions by using --force. Use this option with caution.
|
||
-h, --help help for update
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
## mmctl ldap
|
||
|
||
LDAP-related utilities.
|
||
|
||
> Child Commands
|
||
> - [mmctl ldap idmigrate](#mmctl-ldap-idmigrate) - Migrate LDAP IdAttribute to a new value
|
||
> - [mmctl ldap job](#mmctl-ldap-job) - List and show LDAP synchronization jobs
|
||
> - [mmctl ldap sync](#mmctl-ldap-sync) - Sync all LDAP users and groups
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for ldap
|
||
```
|
||
|
||
### mmctl ldap idmigrate
|
||
|
||
**Description**
|
||
|
||
Migrate LDAP `IdAttribute` to a new value. Run this utility to change the value of your ID Attribute without your users losing their accounts. After running the command, you can change the ID Attribute to the new value in the System Console. For example, if your current ID Attribute was `sAMAccountName` and you wanted to change it to `objectGUID`, you would:
|
||
|
||
1. Wait for an off-peak time when your users won’t be impacted by a server restart.
|
||
2. Run the command `mmctl ldap idmigrate objectGUID`.
|
||
3. Update the config within the System Console to the new value `objectGUID`.
|
||
4. Restart the Mattermost server.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl ldap idmigrate <objectGUID> [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl ldap idmigrate objectGUID
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for idmigrate
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
## mmctl ldap job
|
||
|
||
List and show LDAP synchronization jobs.
|
||
|
||
Child Commands
|
||
- [mmctl ldap job list](#mmctl-ldap-job-list) - LIst LDAP synchronization jobs
|
||
- [mmctl ldap job show](#mmctl-ldap-job-show) - Show LDAP synchronization jobs
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for ldap
|
||
```
|
||
|
||
### mmctl ldap job list
|
||
|
||
**Description**
|
||
|
||
List LDAP synchronization jobs.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl ldap job list [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl ldap job list
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
--all Fetch all import jobs. The ``--page`` flag will be ignored 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 (maximum 200)
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl ldap job show
|
||
|
||
**Description**
|
||
|
||
Show LDAP synchronization jobs.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl ldap job show [ldapJobID] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl ldap show f3d68qkkm7n8xgsfxwuo498rah
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for list
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
## mmctl ldap sync
|
||
|
||
**Description**
|
||
|
||
Synchronize all LDAP users and groups now.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl ldap sync [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl ldap sync
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for sync
|
||
--include-removed-members **Deprecated in v11.0**: Include members who left or were removed from a group-synced team/channel. Useful in cases where synchronized groups are unlinked/re-linked for testing purposes, when LDAP users are deactivated and reactivated, or when a user leaves a team in error. This option is deprecated and will be removed in a future version.
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
## mmctl license
|
||
|
||
Manage the Mattermost license.
|
||
|
||
> Child Commands
|
||
> - [mmctl license get](#mmctl-license-get) - Get the current license
|
||
> - [mmctl license remove](#mmctl-license-remove) - Remove the current license
|
||
> - [mmctl license upload](#mmctl-license-upload) - Upload a new license
|
||
> - [mmctl license upload-string](#mmctl-license-upload-string) - Upload a license from a string
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for license
|
||
```
|
||
|
||
### mmctl license get
|
||
|
||
**Description**
|
||
|
||
Get the current Mattermost license.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl license get [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl license get
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for get
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl license remove
|
||
|
||
**Description**
|
||
|
||
Remove the current license and use Mattermost Team Edition.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl license remove [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl license remove
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for remove
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl license upload
|
||
|
||
**Description**
|
||
|
||
Upload a license and replace the current license.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl license upload [license] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl license upload /path/to/license/mylicensefile.mattermost-license
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for upload
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl license upload-string
|
||
|
||
**Description**
|
||
|
||
Upload a license from a string. Replaces the current license.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl license upload-string [license] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
license upload-string "mylicensestring"
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for upload
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
## 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**
|
||
|
||
``` sh
|
||
mmctl logs [flags]
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-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**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
## mmctl oauth
|
||
|
||
Manage registered OAuth2 applications.
|
||
|
||
> Child Commands
|
||
> - [mmctl oauth list](#mmctl-oauth-list) - Remove permissions from a role
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for permissions
|
||
```
|
||
|
||
### mmctl oauth list
|
||
|
||
**Description**
|
||
|
||
List all registered OAuth2 applications.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl oauth list [flags]
|
||
```
|
||
|
||
**Example**
|
||
|
||
``` sh
|
||
mmctl list
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for add
|
||
--page int Page number to fetch for the list of OAuth2 apps
|
||
--per-page int Number of OAuth2 apps to be fetched per page (maximum 200)
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
## mmctl permissions
|
||
|
||
Manage permissions and roles.
|
||
|
||
> Child Commands
|
||
> - [mmctl permissions add](#mmctl-permissions-add) - Add permissions to a role
|
||
> - [mmctl permissions remove](#mmctl-permissions-remove) - Remove permissions from a role
|
||
> - [mmctl permissions reset](#mmctl-permissions-reset) - Reset default permissions for a role
|
||
> - [mmctl permissions role assign](#mmctl-permissions-role-assign) - Assign users to role
|
||
> - [mmctl permissions role show](#mmctl-permissions-role-show) - Show the role information
|
||
> - [mmctl permissions role unassign](#mmctl-permissions-role-unassign) - Unassign users from a role
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for permissions
|
||
```
|
||
|
||
### mmctl permissions add
|
||
|
||
<PlanAvailability slug="ent-plus" />
|
||
|
||
**Description**
|
||
|
||
Add one or more permissions to an existing role.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl permissions add <role> <permission...> [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl permissions add system_user list_open_teams
|
||
mmctl permissions add system_manager sysconsole_read_user_management_channels
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for add
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl permissions remove
|
||
|
||
<PlanAvailability slug="ent-plus" />
|
||
|
||
**Description**
|
||
|
||
Remove one or more permissions from an existing role. For classified projects, this command can be used to ensure that team members don't know about members outside of their project, and [@mentions](/end-user-guide/collaborate/mention-people) don't disclose the names of people outside of a classified project.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl permissions remove <role> <permission...> [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl permissions remove system_user list_open_teams
|
||
mmctl permissions remove system_manager sysconsole_read_user_management_channels
|
||
mmctl permissions remove system_user view_member
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for remove
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl permissions reset
|
||
|
||
<PlanAvailability slug="ent-plus" />
|
||
|
||
**Description**
|
||
|
||
Reset the given role's permissions to the default settings and overwrite custom settings.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl permissions reset <role_name> [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
# Reset the permissions of the 'system_read_only_admin' role.
|
||
$ mmctl permissions reset system_read_only_admin
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for reset
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl permissions role assign
|
||
|
||
<PlanAvailability slug="ent-plus" />
|
||
|
||
**Description**
|
||
|
||
Assign users to a role by username.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl permissions role assign <role_name> <username...> [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
# Assign users with usernames 'john.doe' and 'jane.doe' to the role named 'system_admin'.
|
||
mmctl permissions role assign system_admin john.doe jane.doe
|
||
|
||
# Examples using other system roles
|
||
mmctl permissions role assign system_manager john.doe jane.doe
|
||
mmctl permissions role assign system_user_manager john.doe jane.doe
|
||
mmctl permissions role assign system_read_only_admin john.doe jane.doe
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for assign
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl permissions role show
|
||
|
||
**Description**
|
||
|
||
Show all the information about a role.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl permissions role show <role_name> [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl permissions role show system_user
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for show
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl permissions role unassign
|
||
|
||
<PlanAvailability slug="pro-plus" />
|
||
|
||
**Description**
|
||
|
||
Unassign users from a role by username.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl permissions role unassign <role_name> <username...> [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
# Unassign users with usernames 'john.doe' and 'jane.doe' from the role named 'system_admin'.
|
||
mmctl permissions unassign system_admin john.doe jane.doe
|
||
|
||
# Examples using other system roles
|
||
mmctl permissions unassign system_manager john.doe jane.doe
|
||
mmctl permissions unassign system_user_manager john.doe jane.doe
|
||
mmctl permissions unassign system_read_only_admin john.doe jane.doe
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for unassign
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
## mmctl plugin
|
||
|
||
Manage plugins.
|
||
|
||
> Child Commands
|
||
> - [mmctl plugin add](#mmctl-plugin-add) - Add plugins
|
||
> - [mmctl plugin delete](#mmctl-plugin-delete) - Remove plugins
|
||
> - [mmctl plugin disable](#mmctl-plugin-disable) - Disable plugins
|
||
> - [mmctl plugin enable](#mmctl-plugin-enable) - Enable plugins
|
||
> - [mmctl plugin install-url](#mmctl-plugin-install-url) - Install plugin from URL
|
||
> - [mmctl plugin list](#mmctl-plugin-list) - List plugins
|
||
> - [mmctl plugin marketplace](#mmctl-plugin-marketplace) - Manage Marketplace plugins
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for plugin
|
||
```
|
||
|
||
### mmctl plugin add
|
||
|
||
**Description**
|
||
|
||
Add plugins to your Mattermost server.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl plugin add [plugins] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl plugin add hovercardexample.tar.gz pluginexample.tar.gz
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-f, --force overwrite a previously installed plugin with the same ID, if any
|
||
-h, --help help for add
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl plugin delete
|
||
|
||
**Description**
|
||
|
||
Delete previously uploaded plugins from your Mattermost server.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl plugin delete [plugins] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl plugin delete hovercardexample pluginexample
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for delete
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl plugin disable
|
||
|
||
**Description**
|
||
|
||
Disable plugins. Disabled plugins are immediately removed from the user interface and logged out of all sessions.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl plugin disable [plugins] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl plugin disable hovercardexample pluginexample
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for disable
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl plugin enable
|
||
|
||
**Description**
|
||
|
||
Enable plugins for use on your Mattermost server.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl plugin enable [plugins] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl plugin enable hovercardexample pluginexample
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for enable
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl plugin install-url
|
||
|
||
**Description**
|
||
|
||
Supply URLs to plugins compressed in a `.tar.gz` file. Plugins must be enabled in the server's config settings.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl plugin install-url <url>... [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
# You can install one plugin
|
||
$ mmctl plugin install-url https://example.com/mattermost-plugin.tar.gz
|
||
|
||
# Or install multiple plugins at a time
|
||
$ mmctl plugin install-url https://example.com/mattermost-plugin-one.tar.gz https://example.com/mattermost-plugin-two.tar.gz
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-f, --force overwrite a previously installed plugin with the same ID, if any
|
||
-h, --help help for install-url
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl plugin list
|
||
|
||
**Description**
|
||
|
||
List all enabled and disabled plugins installed on your Mattermost server.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl plugin list [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl plugin list
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for list
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
## mmctl plugin marketplace
|
||
|
||
Manage Marketplace plugins.
|
||
|
||
> Child Commands
|
||
> - [mmctl plugin marketplace install](#mmctl-plugin-marketplace-install) - Install a plugin from the Plugin Marketplace
|
||
> - [mmctl plugin marketplace list](#mmctl-plugin-marketplace-list) - List plugins on the Plugin Marketplace
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for marketplace
|
||
```
|
||
|
||
### mmctl plugin marketplace install
|
||
|
||
**Description**
|
||
|
||
Install a plugin available on the Plugin Marketplace server. The latest version of the plugin will be installed.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl plugin marketplace install <id> [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
$ mmctl plugin marketplace install jitsi
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for install
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl plugin marketplace list
|
||
|
||
**Description**
|
||
|
||
Get all plugins available from the Plugin Marketplace server, merging data from locally installed plugins as well as prepackaged plugins shipped with the server.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl plugin marketplace list [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
# You can list all available plugins
|
||
$ mmctl plugin marketplace list --all
|
||
|
||
# Pagination options can be used
|
||
$ mmctl plugin marketplace list --page 2 --per-page 10
|
||
|
||
# Filtering narrows down the search
|
||
$ mmctl plugin marketplace list --filter jit
|
||
|
||
# You can retrieve only local plugins
|
||
$ mmctl plugin marketplace list --local-only
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
--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 (maximum 200)
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
## mmctl post
|
||
|
||
Manage posts.
|
||
|
||
> Child Commands
|
||
> - [mmctl post create](#mmctl-post-create) - Create a post
|
||
> - [mmctl post delete](#mmctl-post-delete) - Delete a post
|
||
> - [mmctl post list](#mmctl-post-list) - List posts for a channel
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for post
|
||
```
|
||
|
||
### mmctl post create
|
||
|
||
**Description**
|
||
|
||
Create a post.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl post create [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl post create myteam:mychannel --message "some text for the post"
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-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**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl post delete
|
||
|
||
**Description**
|
||
|
||
Mark a post as deleted and remove it and all attachments from the client without permanently deleting it from the database. Permanently delete a post and all attachments using the `--permanent` flag.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl post delete [posts] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
Mark post as deleted:
|
||
|
||
``` sh
|
||
mmctl post delete udjmt396tjghi8wnsk3a1qs1sw
|
||
```
|
||
|
||
Permanently delete a post and its file contents from the database and filestore:
|
||
|
||
``` sh
|
||
mmctl post delete udjmt396tjghi8wnsk3a1qs1sw --permanent
|
||
```
|
||
|
||
Permanently delete multiple posts and their file contents from the database and filestore:
|
||
|
||
``` sh
|
||
mmctl post delete udjmt396tjghi8wnsk3a1qs1sw 7jgcjt7tyjyyu83qz81wo84w6o --permanent
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
--confirm Confirm you really want to delete the post and a DB backup has been performed
|
||
-h, --help help for delete
|
||
--permanent Permanently delete the post and its contents from the database
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl post list
|
||
|
||
**Description**
|
||
|
||
List posts for a channel.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl post list [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl post list myteam:mychannel
|
||
mmctl post list myteam:mychannel --number 20
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-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
|
||
-s, --since string List messages posted after a certain time (ISO 8601)
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
## 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:
|
||
|
||
``` sh
|
||
mmctl roles system_admin [users] [flags]
|
||
```
|
||
|
||
Remove system admin privileges:
|
||
|
||
``` sh
|
||
mmctl roles member [users] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
Promote a user to the system admin role:
|
||
|
||
``` sh
|
||
mmctl roles system_admin john_doe
|
||
```
|
||
|
||
Promote multiple users to the system admin role:
|
||
|
||
``` sh
|
||
mmctl roles system_admin john_doe jane_doe
|
||
```
|
||
|
||
Remove system admin privileges from a user:
|
||
|
||
``` sh
|
||
mmctl roles member john_doe
|
||
```
|
||
|
||
Remove system admin privileges from multiple users:
|
||
|
||
``` sh
|
||
mmctl roles member john_doe jane_doe
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for roles
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
## mmctl saml
|
||
|
||
SAML-related utilities.
|
||
|
||
> Child Commands
|
||
> - [mmctl saml auth-data-reset](#mmctl-saml-auth-data-reset) - Reset AuthData field to Email
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for system
|
||
```
|
||
|
||
### mmctl saml auth-data-reset
|
||
|
||
**Description**
|
||
|
||
Resets the AuthData field for SAML users to their email. Run this utility after setting the 'id' SAML attribute to an empty value.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl saml auth-data-reset [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
# Reset all SAML users' AuthData field to their email, including deleted users
|
||
$ mmctl saml auth-data-reset --include-deleted
|
||
|
||
# Show how many users would be affected by the reset
|
||
$ mmctl saml auth-data-reset --dry-run
|
||
|
||
# Skip confirmation for resetting the AuthData
|
||
$ mmctl saml auth-data-reset -y
|
||
|
||
# Only reset the AuthData for the following SAML users
|
||
$ mmctl saml auth-data-reset --users userid1,userid2
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
--dry-run Dry run only
|
||
-h, --help help for auth-data-reset
|
||
--include-deleted Include deleted users
|
||
--users strings Comma-separated list of user IDs to which the operation will be applied
|
||
-y, --yes Skip confirmation
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
## mmctl sampledata
|
||
|
||
**Description**
|
||
|
||
Generate a sample data file and store it locally, or directly import it to the remote server.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl sampledata [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
# You can create a sampledata file and store it locally
|
||
$ mmctl sampledata --bulk sampledata-file.jsonl
|
||
|
||
# Or you can simply print it to the STDOUT
|
||
$ mmctl sampledata --bulk -
|
||
|
||
# You can customize the amount of entities to create
|
||
$ mmctl sampledata -t 7 -u 20 -g 4
|
||
|
||
# The sampledata file can be directly imported into the remote server by not specifying a ``--bulk``` flag
|
||
$ mmctl sampledata
|
||
|
||
# Sample users can be created with profile pictures
|
||
$ mmctl sampledata --profile-images ./images/profiles
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-b, --bulk string Optional. Path to write a JSONL bulk file instead of uploading into the remote server.
|
||
--channel-memberships int The number of sample channel memberships per user in a team. (default 5)
|
||
--channels-per-team int The number of sample channels per team. (default 10)
|
||
--deactivated-users int The number of deactivated users.
|
||
--direct-channels int The number of sample direct message channels. (default 30)
|
||
--group-channels int The number of sample group message channels. (default 15)
|
||
-g, --guests int The number of sample guests. (default 1)
|
||
-h, --help help for sampledata
|
||
--posts-per-channel int The number of sample post per channel. (default 100)
|
||
--posts-per-direct-channel int The number of sample posts per direct message channel. (default 15)
|
||
--posts-per-group-channel int The number of sample posts per group message channel. (default 30)
|
||
--profile-images string Optional. Path to folder with images to randomly pick as user profile image.
|
||
-s, --seed int Seed used for generating the random data (Different seeds generate different data). (default 1)
|
||
--team-memberships int The number of sample team memberships per user. (default 2)
|
||
-t, --teams int The number of sample teams. (default 2)
|
||
-u, --users int The number of sample users. (default 15)
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
## mmctl system
|
||
|
||
System management commands for interacting with the server state and configuration.
|
||
|
||
> Child Commands
|
||
> - [mmctl system clearbusy](#mmctl-system-clearbusy) - Clear the busy state
|
||
> - [mmctl system getbusy](#mmctl-system-getbusy) - Get the current busy state
|
||
> - [mmctl system setbusy](#mmctl-system-setbusy) - Set the busy state to `true`
|
||
> - [mmctl system status](#mmctl-system-status) - Print the status of the server
|
||
> - [mmctl system supportpacket](#mmctl-system-supportpacket) - Download a Support Packet
|
||
> - [mmctl system version](#mmctl-system-version) - Print the remote server version build number
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for system
|
||
```
|
||
|
||
### mmctl system clearbusy
|
||
|
||
**Description**
|
||
|
||
Clear the busy state which re-enables non-critical services.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl system clearbusy [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl system clearbusy
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for clearbusy
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### 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**
|
||
|
||
``` sh
|
||
mmctl system getbusy [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl system getbusy
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for getbusy
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl system setbusy
|
||
|
||
**Description**
|
||
|
||
Set the busy state to `true` for the specified number of seconds which disables non-critical services.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl system setbusy -s [seconds] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl system setbusy -s 3600
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-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**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl system status
|
||
|
||
**Description**
|
||
|
||
Print the server status which is calculated using several basic server healthchecks.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl system status [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl system status
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for status
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl system supportpacket
|
||
|
||
**Description**
|
||
|
||
Generate and download a Support Packet of the Mattermost server to share with Mattermost Support.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl system supportpacket [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl system supportpacket
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for version
|
||
-o, --output-file string Output file name. Default is ``mattermost_support_packet_YYYY-MM-DD-HH-MM.zip``.
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl system version
|
||
|
||
**Description**
|
||
|
||
Print the server version build number of the currently connected Mattermost instance.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl system version [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl system version
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for version
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
## mmctl team
|
||
|
||
Manage teams.
|
||
|
||
<Important>
|
||
|
||
When specifying team names within mmctl commands, you must use the `team-URL` version of the team name, rather than the display name you see in the channel sidebar. Your `team-URL` does not contain spaces. Run the [mmctl team list](#mmctl-team-list) command to return a list of all teams on the server in `team-URL` format. See the [team name and URL selection](/end-user-guide/collaborate/organize-using-teams#team-name-and-url-selection) documentation for details.
|
||
|
||
Child Commands
|
||
- [mmctl team archive](#mmctl-team-archive) - Archive some teams
|
||
- [mmctl team create](#mmctl-team-create) - Create teams
|
||
- [mmctl team delete](#mmctl-team-delete) - Delete teams
|
||
- [mmctl team list](#mmctl-team-list) - List teams
|
||
- [mmctl team modify](#mmctl-team-modify) - Modify teams
|
||
- [mmctl team rename](#mmctl-team-rename) - Rename teams
|
||
- [mmctl team restore](#mmctl-team-restore) - Restore teams
|
||
- [mmctl team search](#mmctl-team-search) - Search teams
|
||
- [mmctl team users](#mmctl-team-users) - Manage team users
|
||
|
||
</Important>
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for team
|
||
```
|
||
|
||
### mmctl team archive
|
||
|
||
**Description**
|
||
|
||
Archive a team along with all related information including posts from the database.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl team archive [teams] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl team archive myteam
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
--confirm Confirm you really want to archive the team and a database backup has been performed
|
||
-h, --help help for archive
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl team create
|
||
|
||
**Description**
|
||
|
||
Create a team.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl team create [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl team create --name mynewteam --display-name "My New Team"
|
||
mmctl team create --name private --display-name "My New Private Team" --private
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
--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**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl team delete
|
||
|
||
**Description**
|
||
|
||
Permanently delete a team along with all related information including posts from the database.
|
||
|
||
<Note>
|
||
|
||
Requires the [Enable API Team Deletion](/administration-guide/configure/environment-configuration-settings#enable-api-team-deletion) configuration setting to be set to `true`. If this configuration setting is set to `false`, attempting to delete the team using mmctl fails.
|
||
|
||
</Note>
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl team delete [teams] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl team delete myteam
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
--confirm Confirm you really want to delete the team and a database backup has been performed
|
||
-h, --help help for delete
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl team list
|
||
|
||
**Description**
|
||
|
||
List all teams on the server.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl team list [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl team list
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for list
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl team modify
|
||
|
||
**Description**
|
||
|
||
Modify a team's privacy setting to public or private.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl team modify [teams] [flag] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl team modify myteam --private
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for modify
|
||
--private Modify team to be private
|
||
--public Modify team to be public
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl team rename
|
||
|
||
**Description**
|
||
|
||
Rename an existing team.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl team rename [team] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl team rename old-team --display-name 'New Display Name'
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
--display-name string Team Display Name
|
||
-h, --help help for rename
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl team restore
|
||
|
||
**Description**
|
||
|
||
Restore archived teams.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl team restore [teams] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl team restore myteam
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for restore
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl team search
|
||
|
||
**Description**
|
||
|
||
Search for teams based on name.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl team search [teams] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl team search team1
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for search
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
## mmctl team users
|
||
|
||
Manage team users.
|
||
|
||
> Child Commands
|
||
> - [mmctl team users add](#mmctl-team-users-add) - Add users to a team
|
||
> - [mmctl team users remove](#mmctl-team-users-remove) - Remove users from a team
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for token
|
||
```
|
||
|
||
### mmctl team users add
|
||
|
||
**Description**
|
||
|
||
Add specified users to a team.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl team users add [team] [users] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl team users add myteam [email protected] username
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for add
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl team users remove
|
||
|
||
**Description**
|
||
|
||
Remove specified users from a team.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl team users remove [team] [users] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl team users remove myteam [email protected] username
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for remove
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
## mmctl token
|
||
|
||
Manage users' access tokens.
|
||
|
||
> Child Commands
|
||
> - [mmctl token generate](#mmctl-token-generate) - Generate token for a user
|
||
> - [mmctl token list](#mmctl-token-list) - List users' tokens
|
||
> - [mmctl token revoke](#mmctl-token-revoke) - Revoke tokens for a user
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for token
|
||
```
|
||
|
||
### mmctl token generate
|
||
|
||
**Description**
|
||
|
||
Generate token for a user.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl token generate [user] [description] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl token generate testuser test-token
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for generate
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl token list
|
||
|
||
**Description**
|
||
|
||
List the tokens belonging to a user.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl token list [user] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl user tokens testuser
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
--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 (maximum 200)
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl token revoke
|
||
|
||
**Description**
|
||
|
||
Revoke tokens for a user.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl token revoke [token-ids] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl revoke testuser test-token-id
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for revoke
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
## mmctl user
|
||
|
||
Manage users.
|
||
|
||
> Child Commands
|
||
> - [mmctl user activate](#mmctl-user-activate) - Activate a user
|
||
> - [mmctl user change-password](#mmctl-user-change-password) - Change a user's password
|
||
> - [mmctl user convert](#mmctl-user-convert) - Convert users to bots or convert bots to users
|
||
> - [mmctl user create](#mmctl-user-create) - Create user
|
||
> - [mmctl user deactivate](#mmctl-user-deactivate) - Deactivate user
|
||
> - [mmctl user delete](#mmctl-user-delete) - Delete users
|
||
> - [mmctl user deleteall](#mmctl-user-deleteall) - Delete all users and all posts (local command only)
|
||
> - [mmctl user demote](#mmctl-user-demote) - Demote users to guests
|
||
> - [mmctl user edit](#mmctl-user-edit) - Edit user properties
|
||
> - [mmctl user edit authdata](#mmctl-user-edit-authdata) - Edit user authentication data
|
||
> - [mmctl user edit email](/administration-guide/manage/mmctl-command-line-tool#mmctl-user-edit-email) - Edit user email address
|
||
> - [mmctl user edit username](/administration-guide/manage/mmctl-command-line-tool#mmctl-user-edit-username) - Edit user username
|
||
> - [mmctl user email](#mmctl-user-email) - (Deprecated) Set user email
|
||
> - [mmctl user invite](#mmctl-user-invite) - Invite user
|
||
> - [mmctl user list](#mmctl-user-list) - List users
|
||
> - [mmctl user migrate-auth](#mmctl-user-migrate-auth) - Bulk migrate user accounts authentication type
|
||
> - [mmctl user preference](#mmctl-user-preference) - Manage user preferences
|
||
> - [mmctl user promote](#mmctl-user-promote) - Promote guests to users
|
||
> - [mmctl user reset-password](#mmctl-user-reset-password) - Reset user password
|
||
> - [mmctl user resetmfa](#mmctl-user-resetmfa) - Reset a user's MFA token
|
||
> - [mmctl user search](#mmctl-user-search) - Search for a user
|
||
> - [mmctl user username](#mmctl-user-username) - (Deprecated) Change username of the user
|
||
> - [mmctl user verify](#mmctl-user-verify) - Mark user's email as verified
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for user
|
||
```
|
||
|
||
### mmctl user activate
|
||
|
||
**Description**
|
||
|
||
Activate users that have been deactivated.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl user activate [emails, usernames, userIds] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl user activate [email protected]
|
||
mmctl user activate username
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for activate
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl user change-password
|
||
|
||
**Description**
|
||
|
||
Change 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**
|
||
|
||
``` sh
|
||
mmctl user change-password <user> [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
# If you have system permissions, you can change other user's passwords
|
||
$ mmctl user change-password john_doe --password new-password
|
||
|
||
# If you are changing your own password, you need to provide the current one
|
||
$ mmctl user change-password my-username --current current-password --password new-password
|
||
|
||
# You can ommit 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**
|
||
|
||
``` sh
|
||
-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**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl user convert
|
||
|
||
**Description**
|
||
|
||
Convert user accounts to bots, or convert bots to user accounts.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl user convert (--bot [emails] [usernames] [userIds] | --user <username> --password PASSWORD [--email EMAIL]) [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
# You can convert a user to a bot providing an email, an ID, or a username
|
||
$ mmctl user convert [email protected] --bot
|
||
|
||
# Or you can convert multiple users at a time
|
||
$ mmctl user convert [email protected] anotherUser --bot
|
||
|
||
# You can convert a bot to a user and specify the email and password that the user will have after conversion
|
||
$ mmctl user convert botusername --email [email protected] --password password --user
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
--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**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl user create
|
||
|
||
**Description**
|
||
|
||
Create a user.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl user create [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
# You can create a user
|
||
$ mmctl user create --email [email protected] --username userexample --password Password1
|
||
|
||
# You can define optional fields like first name, last name, and nickname
|
||
$ mmctl user create --email [email protected] --username userexample --password Password1 --firstname User --lastname Example --nickname userex
|
||
|
||
# You can also create the user as a system sdmin
|
||
$ mmctl user create --email [email protected] --username userexample --password Password1 --system-admin
|
||
|
||
# You can verify user on creation if you have the correct permissions
|
||
$ mmctl user create --email [email protected] --username userexample --password Password1 --system-admin --email-verified
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
--disable-welcome-email Optional. If supplied, the new user will not receive a welcome email. Defaults to false
|
||
--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
|
||
--guest Optional. If supplied, the new user will be a guest. Defaults to false
|
||
-h, --help help for create
|
||
--lastname string Optional. The last name for the new user account
|
||
--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**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl user deactivate
|
||
|
||
**Description**
|
||
|
||
Deactivate users. Deactivated users are immediately logged out of all sessions and are unable to log back in.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl user deactivate [emails, usernames, userIds] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl user deactivate [email protected]
|
||
mmctl user deactivate username
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for deactivate
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl user delete
|
||
|
||
**Description**
|
||
|
||
Permanently delete users along with all related information including posts from the database.
|
||
|
||
<Note>
|
||
|
||
Requires the [Enable API User Deletion](/administration-guide/configure/environment-configuration-settings#enable-api-user-deletion) configuration setting to be set to `true`. If this configuration setting is set to `false`, attempting to delete the user using mmctl fails.
|
||
|
||
</Note>
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl user delete [users] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl user delete [email protected]
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
--confirm Confirm you really want to delete the user and a database backup has been performed
|
||
-h, --help help for delete
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl user deleteall
|
||
|
||
**Description**
|
||
|
||
Permanently delete all users and all related information including posts. This command can only be run in [local mode](#local-mode).
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl user deleteall [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl user deleteall
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
--confirm Confirm you really want to delete the user and a database backup has been performed
|
||
-h, --help help for delete
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl user demote
|
||
|
||
**Description**
|
||
|
||
Demote a user to a guest.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl user demote [users] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl user demote user1 user2
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for demote
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl user edit
|
||
|
||
**Description**
|
||
|
||
Edit user properties including username, email, and authentication data. This command provides a structured way to modify user properties without direct database access.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl user edit [user] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl user edit testuser --help
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for edit
|
||
```
|
||
|
||
**Child Commands**
|
||
|
||
- [mmctl user edit authdata](#mmctl-user-edit-authdata) - Edit user authentication data
|
||
- [mmctl user edit email](/administration-guide/manage/mmctl-command-line-tool#mmctl-user-edit-email) - Edit user email address
|
||
- [mmctl user edit username](/administration-guide/manage/mmctl-command-line-tool#mmctl-user-edit-username) - Edit user username
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl user edit authdata
|
||
|
||
**Description**
|
||
|
||
Edit user authentication data. This command addresses the common customer pain point where SAML-authenticated users need to change their authentication information when SAML configuration uses email as the ID attribute, eliminating the need for direct database manipulation.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl user edit authdata [user] [authdata] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
# Update SAML authentication data for a user
|
||
mmctl user edit authdata john.doe [email protected]
|
||
|
||
# Clear authentication data for a user
|
||
mmctl user edit authdata john.doe ""
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for authdata
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl user edit email
|
||
|
||
**Description**
|
||
|
||
Edit user email address. This command is particularly useful for SAML-authenticated users who need to change their email addresses when the SAML configuration uses email as the ID attribute. This provides a safer alternative to direct database manipulation.
|
||
|
||
<Note>
|
||
|
||
From Mattermost v10.9, email addresses enclosed in angle brackets (e.g., `[[email protected]](mailto:[email protected])`) will be rejected. To avoid issues, ensure all user emails comply with the plain address format (e.g., `[email protected]`). In addition, we strongly recommend taking proactive steps to audit and update Mattermost user data to align with this product change, as impacted users may face issues accessing Mattermost or managing their user profile. You can update these user emails manually using this mmctl command: `mmctl user edit email "[[email protected]](mailto:[email protected])" [email protected]`.
|
||
|
||
</Note>
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl user edit email [user] [new email] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
# Change email for a SAML-authenticated user
|
||
mmctl user edit email john.doe [email protected]
|
||
|
||
# Update email for a user identified by current email
|
||
mmctl user edit email [email protected] [email protected]
|
||
```
|
||
|
||
<Note>
|
||
|
||
This command is especially important for SAML environments where email is used as the ID attribute. Previously, changing email addresses for SAML users required direct database manipulation, which posed security and operational risks.
|
||
|
||
</Note>
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for email
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl user edit username
|
||
|
||
**Description**
|
||
|
||
Edit user username. This command allows changing usernames in a structured and safe manner without direct database access.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl user edit username [user] [new username] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
# Change username for a user
|
||
mmctl user edit username john.doe john.smith
|
||
|
||
# Change username using email to identify user
|
||
mmctl user edit username [email protected] newusername
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for username
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl user email
|
||
|
||
This command is deprecated in favor of [mmctl user edit email](/administration-guide/manage/mmctl-command-line-tool#mmctl-user-edit-email).
|
||
|
||
**Description**
|
||
|
||
Change the email address associated with a user.
|
||
|
||
<Note>
|
||
|
||
From Mattermost v10.9, email addresses enclosed in angle brackets (e.g., `[[email protected]](mailto:[email protected])`) will be rejected. To avoid issues, ensure all user emails comply with the plain address format (e.g., `[email protected]`). In addition, we strongly recommend taking proactive steps to audit and update Mattermost user data to align with this product change, as impacted users may face issues accessing Mattermost or managing their user profile. You can update these user emails manually using this mmctl command: `mmctl user edit email "[[email protected]](mailto:[email protected])" [email protected]`.
|
||
|
||
</Note>
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl user email [user] [new email] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl user email testuser [email protected]
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for email
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### 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**
|
||
|
||
``` sh
|
||
mmctl user invite [email] [teams] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl user invite [email protected] myteam
|
||
mmctl user invite [email protected] myteam1 myteam2
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for invite
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl user list
|
||
|
||
**Description**
|
||
|
||
List all users.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl user list [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl user list
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
--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 (maximum 200)
|
||
--team string If supplied, only users belonging to this team will be listed
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### 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**
|
||
|
||
``` sh
|
||
mmctl user migrate-auth [from_auth] [to_auth] [migration-options] [flags]
|
||
```
|
||
|
||
**Arguments**
|
||
|
||
> **from_auth:**
|
||
> The authentication service to migrate users accounts from. Supported options: email, gitlab, google, ldap, office365, saml.
|
||
>
|
||
> **to_auth:**
|
||
> The authentication service to migrate users to. Supported options: ldap, saml.
|
||
>
|
||
> **migration-options (ldap):**
|
||
> match_field:
|
||
> The field that is guaranteed to be the same in both authentication services. For example, if the users emails are consistent set to email. Supported options: email, username.
|
||
>
|
||
> **migration-options (saml):**
|
||
> **users_file:**
|
||
> The path of a json file with the usernames and emails of all users to migrate to SAML. The username and email must be the same that the SAML service provider store. And the email must match with the email in mattermost database.
|
||
>
|
||
> ``` javascript
|
||
> Example json content:
|
||
> {
|
||
> "[email protected]": "usr.one",
|
||
> "[email protected]": "usr.two"
|
||
> }
|
||
> ```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl user migrate-auth email saml users.json
|
||
```
|
||
|
||
**user.json Example**
|
||
|
||
``` json
|
||
[
|
||
{
|
||
"email": "[email protected]",
|
||
"auth_data": {
|
||
"saml": {
|
||
"idp_id": "saml_idp_1",
|
||
"saml_user_id": "user123"
|
||
}
|
||
}
|
||
},
|
||
{
|
||
"email": "[email protected]",
|
||
"auth_data": {
|
||
"saml": {
|
||
"idp_id": "saml_idp_2",
|
||
"saml_user_id": "user456"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
--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**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
## mmctl user preference
|
||
|
||
**Description**
|
||
|
||
Manage user preferences.
|
||
|
||
> Child Commands
|
||
> - [mmctl user preference get](#mmctl-user-preference-get) - Get a specific user preference
|
||
> - [mmctl user preference list](#mmctl-user-preference-list) - List user preferences
|
||
> - [mmctl user preference set](#mmctl-user-preference-set) - Set a specific user preference
|
||
> - [mmctl user preference delete](#mmctl-user-preference-delete) - Delete a specific user preference
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for auth
|
||
```
|
||
|
||
### mmctl user preference get
|
||
|
||
**Description**
|
||
|
||
Get a specific user preference.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl user preference get --category [category] --name [name] [users] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
preference get --category display_settings --name use_military_time [email protected]
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-c, --category string The category of the preference
|
||
-h, --help help for get
|
||
-n, --name string The name of the preference
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl user preference list
|
||
|
||
**Description**
|
||
|
||
List user preferences.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl user preference list [--category category] [users] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
preference list [email protected]
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-c, --category string The optional category by which to filter
|
||
-h, --help help for list
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl user preference set
|
||
|
||
**Description**
|
||
|
||
Set a specific user preference.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl user preference set --category [category] --name [name] --value [value] [users] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
preference set --category display_settings --name use_military_time --value true [email protected]
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-c, --category string The category of the preference
|
||
-h, --help help for set
|
||
-n, --name string The name of the preference
|
||
-v, --value string The value of the preference
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl user preference delete
|
||
|
||
**Description**
|
||
|
||
Delete a specific user preference.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl user preference delete --category [category] --name [name] [users] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
preference delete --category display_settings --name use_military_time [email protected]
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-c, --category string The category of the preference
|
||
-h, --help help for delete
|
||
-n, --name string The name of the preference
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl user promote
|
||
|
||
**Description**
|
||
|
||
Promote a guest to a user.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl user promote [guests] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl user promote guest1 guest2
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for promote
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl user reset-password
|
||
|
||
**Description**
|
||
|
||
Send users an email to reset their password.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl user reset-password [users] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl user reset-password [email protected]
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for reset-password
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### 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**
|
||
|
||
``` sh
|
||
mmctl user resetmfa [users] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl user resetmfa [email protected]
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for resetmfa
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl user search
|
||
|
||
**Description**
|
||
|
||
Search for users based on username, email, or user ID. The command returns user information including usernames, email addresses, first and last names, and account status. From Mattermost v10.10, output includes the user's deactivation status to help system admins identify inactive accounts. From Mattermost v10.11, output includes the user's AuthData field to help system admins verify authentication sources such as LDAP or SAML.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl user search [users] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl user search [email protected] [email protected]
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for search
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl user username
|
||
|
||
This command is deprecated in favor of [mmctl user edit username](/administration-guide/manage/mmctl-command-line-tool#mmctl-user-edit-username) instead.
|
||
|
||
**Description**
|
||
|
||
Change the username of the user.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl user username [user] [new username] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl user username testuser newusername
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for version
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl user verify
|
||
|
||
**Description**
|
||
|
||
Mark user's email as verified without requiring user to complete email verification path.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl user verify [users] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl user verify user1
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for version
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
## mmctl version
|
||
|
||
**Description**
|
||
|
||
Print the version of mmctl.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl version [flags]
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for version
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
## mmctl webhook
|
||
|
||
**Description**
|
||
|
||
Manage webhooks.
|
||
|
||
> Child Commands
|
||
> - [mmctl webhook create-incoming](#mmctl-webhook-create-incoming) - Create an incoming webhook
|
||
> - [mmctl webhook create-outgoing](#mmctl-webhook-create-outgoing) - Create an outgoing webhook
|
||
> - [mmctl webhook delete](#mmctl-webhook-delete) - Delete webhooks
|
||
> - [mmctl webhook list](#mmctl-webhook-list) - List webhooks
|
||
> - [mmctl webhook modify-incoming](#mmctl-webhook-modify-incoming) - Modify an incoming webhook
|
||
> - [mmctl webhook modify-outgoing](#mmctl-webhook-modify-outgoing) - Modify an outgoing webhook
|
||
> - [mmctl webhook show](#mmctl-webhook-show) - Show a webhook
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for webhook
|
||
```
|
||
|
||
### mmctl webhook create-incoming
|
||
|
||
**Description**
|
||
|
||
Create an incoming webhook to allow external posting of messages to a specific channel.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl webhook create-incoming [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl webhook create-incoming --channel [channelID] --user [userID] --display-name [displayName] --description [webhookDescription] --lock-to-channel --icon [iconURL]
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
--channel string Channel ID (required)
|
||
--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
|
||
--user string User ID (required)
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl webhook create-outgoing
|
||
|
||
**Description**
|
||
|
||
Create an outgoing webhook to allow external posting of messages from a specific channel.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl webhook create-outgoing [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl webhook create-outgoing --team myteam --user myusername --display-name mywebhook --trigger-word "build" --trigger-word "test" --url http://localhost:8000/my-webhook-handler
|
||
mmctl 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**
|
||
|
||
``` sh
|
||
--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
|
||
--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**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl webhook delete
|
||
|
||
**Description**
|
||
|
||
Delete a webhook with a given ID.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl webhook delete [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl webhook delete [webhookID]
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for delete
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl webhook list
|
||
|
||
**Description**
|
||
|
||
Print a list of all webhooks.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl webhook list [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl webhook list myteam
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for list
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl webhook modify-incoming
|
||
|
||
**Description**
|
||
|
||
Modify an existing incoming webhook by changing its title, description, channel, or icon URL.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl webhook modify-incoming [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl webhook modify-incoming [webhookID] --channel [channelID] --display-name [displayName] --description [webhookDescription] --lock-to-channel --icon [iconURL]
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
--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**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl webhook modify-outgoing
|
||
|
||
**Description**
|
||
|
||
Modify an existing outgoing webhook by changing its title, description, channel, icon, url, content-type, or triggers.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl webhook modify-outgoing [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl 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**
|
||
|
||
``` sh
|
||
--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**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
### mmctl webhook show
|
||
|
||
**Description**
|
||
|
||
Show the webhook specified by `[webhookId]`.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl webhook show [webhookId] [flags]
|
||
```
|
||
|
||
**Examples**
|
||
|
||
``` sh
|
||
mmctl webhook show w16zb5tu3n1zkqo18goqry1je
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for show
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|
||
|
||
## mmctl websocket
|
||
|
||
**Description**
|
||
|
||
Display websocket in a human-readable format.
|
||
|
||
**Format**
|
||
|
||
``` sh
|
||
mmctl websocket [flags]
|
||
```
|
||
|
||
**Options**
|
||
|
||
``` sh
|
||
-h, --help help for websocket
|
||
```
|
||
|
||
**Options inherited from parent commands**
|
||
|
||
``` sh
|
||
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
|
||
--disable-pager disables paged output
|
||
--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
|
||
--json the output format will be in json format
|
||
--local allows communicating with the server through a unix socket
|
||
--quiet prevent mmctl to generate output for the commands
|
||
--strict will only run commands if the mmctl version matches the server one
|
||
--suppress-warnings disables printing warning messages
|
||
```
|