{
  "id": "mmctl",
  "name": "mmctl",
  "homepage": "https://docs.mattermost.com/administration-guide/manage/mmctl-command-line-tool",
  "description": "The Mattermost command-line administration tool",
  "executables": [
    "mmctl"
  ],
  "dotfiles": {
    "paths": [
      "[configHome]/mmctl/config"
    ],
    "secret": [],
    "secret_paths": [
      {
        "file": "[configHome]/mmctl/config",
        "format": "json",
        "match": {
          "key_path": [
            "credentials.*.auth_token",
            "credentials.*.password",
            "credentials.*.mfa_token"
          ]
        }
      }
    ]
  },
  "commands": {
    "format": 1,
    "label": "mmctl",
    "description": "Common Mattermost administration jobs: list users and create a channel. Authentication, TLS and other subcommands are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": false,
      "short_bundles": false
    },
    "subcommand": [
      {
        "path": [
          "user",
          "list"
        ],
        "label": "List users",
        "source": [
          {
            "id": "doc",
            "kind": "manual",
            "url": "https://raw.githubusercontent.com/mattermost/mmctl/master/docs/mmctl_user_list.rst",
            "revision": "master 2026-10-27",
            "evidence": "      --all            Fetch all users. --page flag will be ignore if provided\n      --page int       Page number to fetch for the list of users\n      --per-page int   Number of users to be fetched (default 200)\n      --team string    If supplied, only users belonging to this team will be listed\n      --json                         the output format will be in json format\n"
          }
        ],
        "field": [
          {
            "id": "all",
            "label": "All users",
            "type": "boolean",
            "option": [
              "--all"
            ],
            "sources": [
              "doc"
            ]
          },
          {
            "id": "team",
            "label": "Team",
            "type": "string",
            "option": [
              "--team"
            ],
            "sources": [
              "doc"
            ]
          },
          {
            "id": "page",
            "label": "Page",
            "type": "integer",
            "option": [
              "--page"
            ],
            "sources": [
              "doc"
            ]
          },
          {
            "id": "per_page",
            "label": "Users per page",
            "type": "integer",
            "option": [
              "--per-page"
            ],
            "sources": [
              "doc"
            ]
          },
          {
            "id": "json",
            "label": "JSON output",
            "type": "boolean",
            "option": [
              "--json"
            ],
            "sources": [
              "doc"
            ]
          }
        ],
        "task": [
          {
            "id": "list",
            "label": "List all users",
            "fields": [
              "all",
              "team",
              "json"
            ],
            "set": {
              "all": [
                true
              ]
            }
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "all",
              "team",
              "page",
              "per_page",
              "json"
            ]
          }
        ]
      },
      {
        "path": [
          "channel",
          "create"
        ],
        "label": "Create a channel",
        "source": [
          {
            "id": "doc",
            "kind": "manual",
            "url": "https://raw.githubusercontent.com/mattermost/mmctl/master/docs/mmctl_channel_create.rst",
            "revision": "master 2026-10-27",
            "evidence": "      --display-name string   Channel Display Name\n      --header string         Channel header\n      --name string           Channel Name\n      --private               Create a private channel.\n      --purpose string        Channel purpose\n      --team string           Team name or ID\n"
          }
        ],
        "field": [
          {
            "id": "team",
            "label": "Team name or ID",
            "type": "string",
            "option": [
              "--team"
            ],
            "sources": [
              "doc"
            ]
          },
          {
            "id": "name",
            "label": "Channel name",
            "type": "string",
            "option": [
              "--name"
            ],
            "sources": [
              "doc"
            ]
          },
          {
            "id": "display_name",
            "label": "Display name",
            "type": "string",
            "option": [
              "--display-name"
            ],
            "sources": [
              "doc"
            ]
          },
          {
            "id": "private",
            "label": "Private channel",
            "type": "boolean",
            "option": [
              "--private"
            ],
            "sources": [
              "doc"
            ]
          },
          {
            "id": "purpose",
            "label": "Purpose",
            "type": "string",
            "option": [
              "--purpose"
            ],
            "sources": [
              "doc"
            ]
          },
          {
            "id": "header",
            "label": "Header",
            "type": "string",
            "option": [
              "--header"
            ],
            "sources": [
              "doc"
            ]
          }
        ],
        "task": [
          {
            "id": "create",
            "label": "Create channel",
            "fields": [
              "team",
              "name",
              "display_name",
              "private"
            ],
            "required": [
              "team",
              "name",
              "display_name"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "team",
              "name",
              "display_name",
              "private",
              "purpose",
              "header"
            ]
          }
        ]
      }
    ]
  }
}
