Manage the Dendrite API from your command line!
Project description
Dendritecli
A friendly command line interface for managing Dendrite admin APIs.
Features
Dendritecli has full support for all the admin endpoints, including:
- Registering users (the same as the create-account command)
- Evacuating both rooms and users
- Puring rooms
- Refreshing devices
- Reindexing events
whois
with the addition of some patches and workarounds for missing things, such as:
- Listing registered accounts
- Listing rooms
- Deactivating accounts
Installing
You will need python 3.10 or later. You will also need pipx (pip install pipx && python3 -m pipx ensurepath)
You can then install dendritecli with the following command:
#pipx install git+https://github.com/nexy7574/dendritecli.git
# We're on PyPi now:
pipx install dendritecli
# Or, if you want to be able to use it as a library:
pip install dendritecli
Usage
As a command line tool
pipx creates two commands (in $HOME/.local/bin on Linux): dendritecli and dendrite-cli.
They are identical, so you can use either one.
You can get help with dendritecli --help or dendritecli <command> --help.
The Configuration File section describes how to configure dendritecli.
Configuration File
You can configure dendritecli with a configuration file. The default location is $HOME/.config/dendritecli.toml,
or if $HOME/.config does not exist, $HOME/.dendritecli.toml.
The configuration file supports the following options:
access_token = "<the access token from your homeserver>"
server = "<the URL of your homeserver>" # e.g: matrix-client.matrix.org, not matrix.org
database_uri = "<the URI of your database>"
# e.g: sqlite:///dendritecli.db
# e.g: postgres://username:password@hostname:port/database?option=value
# Both SQLite and PostgreSQL are supported.
override-password-length-check = false
# Due to a bug in Dendrite (https://github.com/matrix-org/dendrite/issues/3012), passwords cannot be over 72 bytes
# in length (usually). If you want to override this check, set this to true.
# You shouldn't do this unless you know your homeserver
timeout = 120.0
# the timeout for requests, in seconds. Includes connect, read, and write timeouts.
# By default, the library has a 10 second connect timeout, 3 minute read timeout (for long responses),
# and a 1 minute write timeout. This has been specially tuned for Dendrite servers.
# If you're having issues with timeouts (due to a slow homeserver), feel free to bump this to a higher value,
# like 600 (10 minutes).
[proxies]
# By default, if these arent specified, the library will use the system proxy settings.
http = "http://my.http.proxy:13"
https = "https://my.https.proxy:13"
socks5 = "socks5://my.socks5.proxy:13"
[headers]
# headers to send with every request
# You should not overwrite Accept, or Content-Type, as they are required for the API to work.
# You also cannot overwrite User-Agent.
X-My-Header = "my header value"
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dendritecli-1.2.0.post1.tar.gz.
File metadata
- Download URL: dendritecli-1.2.0.post1.tar.gz
- Upload date:
- Size: 59.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e0d99507288a404201c0677f3cc7b21d444baddac8aa7f9f37e510521fad7ac
|
|
| MD5 |
205de9ca280f376912fa35fa9693a1da
|
|
| BLAKE2b-256 |
21bba7e09992c95083b24c7870e325a97062b66fc7bf4b553f7d23babf4906b7
|
File details
Details for the file dendritecli-1.2.0.post1-py3-none-any.whl.
File metadata
- Download URL: dendritecli-1.2.0.post1-py3-none-any.whl
- Upload date:
- Size: 41.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
546ef7c4f622bda693e8107b20c65e9e0dba43bfc4dd6c8357b73bc47c8563b0
|
|
| MD5 |
323635b0af09f543f815494f15608bbf
|
|
| BLAKE2b-256 |
b0dee1c7eeaa887dcae55a84ed15cbca24ada0014d6680c115d33e773fd3d11a
|