LinuxCommandLibrary

matrix-commander

TLDR

Login and create session

$ matrix-commander --login password
copy
Send text message
$ matrix-commander -m "[message]" -r "[!roomid:server]"
copy
Send file
$ matrix-commander -f [file.pdf] -r "[!roomid:server]"
copy
Send image
$ matrix-commander -i [image.jpg] -r "[!roomid:server]"
copy
Listen for messages
$ matrix-commander --listen once
copy
List rooms
$ matrix-commander --rooms
copy

SYNOPSIS

matrix-commander [options]

DESCRIPTION

matrix-commander is a CLI client for the Matrix communication protocol. It enables sending messages, files, and images from scripts and automation, and can listen for incoming messages.
Ideal for bots, notifications, and scripted Matrix interactions.

PARAMETERS

--login method

Login (password, sso).
-m, --message text
Send text message.
-r, --room id
Target room ID.
-f, --file file
Send file.
-i, --image file
Send image.
--listen mode
Listen for messages.
--rooms
List joined rooms.
--verify
Verify devices.
--logout
End session.

CONFIGURATION

$ ~/.config/matrix-commander/
├── credentials.json
└── store/
copy

CAVEATS

Requires Python 3. Session must be created first. Encryption requires verification. Room IDs needed for messaging.

HISTORY

matrix-commander was created to provide a simple command-line interface for Matrix, enabling shell scripting and automation with the Matrix protocol.

SEE ALSO

element(1), gomuks(1), weechat(1)

Copied to clipboard