Linux command
matrix-commander 命令
趣味
复制后可按需替换文件名、目录或参数。
常用示例
Login and create session
matrix-commander --login password
Send text message
matrix-commander -m "[message]" -r "[!roomid:server]"
Send file
matrix-commander -f [file.pdf] -r "[!roomid:server]"
Send image
matrix-commander -i [image.jpg] -r "[!roomid:server]"
Listen for messages
matrix-commander --listen once
List rooms
matrix-commander --rooms
说明
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.
参数
- --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.
FAQ
What is the matrix-commander command used for?
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.
How do I run a basic matrix-commander example?
Run `matrix-commander --login password` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --login _method_ do in matrix-commander?
Login (password, sso).