go-matrixcli

module
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 1, 2020 License: Apache-2.0

README

matrixcli

Send and receive messages from a matrix server.

  • Send messages
  • Multiple account/server support
  • Tail messages
  • Filter incoming messages
  • Join/leave rooms

Setup

Simply log into a homeserver.

$ matrixcli accounts login https://chat.mydomain.com

Commands that deal with a server need an account to work with. By default the program will select the "current" account to work with. You can set the current account by looking below. If you wish to use a different account without changing the current accout, pass in the --account <name> flag. The name refers to the account name seen in the account list.

List Accounts

$ matrixcli accounts list

+------------------+---------------------------+-------------------------------------+---------+
| NAME             | HOMESERVER                | USERID                              | CURRENT |
+------------------+---------------------------+-------------------------------------+---------+
| my-account       | https://chat.mydomain.com | @my-account:chat.mydomain.com       |         |
| my-other-account | https://chat.mydomain.com | @my-other-account:chat.mydomain.com | *       |
+------------------+---------------------------+-------------------------------------+---------+

Set Current Account

$ matrixcli account select my-account

Remove Account

$ matrixcli accounts remove my-account

Send Messages

Simple message

$ matrixcli send '!someid:chat.mydomain.com' 'my message'

Piped from stdin

$ mycmd | matrixcli send '!someid:chat.mydomain.com'

Message with title

$ cmd-with-long-output | matrixcli send '!someid:chat.mydomain.com' --title 'Backup Stuff'

Rich Text

Channel aliases are supported

$ matrixcli send '#mychannel:chat.mydomain.com' 'my msg'

Full channel ids are optional

$ matrixcli send '#mychannel' 'my msg'

$ matrixcli send '!someid' 'my msg'

This pulls the domain from the homeserver configured with the account used.

Alternate account

$ matrixcli send --account my-account '#mychannel:chat.mydomain.com' 'hello there'

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL