8000 GitHub - ziyan/mm: Mattermost CLI · GitHub
[go: up one dir, main page]

Skip to content
ziyanPublic

About

Mattermost CLI

Resources

Contributing

Security policy

Stars

5 stars

Watchers

0 watching

Forks

Repository files navigation

mm

A full-featured command-line client for Mattermost.

mm lets you interact with your Mattermost server entirely from the terminal: send messages, manage channels, stream real-time notifications, upload files, schedule posts, and much more.

Features

  • Multi-server profiles with token and password authentication, including a per-profile read-only mode that blocks all mutations
  • Real-time notifications via WebSocket with event and channel filtering
  • Full post lifecycle: create, edit, delete, pin, react, search, threads, reminders
  • Channel management: join, leave, create, archive, read, favorite, notify settings
  • Direct messages and group chats
  • Thread operations: list, follow/unfollow, mark read/unread
  • File upload/download/search
  • Drafts and scheduled posts with flexible time parsing
  • Channel bookmarks, saved/flagged posts, preferences
  • User operations: status, avatar, typing indicator, autocomplete
  • Session and access token management
  • Custom emoji, webhooks, bots, groups, slash commands, plugins
  • Local archive of every channel you can read, synced incrementally and searchable offline
  • JSON output (--json) for scripting and piping
  • Shell completion for bash, zsh, fish, and PowerShell
  • Static binary with zero CGO dependencies

Installation

From source

git clone https://github.com/ziyan/mm.git
cd mm
make build

This produces a statically linked binary ./mm. Copy it to your $PATH:

sudo cp mm /usr/local/bin/

Requirements

  • Go 1.25+

Quick start

Login

# Login with a personal access token (recommended)
mm auth login --url https://mattermost.example.com --token YOUR_TOKEN

# Login with username and password
mm auth login --url https://mattermost.example.com --user alice --password secret

Set your active team

mm team list
mm team switch my-team

Send a message

mm post create town-square "Hello from the CLI!"

Read messages

mm post list town-square
mm post list town-square -n 50  # last 50 messages

Stream real-time notifications

mm notify                          # all events
mm notify --event posted           # only new messages
mm notify --channel town-square    # only one channel
mm notify --json                   # JSON output for scripting

Usage