All Projects → mattermost → Mmctl

mattermost / Mmctl

Licence: apache-2.0
A remote CLI tool for Mattermost

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Mmctl

Desktop
Mattermost Desktop application for Windows, Mac and Linux
Stars: ✭ 1,358 (+1840%)
Mutual labels:  mattermost, hacktoberfest
Docs
Mattermost documentation
Stars: ✭ 128 (+82.86%)
Mutual labels:  mattermost, hacktoberfest
Mattermost Mobile
Next generation iOS and Android apps for Mattermost in React Native
Stars: ✭ 1,262 (+1702.86%)
Mutual labels:  mattermost, hacktoberfest
Standup Raven
A Mattermost plugin for communicating daily standups across teams
Stars: ✭ 161 (+130%)
Mutual labels:  mattermost, hacktoberfest
Prism
Gett's Design System code generator. Use Zeplin Styleguides as your R&D's Single Source of Truth.
Stars: ✭ 308 (+340%)
Mutual labels:  tooling, hacktoberfest
Mattermost Docker
Dockerfile for mattermost in production
Stars: ✭ 929 (+1227.14%)
Mutual labels:  mattermost, hacktoberfest
Mattermost Helm
Mattermost Helm charts for Kubernetes
Stars: ✭ 107 (+52.86%)
Mutual labels:  mattermost, hacktoberfest
Matterpoll
Create polls and surveys directly within Mattermost
Stars: ✭ 189 (+170%)
Mutual labels:  mattermost, hacktoberfest
Mattermost Redux
Redux for Mattermost
Stars: ✭ 198 (+182.86%)
Mutual labels:  mattermost, hacktoberfest
Mattermost Server
Mattermost is an open source platform for secure collaboration across the entire software development lifecycle.
Stars: ✭ 21,623 (+30790%)
Mutual labels:  mattermost, hacktoberfest
Mattermost Plugin Jira
JIRA plugin for Mattermost 🔌
Stars: ✭ 58 (-17.14%)
Mutual labels:  mattermost, hacktoberfest
Attachment
Tools to deal with dependencies in scripts, Rmd and packages
Stars: ✭ 69 (-1.43%)
Mutual labels:  hacktoberfest
Sceptre
Build better AWS infrastructure
Stars: ✭ 1,160 (+1557.14%)
Mutual labels:  hacktoberfest
Mahapps.metro.iconpacks
Awesome icon packs for WPF and UWP in one library
Stars: ✭ 1,157 (+1552.86%)
Mutual labels:  hacktoberfest
Parse Sdk Js
The JavaScript SDK for the Parse Platform
Stars: ✭ 1,158 (+1554.29%)
Mutual labels:  hacktoberfest
Modtweaker
ModTweaker is an addon for CraftTweaker, which provides Integration for an amount of mods.
Stars: ✭ 69 (-1.43%)
Mutual labels:  hacktoberfest
Fury
FURY - Free Unified Rendering in pYthon.
Stars: ✭ 68 (-2.86%)
Mutual labels:  hacktoberfest
Anime Downloader
A simple but powerful anime downloader and streamer.
Stars: ✭ 1,155 (+1550%)
Mutual labels:  hacktoberfest
Wise Old Man
The Open Source Old School Runescape progress tracker.
Stars: ✭ 68 (-2.86%)
Mutual labels:  hacktoberfest
Express Jsdoc Swagger
Swagger OpenAPI 3.x generator
Stars: ✭ 69 (-1.43%)
Mutual labels:  hacktoberfest

mmctl

CircleCI branch Code Coverage Go Report Card

A remote CLI tool for Mattermost: the Open Source, self-hosted Slack-alternative.

Install

To install the project in your $GOPATH, simply run:

go get -u github.com/mattermost/mmctl

Install shell completions

To install the shell completions for bash, add the following line to your ~/.bashrc or ~/.profile file:

source <(mmctl completion bash)

For zsh, add the following line to file ~/.zshrc:

source <(mmctl completion zsh)

Compile

First we have to install the dependencies of the project. mmctl depends on go version 1.13.3 or greater.

We can compile the binary with:

make build

Running the tests

mmctl has two types of tests: unit tests and end to end tests.

Unit tests

To run the unit tests, you just need to execute:

make test

End to end tests

To run the end to end test suite, you need to have the Mattermost server project downloaded and configured in your system. Check the Developer Setup guide on how to configure a local server instance. The tests will search for a mattermost-server folder in the same directory where the mmctl is, but this can be changed through configuration if you have the project in a different path. Take a look at the config.mk file in this repository for instructions on how to make this change.

With the mattermost-server folder present, the only thing that needs to be done before running the tests themselves is to start the Mattermost docker development environment. The environment only needs to be started once, and then the tests can run as many times as needed. To start the docker environment, change to the mattermost-server project directory and run:

make start-docker

Change your directory back to mmctl and run the end to end test suite with:

make test-e2e

Usage

For the usage of all the commands, use the --help flag or check the tool's documentation.

Mattermost offers workplace messaging across web, PC and phones with archiving, search and integration with your existing systems. Documentation available at https://docs.mattermost.com

Usage:
  mmctl [command]

Available Commands:
  auth        Manages the credentials of the remote Mattermost instances
  channel     Management of channels
  completion  Generates autocompletion scripts for bash and zsh
  group       Management of groups
  help        Help about any command
  license     Licensing commands
  logs        Display logs in a human-readable format
  permissions Management of permissions and roles
  plugin      Management of plugins
  post        Management of posts
  team        Management of teams
  user        Management of users
  websocket   Display websocket in a human-readable format

Flags:
  -h, --help   help for mmctl

Use "mmctl [command] --help" for more information about a command.

First we have to log into a mattermost instance:

$ mmctl auth login https://my-instance.example.com --name my-instance --username john.doe --password mysupersecret

  credentials for my-instance: [email protected]://my-instance.example.com stored

We can check the currently stored credentials with:

$ mmctl auth list

    | Active |        Name | Username |                     InstanceUrl |
    |--------|-------------|----------|---------------------------------|
    |      * | my-instance | john.doe | https://my-instance.example.com |

And now we can run commands normally:

$ mmctl user search john.doe
id: qykfw3t933y38k57ubct77iu9c
username: john.doe
nickname:
position:
first_name: John
last_name: Doe
email: [email protected]
auth_service:

NOTE: mmctl is designed to run against a specific version of the mattermost-server and its API. If run against a server with a different version, mmctl will show a warning and will try to execute the commands. To ensure that the commands won't run if the server version is not supported, please use the --strict flag or set the MMCTL_STRICT=true environment variable.

Login methods

Password

$ mmctl auth login https://community.mattermost.com --name community --username my-username --password mysupersecret

The login command can also work interactively, so if you leave any needed flag empty, mmctl will ask you for it interactively:

$ mmctl auth login https://community.mattermost.com
Connection name: community
Username: my-username
Password:

MFA

If you want to login with MFA, you just need to use the --mfa-token flag:

$ mmctl auth login https://community.mattermost.com --name community --username my-username --password mysupersecret --mfa-token 123456

Access tokens

Instead of using username and password to log in, you can generate and use a personal access token to authenticate with a server:

$ mmctl auth login https://community.mattermost.com --name community --access-token MY_ACCESS_TOKEN
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].