https://github.com/berkaygediz/localmoderationmatrix
A CLI tool for bulk message deletion, media cleanup, and sticker purge in Matrix rooms.
https://github.com/berkaygediz/localmoderationmatrix
bulk-delete cinny cli e2ee element matrix matrix-nio matrix-org matrix-room matrix-rooms moderation neochat nheko open-source schildichat
Last synced: about 12 hours ago
JSON representation
A CLI tool for bulk message deletion, media cleanup, and sticker purge in Matrix rooms.
- Host: GitHub
- URL: https://github.com/berkaygediz/localmoderationmatrix
- Owner: berkaygediz
- License: apache-2.0
- Created: 2026-03-11T02:03:02.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2026-06-14T02:46:01.000Z (3 days ago)
- Last Synced: 2026-06-14T04:14:15.365Z (3 days ago)
- Topics: bulk-delete, cinny, cli, e2ee, element, matrix, matrix-nio, matrix-org, matrix-room, matrix-rooms, moderation, neochat, nheko, open-source, schildichat
- Language: Python
- Homepage: https://pypi.org/project/localmoderationmatrix/
- Size: 28.3 KB
- Stars: 5
- Watchers: 0
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LocalModeration for Matrix
A CLI tool for bulk message deletion, media cleanup, and sticker purge in Matrix rooms.
> **Note:** This tool targets **public (unencrypted) rooms**. Encrypted messages are skipped automatically.
## Installation
**View on PyPI:** [pypi.org/project/localmoderationmatrix](https://pypi.org/project/localmoderationmatrix/)
**Using pip:**
```bash
pip install localmoderationmatrix
```
**Using uv:**
```bash
uv tool install localmoderationmatrix
```
**Standalone Executable:** [GitHub Releases](https://github.com/berkaygediz/LocalModerationMatrix/releases)
## Session
Once logged in, your session is saved in your home directory. Just enter your **User ID** on the next run to auto-login.
## Usage
```bash
localmoderationmatrix [options]
```
### Parameters
| Parameter | Description |
| --- | --- |
| `room_id` | (Required) The Matrix room ID. |
| `--search` | Search for a single keyword. |
| `--file` | Search using a wordlist file (one word per line). |
| `--purge-media` | Delete media older than X days (`0` for all). |
| `--purge-sticker` | Delete stickers older than X days (`0` for all). |
| `--log-room` | Room ID to send moderation logs. |
| `--days` | Time filter: Days (Default: 0). |
| `--hours` | Time filter: Hours (Default: 1). |
| `--minutes` | Time filter: Minutes (Default: 0). |
| `--homeserver` | Custom homeserver URL. |
### Interactive Keys
* `y` : Delete.
* `n` : Skip.
* `a` : **Delete All** remaining items automatically.
* `q` : Quit.
## Examples
**Search for a keyword:**
```bash
localmoderationmatrix "!roomID:matrix.org" --search "spam"
```
**Scan with a wordlist and log actions:**
```bash
localmoderationmatrix "!roomID:matrix.org" --file words.txt --days 7 --log-room "!LogRoomID:matrix.org"
```
**Delete media older than 90 days:**
```bash
localmoderationmatrix "!roomID:matrix.org" --purge-media 90
```
**Delete ALL stickers:**
```bash
localmoderationmatrix "!roomID:matrix.org" --purge-sticker 0
```
**Custom time filter:**
```bash
localmoderationmatrix "!roomID:matrix.org" --search "test" --days 3 --hours 12
```
## Building from Source
**PyPI Package:**
```bash
uv build
```
**Standalone Executable:**
```bash
pyinstaller --onefile --name LocalModerationMatrix --clean --noconfirm --optimize 2 src/localmoderationmatrix/cli.py
```
## License
Apache-2.0