mattermost-tui
mattermost-tui (mm) is a keyboard-driven terminal client for Mattermost. Several servers and teams side by side, live messages, unread and mentions, a channel finder, your own editor for writing, and your own programs for opening links and attachments.

Installation
Nix
Or add github:paulchambaz/mattermost-tui as an input of your flake and install its packages.default. The man page is installed with it.
Cargo
This installs the mm command.
Manual
See the Building section.
Usage
Start mm, then type :new-server. It asks for a name, the address of the server, your login and your password (and a code if your account uses two-factor authentication), and logs you in. Add as many servers as you like.
The channels of the current team are tabs along the top, the conversation is below, and the bottom line shows where you are. Keys are single letters:
| Key | Action |
|---|---|
j k |
next / previous message |
J K |
next / previous channel |
H L |
previous / next team, across servers |
f |
find a channel by typing part of its name |
n N |
next unread message / next mention |
i |
write a message, enter sends |
ctrl-g |
write it in your editor instead |
r e d |
reply to, edit, delete the selected message |
x |
react to the selected message |
o |
open the links and attachments of the selected message |
y |
copy the selected message |
? |
the full list of keys |
q |
quit |
Press : for commands such as :server, :go, :dm or :status. Everything is detailed in the man page (man mm once installed).
Your servers are kept in ~/.config/mm/servers.toml, readable only by you, password included so the session can be renewed. If you would rather not keep a password in a file, servers.toml can instead name a command that prints it, such as password_cmd = "pass show work/chat". See the man page.
Configuration
Everything is optional. Settings go in ~/.config/mm/config.toml:
= "nvim"
= "xclip -selection clipboard"
[]
= "nsxiv"
= "mpv"
= "firefox"
= "nvim -R"
= "xdg-open"
editoris the programctrl-gstarts. Without it$EDITORis used, thenvi.copyis the command that receives the text copied withy. Without itmmuseswl-copy,xcliporxselif one is installed.[open]says which programostarts:browserfor links,image,videofor video and audio,textfor text and source files,otherfor the rest. Each defaults toxdg-open.textruns insidemm, so it should be a terminal program.
Set NO_COLOR to use mm without colors.
Building
Nix
Manual
You need cargo, scdoc for the man page and just for the dev commands.
Contribution
Contributions are welcome: feature suggestions, bug reports or code, through issues and pull requests on GitHub.
License
mattermost-tui is free software. You can use, study, modify and distribute it under the terms of the GNU General Public License, version 3.