NAME
matrixtool client - Commandline client utilities for a Matrix homeserver
SYNOPSIS
$ matrixtool client login @username:example.com
DESCRIPTION
This command provides a commandline interface to various client APIs on a Matrix homeserver. It has various sub-commands that provide particular functionality, along with some common options between them.
These sub-commands offers a convenience over using simpler tools like curl directly because they will automatically fill in details like access tokens and server hostnames, when given a user-id
argument. This works by storing a cache of access tokens in the user's home directory, under .matrix/client-tokens.
By using the matrixtool client login
command you can add an access token for your user account into this cache:
$ matrixtool client login @me:example.com
Password:
[OK] Obtained access token
Having logged in, you can now use the -u
option to other matrixtool client
subcommands, causing it to automatically supply this access token on every request:
$ matrixtool client -u @me:example.com json /_matrix/client/r0/publicRooms
...
OPTIONS
The following additional options are recognised
--user-id
,-u
-
User ID to supply the
access_token
of. --server
,-s
-
Server to connect to. Usually optional, as it is implied by the
user-id
if provided.
COMMANDS
The following sub-commands are recognised
json
Perform a direct JSON request
$ matrixtool client json PATH [DATA]
See also App::MatrixTool::Command::client::json.
login
Obtain a client authentication token
$ matrixtool client login USER-ID
See also App::MatrixTool::Command::client::login.
upload
Upload a file to the media repository
$ matrixtool client upload FILE [TYPE]
See also App::MatrixTool::Command::client::upload.
AUTHOR
Paul Evans <leonerd@leonerd.org.uk>