matty


Namematty JSON
Version 0.9.0 PyPI version JSON
download
home_pageNone
SummaryA Terminal UI for Matrix chat - simple and AI-friendly
upload_time2025-08-24 19:52:06
maintainerNone
docs_urlNone
authorNone
requires_python>=3.12
licenseMIT
keywords ai-friendly chat cli client matrix
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center">
  <img src="logo.svg" alt="Matrix TUI Logo" width="200" height="200">

  # Matty - Matrix CLI Client

  A simple, functional Matrix chat client built with Python, Typer, Pydantic, Nio, and Rich. Every interaction is a single CLI command for easy automation.
</div>

[![PyPI](https://img.shields.io/pypi/v/matty.svg)](https://pypi.python.org/pypi/matty)
[![Build Status](https://github.com/basnijholt/matty/actions/workflows/pytest.yml/badge.svg)](https://github.com/basnijholt/matty/actions/workflows/pytest.yml)
[![CodeCov](https://codecov.io/gh/basnijholt/matty/branch/main/graph/badge.svg)](https://codecov.io/gh/basnijholt/matty)
[![GitHub Repo stars](https://img.shields.io/github/stars/basnijholt/matty)](https://github.com/basnijholt/matty)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)

## Features

- Fast CLI commands for quick Matrix operations
- Thread support - view and navigate threaded conversations
- Reactions support - add and view emoji reactions on messages
- Message redaction - delete messages with optional reasons
- AI-friendly - every action is a single CLI command
- Functional programming style (minimal classes, maximum functions)
- Environment-based configuration
- Multiple output formats (rich, simple, JSON)
- Type-safe with dataclasses and type hints
- Persistent simple ID mapping for complex Matrix IDs

## Installation

```bash
uv tool install matty
# or
pipx install matty
# or
pip install matty
```

For development, clone the repo and install dependencies:

```bash
# Clone the repository
git clone https://github.com/basnijholt/matrix-cli
cd matrix-cli

# Install dependencies with uv
uv sync

# Optional: Install pre-commit hooks
uv run pre-commit install
```

## Configuration

Matty uses environment variables for configuration. Create a `.env` file in your working directory with your Matrix credentials:

```bash
MATRIX_HOMESERVER=https://matrix.org
MATRIX_USERNAME=your_username
MATRIX_PASSWORD=your_password
MATRIX_SSL_VERIFY=true  # Set to false for test servers
```

### Environment Variables

| Variable | Description | Default | Example |
|----------|-------------|---------|---------|
| `MATRIX_HOMESERVER` | The Matrix homeserver URL to connect to | `https://matrix.org` | `https://matrix.example.com` |
| `MATRIX_USERNAME` | Your Matrix username (without @ or :server) | None (required) | `alice` |
| `MATRIX_PASSWORD` | Your Matrix account password | None (required) | `secretpassword` |
| `MATRIX_SSL_VERIFY` | Whether to verify SSL certificates | `true` | `false` (for test servers) |

**Notes:**
- The username should be provided without the `@` prefix or `:server` suffix
- Set `MATRIX_SSL_VERIFY=false` when connecting to test servers with self-signed certificates
- Command-line options (`--username`, `--password`) override environment variables

## Usage

### Available Commands

<!-- CODE:BASH:START -->
<!-- echo '```' -->
<!-- matty --help -->
<!-- echo '```' -->
<!-- CODE:END -->
<!-- OUTPUT:START -->
<!-- ⚠️ This content is auto-generated by `markdown-code-runner`. -->
```

 Usage: matty [OPTIONS] COMMAND [ARGS]...

 Functional Matrix CLI client


╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --install-completion            Install completion for the current shell.    │
│ --show-completion               Show completion for the current shell, to    │
│                                 copy it or customize the installation.       │
│ --help                -h        Show this message and exit.                  │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────────────╮
│ rooms          List all joined rooms. (alias: r)                             │
│ messages       Show recent messages from a room. (alias: m)                  │
│ users          Show users in a room. (alias: u)                              │
│ send           Send a message to a room. Supports @mentions. (alias: s)      │
│ threads        List all threads in a room. (alias: t)                        │
│ thread         Show all messages in a specific thread. (alias: th)           │
│ reply          Reply to a specific message using its handle. (alias: re)     │
│ thread-start   Start a new thread from a message using its handle. (alias:   │
│                ts)                                                           │
│ thread-reply   Reply within an existing thread. (alias: tr)                  │
│ react          Add a reaction to a message using its handle. (alias: rx)     │
│ edit           Edit a message using its handle. (alias: e)                   │
│ redact         Delete/redact a message using its handle. (alias: del)        │
│ reactions      Show detailed reactions for a specific message. (alias: rxs)  │
╰──────────────────────────────────────────────────────────────────────────────╯

```

<!-- OUTPUT:END -->

### Rooms Command

List all joined Matrix rooms:

<!-- CODE:BASH:START -->
<!-- echo '```' -->
<!-- matty rooms --help -->
<!-- echo '```' -->
<!-- CODE:END -->
<!-- OUTPUT:START -->
<!-- ⚠️ This content is auto-generated by `markdown-code-runner`. -->
```

 Usage: matty rooms [OPTIONS]

 List all joined rooms. (alias: r)


╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --username  -u      TEXT                Matrix username (overrides           │
│                                         MATRIX_USERNAME env var)             │
│                                         [default: None]                      │
│ --password  -p      TEXT                Matrix password (overrides           │
│                                         MATRIX_PASSWORD env var)             │
│                                         [default: None]                      │
│ --format    -f      [rich|simple|json]  Output format (rich/simple/json)     │
│                                         [default: rich]                      │
│ --help      -h                          Show this message and exit.          │
╰──────────────────────────────────────────────────────────────────────────────╯

```

<!-- OUTPUT:END -->

### Messages Command

Get recent messages from a room:

<!-- CODE:BASH:START -->
<!-- echo '```' -->
<!-- matty messages --help -->
<!-- echo '```' -->
<!-- CODE:END -->
<!-- OUTPUT:START -->
<!-- ⚠️ This content is auto-generated by `markdown-code-runner`. -->
```

 Usage: matty messages [OPTIONS] [ROOM]

 Show recent messages from a room. (alias: m)


╭─ Arguments ──────────────────────────────────────────────────────────────────╮
│   room      [ROOM]  Room ID or name [default: None]                          │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --limit     -l      INTEGER             [default: 20]                        │
│ --username  -u      TEXT                Matrix username (overrides           │
│                                         MATRIX_USERNAME env var)             │
│                                         [default: None]                      │
│ --password  -p      TEXT                Matrix password (overrides           │
│                                         MATRIX_PASSWORD env var)             │
│                                         [default: None]                      │
│ --format    -f      [rich|simple|json]  Output format (rich/simple/json)     │
│                                         [default: rich]                      │
│ --help      -h                          Show this message and exit.          │
╰──────────────────────────────────────────────────────────────────────────────╯

```

<!-- OUTPUT:END -->

### Users Command

List users in a room:

<!-- CODE:BASH:START -->
<!-- echo '```' -->
<!-- matty users --help -->
<!-- echo '```' -->
<!-- CODE:END -->
<!-- OUTPUT:START -->
<!-- ⚠️ This content is auto-generated by `markdown-code-runner`. -->
```

 Usage: matty users [OPTIONS] [ROOM]

 Show users in a room. (alias: u)


╭─ Arguments ──────────────────────────────────────────────────────────────────╮
│   room      [ROOM]  Room ID or name [default: None]                          │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --username  -u      TEXT                Matrix username (overrides           │
│                                         MATRIX_USERNAME env var)             │
│                                         [default: None]                      │
│ --password  -p      TEXT                Matrix password (overrides           │
│                                         MATRIX_PASSWORD env var)             │
│                                         [default: None]                      │
│ --format    -f      [rich|simple|json]  Output format (rich/simple/json)     │
│                                         [default: rich]                      │
│ --help      -h                          Show this message and exit.          │
╰──────────────────────────────────────────────────────────────────────────────╯

```

<!-- OUTPUT:END -->

### Thread Commands

View and interact with threads:

<!-- CODE:BASH:START -->
<!-- echo '```' -->
<!-- matty threads --help -->
<!-- echo '```' -->
<!-- CODE:END -->
<!-- OUTPUT:START -->
<!-- ⚠️ This content is auto-generated by `markdown-code-runner`. -->
```

 Usage: matty threads [OPTIONS] [ROOM]

 List all threads in a room. (alias: t)


╭─ Arguments ──────────────────────────────────────────────────────────────────╮
│   room      [ROOM]  Room ID or name [default: None]                          │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --limit     -l      INTEGER             Number of messages to check          │
│                                         [default: 50]                        │
│ --username  -u      TEXT                Matrix username (overrides           │
│                                         MATRIX_USERNAME env var)             │
│                                         [default: None]                      │
│ --password  -p      TEXT                Matrix password (overrides           │
│                                         MATRIX_PASSWORD env var)             │
│                                         [default: None]                      │
│ --format    -f      [rich|simple|json]  Output format (rich/simple/json)     │
│                                         [default: rich]                      │
│ --help      -h                          Show this message and exit.          │
╰──────────────────────────────────────────────────────────────────────────────╯

```

<!-- OUTPUT:END -->

<!-- CODE:BASH:START -->
<!-- echo '```' -->
<!-- matty thread --help -->
<!-- echo '```' -->
<!-- CODE:END -->
<!-- OUTPUT:START -->
<!-- ⚠️ This content is auto-generated by `markdown-code-runner`. -->
```

 Usage: matty thread [OPTIONS] [ROOM] [THREAD_ID]

 Show all messages in a specific thread. (alias: th)


╭─ Arguments ──────────────────────────────────────────────────────────────────╮
│   room           [ROOM]       Room ID or name [default: None]                │
│   thread_id      [THREAD_ID]  Thread ID (t1, t2, etc.) or full Matrix ID     │
│                               [default: None]                                │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --limit     -l      INTEGER             Number of messages to fetch          │
│                                         [default: 50]                        │
│ --username  -u      TEXT                Matrix username (overrides           │
│                                         MATRIX_USERNAME env var)             │
│                                         [default: None]                      │
│ --password  -p      TEXT                Matrix password (overrides           │
│                                         MATRIX_PASSWORD env var)             │
│                                         [default: None]                      │
│ --format    -f      [rich|simple|json]  Output format (rich/simple/json)     │
│                                         [default: rich]                      │
│ --help      -h                          Show this message and exit.          │
╰──────────────────────────────────────────────────────────────────────────────╯

```

<!-- OUTPUT:END -->

### Send Command

Send messages to rooms:

<!-- CODE:BASH:START -->
<!-- echo '```' -->
<!-- matty send --help -->
<!-- echo '```' -->
<!-- CODE:END -->
<!-- OUTPUT:START -->
<!-- ⚠️ This content is auto-generated by `markdown-code-runner`. -->
```

 Usage: matty send [OPTIONS] [ROOM] [MESSAGE]

 Send a message to a room. Supports @mentions. (alias: s)


╭─ Arguments ──────────────────────────────────────────────────────────────────╮
│   room         [ROOM]     Room ID or name [default: None]                    │
│   message      [MESSAGE]  Message to send (use @username for mentions)       │
│                           [default: None]                                    │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --stdin                   Read message from stdin                            │
│ --file      -f      PATH  Read message from file [default: None]             │
│ --username  -u      TEXT  Matrix username (overrides MATRIX_USERNAME env     │
│                           var)                                               │
│                           [default: None]                                    │
│ --password  -p      TEXT  Matrix password (overrides MATRIX_PASSWORD env     │
│                           var)                                               │
│                           [default: None]                                    │
│ --help      -h            Show this message and exit.                        │
╰──────────────────────────────────────────────────────────────────────────────╯

```

<!-- OUTPUT:END -->

### Reply Command

Reply to messages:

<!-- CODE:BASH:START -->
<!-- echo '```' -->
<!-- matty reply --help -->
<!-- echo '```' -->
<!-- CODE:END -->
<!-- OUTPUT:START -->
<!-- ⚠️ This content is auto-generated by `markdown-code-runner`. -->
```

 Usage: matty reply [OPTIONS] [ROOM] [HANDLE] [MESSAGE]

 Reply to a specific message using its handle. (alias: re)


╭─ Arguments ──────────────────────────────────────────────────────────────────╮
│   room         [ROOM]     Room ID or name [default: None]                    │
│   handle       [HANDLE]   Message handle (m1, m2, etc.) to reply to          │
│                           [default: None]                                    │
│   message      [MESSAGE]  Reply message [default: None]                      │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --username  -u      TEXT  Matrix username (overrides MATRIX_USERNAME env     │
│                           var)                                               │
│                           [default: None]                                    │
│ --password  -p      TEXT  Matrix password (overrides MATRIX_PASSWORD env     │
│                           var)                                               │
│                           [default: None]                                    │
│ --help      -h            Show this message and exit.                        │
╰──────────────────────────────────────────────────────────────────────────────╯

```

<!-- OUTPUT:END -->

### Thread Start Command

Start a thread from a message:

<!-- CODE:BASH:START -->
<!-- echo '```' -->
<!-- matty thread-start --help -->
<!-- echo '```' -->
<!-- CODE:END -->
<!-- OUTPUT:START -->
<!-- ⚠️ This content is auto-generated by `markdown-code-runner`. -->
```

 Usage: matty thread-start [OPTIONS] [ROOM] [HANDLE] [MESSAGE]

 Start a new thread from a message using its handle. (alias: ts)


╭─ Arguments ──────────────────────────────────────────────────────────────────╮
│   room         [ROOM]     Room ID or name [default: None]                    │
│   handle       [HANDLE]   Message handle (m1, m2, etc.) to start thread from │
│                           [default: None]                                    │
│   message      [MESSAGE]  First message in the thread [default: None]        │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --username  -u      TEXT  Matrix username (overrides MATRIX_USERNAME env     │
│                           var)                                               │
│                           [default: None]                                    │
│ --password  -p      TEXT  Matrix password (overrides MATRIX_PASSWORD env     │
│                           var)                                               │
│                           [default: None]                                    │
│ --help      -h            Show this message and exit.                        │
╰──────────────────────────────────────────────────────────────────────────────╯

```

<!-- OUTPUT:END -->

### Thread Reply Command

Reply in a thread:

<!-- CODE:BASH:START -->
<!-- echo '```' -->
<!-- matty thread-reply --help -->
<!-- echo '```' -->
<!-- CODE:END -->
<!-- OUTPUT:START -->
<!-- ⚠️ This content is auto-generated by `markdown-code-runner`. -->
```

 Usage: matty thread-reply [OPTIONS] [ROOM] [THREAD_ID] [MESSAGE]

 Reply within an existing thread. (alias: tr)


╭─ Arguments ──────────────────────────────────────────────────────────────────╮
│   room           [ROOM]       Room ID or name [default: None]                │
│   thread_id      [THREAD_ID]  Thread ID (t1, t2, etc.) or full Matrix ID     │
│                               [default: None]                                │
│   message        [MESSAGE]    Reply message [default: None]                  │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --username  -u      TEXT  Matrix username (overrides MATRIX_USERNAME env     │
│                           var)                                               │
│                           [default: None]                                    │
│ --password  -p      TEXT  Matrix password (overrides MATRIX_PASSWORD env     │
│                           var)                                               │
│                           [default: None]                                    │
│ --help      -h            Show this message and exit.                        │
╰──────────────────────────────────────────────────────────────────────────────╯

```

<!-- OUTPUT:END -->

### React Command

Add reactions to messages:

<!-- CODE:BASH:START -->
<!-- echo '```' -->
<!-- matty react --help -->
<!-- echo '```' -->
<!-- CODE:END -->
<!-- OUTPUT:START -->
<!-- ⚠️ This content is auto-generated by `markdown-code-runner`. -->
```

 Usage: matty react [OPTIONS] [ROOM] [HANDLE] [EMOJI]

 Add a reaction to a message using its handle. (alias: rx)


╭─ Arguments ──────────────────────────────────────────────────────────────────╮
│   room        [ROOM]    Room ID or name [default: None]                      │
│   handle      [HANDLE]  Message handle (m1, m2, etc.) to react to            │
│                         [default: None]                                      │
│   emoji       [EMOJI]   Emoji reaction (e.g., 👍, ❤️, 😄) [default: None]     │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --username  -u      TEXT  Matrix username (overrides MATRIX_USERNAME env     │
│                           var)                                               │
│                           [default: None]                                    │
│ --password  -p      TEXT  Matrix password (overrides MATRIX_PASSWORD env     │
│                           var)                                               │
│                           [default: None]                                    │
│ --help      -h            Show this message and exit.                        │
╰──────────────────────────────────────────────────────────────────────────────╯

```

<!-- OUTPUT:END -->

### Reactions Command

View reactions on a message:

<!-- CODE:BASH:START -->
<!-- echo '```' -->
<!-- matty reactions --help -->
<!-- echo '```' -->
<!-- CODE:END -->
<!-- OUTPUT:START -->
<!-- ⚠️ This content is auto-generated by `markdown-code-runner`. -->
```

 Usage: matty reactions [OPTIONS] [ROOM] [HANDLE]

 Show detailed reactions for a specific message. (alias: rxs)


╭─ Arguments ──────────────────────────────────────────────────────────────────╮
│   room        [ROOM]    Room ID or name [default: None]                      │
│   handle      [HANDLE]  Message handle (m1, m2, etc.) to show reactions for  │
│                         [default: None]                                      │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --username  -u      TEXT                Matrix username (overrides           │
│                                         MATRIX_USERNAME env var)             │
│                                         [default: None]                      │
│ --password  -p      TEXT                Matrix password (overrides           │
│                                         MATRIX_PASSWORD env var)             │
│                                         [default: None]                      │
│ --format    -f      [rich|simple|json]  Output format (rich/simple/json)     │
│                                         [default: rich]                      │
│ --help      -h                          Show this message and exit.          │
╰──────────────────────────────────────────────────────────────────────────────╯

```

<!-- OUTPUT:END -->

### Redact Command

Delete/redact messages:

<!-- CODE:BASH:START -->
<!-- echo '```' -->
<!-- matty redact --help -->
<!-- echo '```' -->
<!-- CODE:END -->
<!-- OUTPUT:START -->
<!-- ⚠️ This content is auto-generated by `markdown-code-runner`. -->
```

 Usage: matty redact [OPTIONS] [ROOM] [HANDLE]

 Delete/redact a message using its handle. (alias: del)


╭─ Arguments ──────────────────────────────────────────────────────────────────╮
│   room        [ROOM]    Room ID or name [default: None]                      │
│   handle      [HANDLE]  Message handle (m1, m2, etc.) to redact/delete       │
│                         [default: None]                                      │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --reason    -r      TEXT  Reason for redaction [default: None]               │
│ --username  -u      TEXT  Matrix username (overrides MATRIX_USERNAME env     │
│                           var)                                               │
│                           [default: None]                                    │
│ --password  -p      TEXT  Matrix password (overrides MATRIX_PASSWORD env     │
│                           var)                                               │
│                           [default: None]                                    │
│ --help      -h            Show this message and exit.                        │
╰──────────────────────────────────────────────────────────────────────────────╯

```

<!-- OUTPUT:END -->

## Command Aliases

For faster typing, all commands have short aliases:

- `matty r` → `matty rooms` - List all rooms
- `matty m` → `matty messages` - Show messages from a room
- `matty u` → `matty users` - Show users in a room
- `matty s` → `matty send` - Send a message
- `matty t` → `matty threads` - List threads
- `matty th` → `matty thread` - Show thread messages
- `matty re` → `matty reply` - Reply to a message
- `matty ts` → `matty thread-start` - Start a thread
- `matty tr` → `matty thread-reply` - Reply in a thread
- `matty rx` → `matty react` - Add a reaction to a message
- `matty del` → `matty redact` - Delete/redact a message
- `matty rxs` → `matty reactions` - Show reactions on a message

## Examples

### Basic Usage

```bash
# List all rooms
matty rooms
# or use alias: matty r

# Show users in a room (with mention hints)
matty users lobby
# or: matty u lobby

# Get recent messages from a room
matty messages lobby --limit 10
# or: matty m lobby --limit 10

# Send a message to a room
matty send lobby "Hello from CLI!"
# or: matty s lobby "Hello from CLI!"

# Send a message with mentions
matty send lobby "@alice check this out!"
# or: matty s lobby "@bob @alice meeting at 3pm"

# Use different output formats
matty rooms --format json
matty rooms --format simple
# or: matty r --format json
```

### Working with Threads

```bash
# List threads in a room
matty threads lobby

# View messages in a specific thread (using simple ID)
matty thread lobby t1

# Start a thread from a message
matty thread-start lobby m2 "Starting a thread!"

# Reply in a thread (using simple thread ID)
matty thread-reply lobby t1 "Reply in thread"
```

### Reactions and Redaction

```bash
# Add a reaction to a message
matty react lobby m3 "👍"
# or: matty rx lobby m3 "🚀"

# View reactions on a message
matty reactions lobby m3
# or: matty rxs lobby m3 --format simple

# Delete/redact a message
matty redact lobby m5 --reason "Accidental message"
# or: matty del lobby m5
```

### Message Handles and Replies

```bash
# Reply to a message using handle
matty reply lobby m3 "This is a reply!"

# Reply to the 5th message in a room
matty messages lobby --limit 10
matty reply lobby m5 "Replying to message 5"
```

### Mentions

The CLI supports @mentions in messages:

```bash
# Mention a user by username
matty send lobby "@alice can you check this?"

# Multiple mentions
matty send lobby "@bob @alice meeting in 5 minutes"

# List users to see available mentions
matty users lobby  # Shows User IDs and simplified @mentions

# Mentions work in replies and threads too
matty reply lobby m3 "@alice I agree with your point"
matty thread-reply lobby t1 "@bob what do you think?"
```

The mention system will:
- Automatically find the full Matrix ID for @username mentions
- Support full Matrix IDs like @user:server.com
- Format mentions properly so users get notified

## Message Handles and Thread IDs

The CLI uses convenient handles to reference messages and threads:

- **Message handles**: `m1`, `m2`, `m3`, etc. - Reference messages by their position
- **Thread IDs**: `t1`, `t2`, `t3`, etc. - Reference threads with simple persistent IDs

These IDs are stored in `~/.matrix_cli_ids.json` and persist across sessions.

### Why Simple IDs?

Matrix uses complex IDs like:
- Event: `$Uj2XuH2a8EqJBh4g:matrix.org`
- Room: `!DfQvqvwXYsFjVcfLTp:matrix.org`

Our CLI simplifies these to:
- Messages: `m1`, `m2`, `m3` (temporary handles for current view)
- Threads: `t1`, `t2`, `t3` (persistent IDs across sessions)

## Output Formats

The CLI supports three output formats:

1. **Rich** (default) - Beautiful terminal UI with tables and colors
2. **Simple** - Plain text output, perfect for scripts
3. **JSON** - Machine-readable format for automation

Example:
```bash
# Pretty tables with colors
matty rooms

# Simple text output
matty rooms --format simple

# JSON for automation
matty rooms --format json | jq '.[] | .name'
```

## Project Structure

```
matrix-cli/
├── matty.py         # Main CLI application (functional style)
├── test_client.py        # Connection testing utility
├── tests/                # Test suite
│   ├── __init__.py
│   ├── conftest.py       # Pytest configuration
│   └── test_matrix_cli.py # Unit tests
├── .github/              # GitHub Actions workflows
│   └── workflows/
│       ├── pytest.yml    # Test runner
│       ├── release.yml   # PyPI release
│       └── markdown-code-runner.yml # README updater
├── .env                  # Your credentials (not in git)
├── .env.example          # Example environment file
├── CLAUDE.md            # Development guidelines
├── pyproject.toml       # Project configuration
└── README.md            # This file
```

## Development

This project follows functional programming principles:
- Private functions (`_function_name`) for internal logic
- Dataclasses over dictionaries for data structures
- Type hints everywhere for clarity
- No unnecessary abstractions or class hierarchies
- Functions over classes where possible

See `CLAUDE.md` for detailed development guidelines.

## Testing

```bash
# Run tests
uv run pytest tests/ -v

# Test with coverage
uv run pytest tests/ -v --cov=matty --cov-report=term-missing

# Test connection to Matrix server
uv run python test_client.py

# Run pre-commit checks
uv run pre-commit run --all-files
```

## License

MIT

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "matty",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.12",
    "maintainer_email": null,
    "keywords": "ai-friendly, chat, cli, client, matrix",
    "author": null,
    "author_email": "Bas Nijholt <bas@nijho.lt>",
    "download_url": "https://files.pythonhosted.org/packages/78/46/d6b63da9b3721f04217f15ebff9079b8bae48f162cdb032d1bbd35a3bf3b/matty-0.9.0.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\n  <img src=\"logo.svg\" alt=\"Matrix TUI Logo\" width=\"200\" height=\"200\">\n\n  # Matty - Matrix CLI Client\n\n  A simple, functional Matrix chat client built with Python, Typer, Pydantic, Nio, and Rich. Every interaction is a single CLI command for easy automation.\n</div>\n\n[![PyPI](https://img.shields.io/pypi/v/matty.svg)](https://pypi.python.org/pypi/matty)\n[![Build Status](https://github.com/basnijholt/matty/actions/workflows/pytest.yml/badge.svg)](https://github.com/basnijholt/matty/actions/workflows/pytest.yml)\n[![CodeCov](https://codecov.io/gh/basnijholt/matty/branch/main/graph/badge.svg)](https://codecov.io/gh/basnijholt/matty)\n[![GitHub Repo stars](https://img.shields.io/github/stars/basnijholt/matty)](https://github.com/basnijholt/matty)\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n\n## Features\n\n- Fast CLI commands for quick Matrix operations\n- Thread support - view and navigate threaded conversations\n- Reactions support - add and view emoji reactions on messages\n- Message redaction - delete messages with optional reasons\n- AI-friendly - every action is a single CLI command\n- Functional programming style (minimal classes, maximum functions)\n- Environment-based configuration\n- Multiple output formats (rich, simple, JSON)\n- Type-safe with dataclasses and type hints\n- Persistent simple ID mapping for complex Matrix IDs\n\n## Installation\n\n```bash\nuv tool install matty\n# or\npipx install matty\n# or\npip install matty\n```\n\nFor development, clone the repo and install dependencies:\n\n```bash\n# Clone the repository\ngit clone https://github.com/basnijholt/matrix-cli\ncd matrix-cli\n\n# Install dependencies with uv\nuv sync\n\n# Optional: Install pre-commit hooks\nuv run pre-commit install\n```\n\n## Configuration\n\nMatty uses environment variables for configuration. Create a `.env` file in your working directory with your Matrix credentials:\n\n```bash\nMATRIX_HOMESERVER=https://matrix.org\nMATRIX_USERNAME=your_username\nMATRIX_PASSWORD=your_password\nMATRIX_SSL_VERIFY=true  # Set to false for test servers\n```\n\n### Environment Variables\n\n| Variable | Description | Default | Example |\n|----------|-------------|---------|---------|\n| `MATRIX_HOMESERVER` | The Matrix homeserver URL to connect to | `https://matrix.org` | `https://matrix.example.com` |\n| `MATRIX_USERNAME` | Your Matrix username (without @ or :server) | None (required) | `alice` |\n| `MATRIX_PASSWORD` | Your Matrix account password | None (required) | `secretpassword` |\n| `MATRIX_SSL_VERIFY` | Whether to verify SSL certificates | `true` | `false` (for test servers) |\n\n**Notes:**\n- The username should be provided without the `@` prefix or `:server` suffix\n- Set `MATRIX_SSL_VERIFY=false` when connecting to test servers with self-signed certificates\n- Command-line options (`--username`, `--password`) override environment variables\n\n## Usage\n\n### Available Commands\n\n<!-- CODE:BASH:START -->\n<!-- echo '```' -->\n<!-- matty --help -->\n<!-- echo '```' -->\n<!-- CODE:END -->\n<!-- OUTPUT:START -->\n<!-- \u26a0\ufe0f This content is auto-generated by `markdown-code-runner`. -->\n```\n\n Usage: matty [OPTIONS] COMMAND [ARGS]...\n\n Functional Matrix CLI client\n\n\n\u256d\u2500 Options \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 --install-completion            Install completion for the current shell.    \u2502\n\u2502 --show-completion               Show completion for the current shell, to    \u2502\n\u2502                                 copy it or customize the installation.       \u2502\n\u2502 --help                -h        Show this message and exit.                  \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\u256d\u2500 Commands \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 rooms          List all joined rooms. (alias: r)                             \u2502\n\u2502 messages       Show recent messages from a room. (alias: m)                  \u2502\n\u2502 users          Show users in a room. (alias: u)                              \u2502\n\u2502 send           Send a message to a room. Supports @mentions. (alias: s)      \u2502\n\u2502 threads        List all threads in a room. (alias: t)                        \u2502\n\u2502 thread         Show all messages in a specific thread. (alias: th)           \u2502\n\u2502 reply          Reply to a specific message using its handle. (alias: re)     \u2502\n\u2502 thread-start   Start a new thread from a message using its handle. (alias:   \u2502\n\u2502                ts)                                                           \u2502\n\u2502 thread-reply   Reply within an existing thread. (alias: tr)                  \u2502\n\u2502 react          Add a reaction to a message using its handle. (alias: rx)     \u2502\n\u2502 edit           Edit a message using its handle. (alias: e)                   \u2502\n\u2502 redact         Delete/redact a message using its handle. (alias: del)        \u2502\n\u2502 reactions      Show detailed reactions for a specific message. (alias: rxs)  \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\n```\n\n<!-- OUTPUT:END -->\n\n### Rooms Command\n\nList all joined Matrix rooms:\n\n<!-- CODE:BASH:START -->\n<!-- echo '```' -->\n<!-- matty rooms --help -->\n<!-- echo '```' -->\n<!-- CODE:END -->\n<!-- OUTPUT:START -->\n<!-- \u26a0\ufe0f This content is auto-generated by `markdown-code-runner`. -->\n```\n\n Usage: matty rooms [OPTIONS]\n\n List all joined rooms. (alias: r)\n\n\n\u256d\u2500 Options \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 --username  -u      TEXT                Matrix username (overrides           \u2502\n\u2502                                         MATRIX_USERNAME env var)             \u2502\n\u2502                                         [default: None]                      \u2502\n\u2502 --password  -p      TEXT                Matrix password (overrides           \u2502\n\u2502                                         MATRIX_PASSWORD env var)             \u2502\n\u2502                                         [default: None]                      \u2502\n\u2502 --format    -f      [rich|simple|json]  Output format (rich/simple/json)     \u2502\n\u2502                                         [default: rich]                      \u2502\n\u2502 --help      -h                          Show this message and exit.          \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\n```\n\n<!-- OUTPUT:END -->\n\n### Messages Command\n\nGet recent messages from a room:\n\n<!-- CODE:BASH:START -->\n<!-- echo '```' -->\n<!-- matty messages --help -->\n<!-- echo '```' -->\n<!-- CODE:END -->\n<!-- OUTPUT:START -->\n<!-- \u26a0\ufe0f This content is auto-generated by `markdown-code-runner`. -->\n```\n\n Usage: matty messages [OPTIONS] [ROOM]\n\n Show recent messages from a room. (alias: m)\n\n\n\u256d\u2500 Arguments \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502   room      [ROOM]  Room ID or name [default: None]                          \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\u256d\u2500 Options \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 --limit     -l      INTEGER             [default: 20]                        \u2502\n\u2502 --username  -u      TEXT                Matrix username (overrides           \u2502\n\u2502                                         MATRIX_USERNAME env var)             \u2502\n\u2502                                         [default: None]                      \u2502\n\u2502 --password  -p      TEXT                Matrix password (overrides           \u2502\n\u2502                                         MATRIX_PASSWORD env var)             \u2502\n\u2502                                         [default: None]                      \u2502\n\u2502 --format    -f      [rich|simple|json]  Output format (rich/simple/json)     \u2502\n\u2502                                         [default: rich]                      \u2502\n\u2502 --help      -h                          Show this message and exit.          \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\n```\n\n<!-- OUTPUT:END -->\n\n### Users Command\n\nList users in a room:\n\n<!-- CODE:BASH:START -->\n<!-- echo '```' -->\n<!-- matty users --help -->\n<!-- echo '```' -->\n<!-- CODE:END -->\n<!-- OUTPUT:START -->\n<!-- \u26a0\ufe0f This content is auto-generated by `markdown-code-runner`. -->\n```\n\n Usage: matty users [OPTIONS] [ROOM]\n\n Show users in a room. (alias: u)\n\n\n\u256d\u2500 Arguments \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502   room      [ROOM]  Room ID or name [default: None]                          \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\u256d\u2500 Options \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 --username  -u      TEXT                Matrix username (overrides           \u2502\n\u2502                                         MATRIX_USERNAME env var)             \u2502\n\u2502                                         [default: None]                      \u2502\n\u2502 --password  -p      TEXT                Matrix password (overrides           \u2502\n\u2502                                         MATRIX_PASSWORD env var)             \u2502\n\u2502                                         [default: None]                      \u2502\n\u2502 --format    -f      [rich|simple|json]  Output format (rich/simple/json)     \u2502\n\u2502                                         [default: rich]                      \u2502\n\u2502 --help      -h                          Show this message and exit.          \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\n```\n\n<!-- OUTPUT:END -->\n\n### Thread Commands\n\nView and interact with threads:\n\n<!-- CODE:BASH:START -->\n<!-- echo '```' -->\n<!-- matty threads --help -->\n<!-- echo '```' -->\n<!-- CODE:END -->\n<!-- OUTPUT:START -->\n<!-- \u26a0\ufe0f This content is auto-generated by `markdown-code-runner`. -->\n```\n\n Usage: matty threads [OPTIONS] [ROOM]\n\n List all threads in a room. (alias: t)\n\n\n\u256d\u2500 Arguments \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502   room      [ROOM]  Room ID or name [default: None]                          \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\u256d\u2500 Options \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 --limit     -l      INTEGER             Number of messages to check          \u2502\n\u2502                                         [default: 50]                        \u2502\n\u2502 --username  -u      TEXT                Matrix username (overrides           \u2502\n\u2502                                         MATRIX_USERNAME env var)             \u2502\n\u2502                                         [default: None]                      \u2502\n\u2502 --password  -p      TEXT                Matrix password (overrides           \u2502\n\u2502                                         MATRIX_PASSWORD env var)             \u2502\n\u2502                                         [default: None]                      \u2502\n\u2502 --format    -f      [rich|simple|json]  Output format (rich/simple/json)     \u2502\n\u2502                                         [default: rich]                      \u2502\n\u2502 --help      -h                          Show this message and exit.          \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\n```\n\n<!-- OUTPUT:END -->\n\n<!-- CODE:BASH:START -->\n<!-- echo '```' -->\n<!-- matty thread --help -->\n<!-- echo '```' -->\n<!-- CODE:END -->\n<!-- OUTPUT:START -->\n<!-- \u26a0\ufe0f This content is auto-generated by `markdown-code-runner`. -->\n```\n\n Usage: matty thread [OPTIONS] [ROOM] [THREAD_ID]\n\n Show all messages in a specific thread. (alias: th)\n\n\n\u256d\u2500 Arguments \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502   room           [ROOM]       Room ID or name [default: None]                \u2502\n\u2502   thread_id      [THREAD_ID]  Thread ID (t1, t2, etc.) or full Matrix ID     \u2502\n\u2502                               [default: None]                                \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\u256d\u2500 Options \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 --limit     -l      INTEGER             Number of messages to fetch          \u2502\n\u2502                                         [default: 50]                        \u2502\n\u2502 --username  -u      TEXT                Matrix username (overrides           \u2502\n\u2502                                         MATRIX_USERNAME env var)             \u2502\n\u2502                                         [default: None]                      \u2502\n\u2502 --password  -p      TEXT                Matrix password (overrides           \u2502\n\u2502                                         MATRIX_PASSWORD env var)             \u2502\n\u2502                                         [default: None]                      \u2502\n\u2502 --format    -f      [rich|simple|json]  Output format (rich/simple/json)     \u2502\n\u2502                                         [default: rich]                      \u2502\n\u2502 --help      -h                          Show this message and exit.          \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\n```\n\n<!-- OUTPUT:END -->\n\n### Send Command\n\nSend messages to rooms:\n\n<!-- CODE:BASH:START -->\n<!-- echo '```' -->\n<!-- matty send --help -->\n<!-- echo '```' -->\n<!-- CODE:END -->\n<!-- OUTPUT:START -->\n<!-- \u26a0\ufe0f This content is auto-generated by `markdown-code-runner`. -->\n```\n\n Usage: matty send [OPTIONS] [ROOM] [MESSAGE]\n\n Send a message to a room. Supports @mentions. (alias: s)\n\n\n\u256d\u2500 Arguments \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502   room         [ROOM]     Room ID or name [default: None]                    \u2502\n\u2502   message      [MESSAGE]  Message to send (use @username for mentions)       \u2502\n\u2502                           [default: None]                                    \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\u256d\u2500 Options \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 --stdin                   Read message from stdin                            \u2502\n\u2502 --file      -f      PATH  Read message from file [default: None]             \u2502\n\u2502 --username  -u      TEXT  Matrix username (overrides MATRIX_USERNAME env     \u2502\n\u2502                           var)                                               \u2502\n\u2502                           [default: None]                                    \u2502\n\u2502 --password  -p      TEXT  Matrix password (overrides MATRIX_PASSWORD env     \u2502\n\u2502                           var)                                               \u2502\n\u2502                           [default: None]                                    \u2502\n\u2502 --help      -h            Show this message and exit.                        \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\n```\n\n<!-- OUTPUT:END -->\n\n### Reply Command\n\nReply to messages:\n\n<!-- CODE:BASH:START -->\n<!-- echo '```' -->\n<!-- matty reply --help -->\n<!-- echo '```' -->\n<!-- CODE:END -->\n<!-- OUTPUT:START -->\n<!-- \u26a0\ufe0f This content is auto-generated by `markdown-code-runner`. -->\n```\n\n Usage: matty reply [OPTIONS] [ROOM] [HANDLE] [MESSAGE]\n\n Reply to a specific message using its handle. (alias: re)\n\n\n\u256d\u2500 Arguments \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502   room         [ROOM]     Room ID or name [default: None]                    \u2502\n\u2502   handle       [HANDLE]   Message handle (m1, m2, etc.) to reply to          \u2502\n\u2502                           [default: None]                                    \u2502\n\u2502   message      [MESSAGE]  Reply message [default: None]                      \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\u256d\u2500 Options \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 --username  -u      TEXT  Matrix username (overrides MATRIX_USERNAME env     \u2502\n\u2502                           var)                                               \u2502\n\u2502                           [default: None]                                    \u2502\n\u2502 --password  -p      TEXT  Matrix password (overrides MATRIX_PASSWORD env     \u2502\n\u2502                           var)                                               \u2502\n\u2502                           [default: None]                                    \u2502\n\u2502 --help      -h            Show this message and exit.                        \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\n```\n\n<!-- OUTPUT:END -->\n\n### Thread Start Command\n\nStart a thread from a message:\n\n<!-- CODE:BASH:START -->\n<!-- echo '```' -->\n<!-- matty thread-start --help -->\n<!-- echo '```' -->\n<!-- CODE:END -->\n<!-- OUTPUT:START -->\n<!-- \u26a0\ufe0f This content is auto-generated by `markdown-code-runner`. -->\n```\n\n Usage: matty thread-start [OPTIONS] [ROOM] [HANDLE] [MESSAGE]\n\n Start a new thread from a message using its handle. (alias: ts)\n\n\n\u256d\u2500 Arguments \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502   room         [ROOM]     Room ID or name [default: None]                    \u2502\n\u2502   handle       [HANDLE]   Message handle (m1, m2, etc.) to start thread from \u2502\n\u2502                           [default: None]                                    \u2502\n\u2502   message      [MESSAGE]  First message in the thread [default: None]        \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\u256d\u2500 Options \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 --username  -u      TEXT  Matrix username (overrides MATRIX_USERNAME env     \u2502\n\u2502                           var)                                               \u2502\n\u2502                           [default: None]                                    \u2502\n\u2502 --password  -p      TEXT  Matrix password (overrides MATRIX_PASSWORD env     \u2502\n\u2502                           var)                                               \u2502\n\u2502                           [default: None]                                    \u2502\n\u2502 --help      -h            Show this message and exit.                        \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\n```\n\n<!-- OUTPUT:END -->\n\n### Thread Reply Command\n\nReply in a thread:\n\n<!-- CODE:BASH:START -->\n<!-- echo '```' -->\n<!-- matty thread-reply --help -->\n<!-- echo '```' -->\n<!-- CODE:END -->\n<!-- OUTPUT:START -->\n<!-- \u26a0\ufe0f This content is auto-generated by `markdown-code-runner`. -->\n```\n\n Usage: matty thread-reply [OPTIONS] [ROOM] [THREAD_ID] [MESSAGE]\n\n Reply within an existing thread. (alias: tr)\n\n\n\u256d\u2500 Arguments \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502   room           [ROOM]       Room ID or name [default: None]                \u2502\n\u2502   thread_id      [THREAD_ID]  Thread ID (t1, t2, etc.) or full Matrix ID     \u2502\n\u2502                               [default: None]                                \u2502\n\u2502   message        [MESSAGE]    Reply message [default: None]                  \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\u256d\u2500 Options \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 --username  -u      TEXT  Matrix username (overrides MATRIX_USERNAME env     \u2502\n\u2502                           var)                                               \u2502\n\u2502                           [default: None]                                    \u2502\n\u2502 --password  -p      TEXT  Matrix password (overrides MATRIX_PASSWORD env     \u2502\n\u2502                           var)                                               \u2502\n\u2502                           [default: None]                                    \u2502\n\u2502 --help      -h            Show this message and exit.                        \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\n```\n\n<!-- OUTPUT:END -->\n\n### React Command\n\nAdd reactions to messages:\n\n<!-- CODE:BASH:START -->\n<!-- echo '```' -->\n<!-- matty react --help -->\n<!-- echo '```' -->\n<!-- CODE:END -->\n<!-- OUTPUT:START -->\n<!-- \u26a0\ufe0f This content is auto-generated by `markdown-code-runner`. -->\n```\n\n Usage: matty react [OPTIONS] [ROOM] [HANDLE] [EMOJI]\n\n Add a reaction to a message using its handle. (alias: rx)\n\n\n\u256d\u2500 Arguments \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502   room        [ROOM]    Room ID or name [default: None]                      \u2502\n\u2502   handle      [HANDLE]  Message handle (m1, m2, etc.) to react to            \u2502\n\u2502                         [default: None]                                      \u2502\n\u2502   emoji       [EMOJI]   Emoji reaction (e.g., \ud83d\udc4d, \u2764\ufe0f, \ud83d\ude04) [default: None]     \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\u256d\u2500 Options \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 --username  -u      TEXT  Matrix username (overrides MATRIX_USERNAME env     \u2502\n\u2502                           var)                                               \u2502\n\u2502                           [default: None]                                    \u2502\n\u2502 --password  -p      TEXT  Matrix password (overrides MATRIX_PASSWORD env     \u2502\n\u2502                           var)                                               \u2502\n\u2502                           [default: None]                                    \u2502\n\u2502 --help      -h            Show this message and exit.                        \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\n```\n\n<!-- OUTPUT:END -->\n\n### Reactions Command\n\nView reactions on a message:\n\n<!-- CODE:BASH:START -->\n<!-- echo '```' -->\n<!-- matty reactions --help -->\n<!-- echo '```' -->\n<!-- CODE:END -->\n<!-- OUTPUT:START -->\n<!-- \u26a0\ufe0f This content is auto-generated by `markdown-code-runner`. -->\n```\n\n Usage: matty reactions [OPTIONS] [ROOM] [HANDLE]\n\n Show detailed reactions for a specific message. (alias: rxs)\n\n\n\u256d\u2500 Arguments \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502   room        [ROOM]    Room ID or name [default: None]                      \u2502\n\u2502   handle      [HANDLE]  Message handle (m1, m2, etc.) to show reactions for  \u2502\n\u2502                         [default: None]                                      \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\u256d\u2500 Options \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 --username  -u      TEXT                Matrix username (overrides           \u2502\n\u2502                                         MATRIX_USERNAME env var)             \u2502\n\u2502                                         [default: None]                      \u2502\n\u2502 --password  -p      TEXT                Matrix password (overrides           \u2502\n\u2502                                         MATRIX_PASSWORD env var)             \u2502\n\u2502                                         [default: None]                      \u2502\n\u2502 --format    -f      [rich|simple|json]  Output format (rich/simple/json)     \u2502\n\u2502                                         [default: rich]                      \u2502\n\u2502 --help      -h                          Show this message and exit.          \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\n```\n\n<!-- OUTPUT:END -->\n\n### Redact Command\n\nDelete/redact messages:\n\n<!-- CODE:BASH:START -->\n<!-- echo '```' -->\n<!-- matty redact --help -->\n<!-- echo '```' -->\n<!-- CODE:END -->\n<!-- OUTPUT:START -->\n<!-- \u26a0\ufe0f This content is auto-generated by `markdown-code-runner`. -->\n```\n\n Usage: matty redact [OPTIONS] [ROOM] [HANDLE]\n\n Delete/redact a message using its handle. (alias: del)\n\n\n\u256d\u2500 Arguments \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502   room        [ROOM]    Room ID or name [default: None]                      \u2502\n\u2502   handle      [HANDLE]  Message handle (m1, m2, etc.) to redact/delete       \u2502\n\u2502                         [default: None]                                      \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\u256d\u2500 Options \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 --reason    -r      TEXT  Reason for redaction [default: None]               \u2502\n\u2502 --username  -u      TEXT  Matrix username (overrides MATRIX_USERNAME env     \u2502\n\u2502                           var)                                               \u2502\n\u2502                           [default: None]                                    \u2502\n\u2502 --password  -p      TEXT  Matrix password (overrides MATRIX_PASSWORD env     \u2502\n\u2502                           var)                                               \u2502\n\u2502                           [default: None]                                    \u2502\n\u2502 --help      -h            Show this message and exit.                        \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\n```\n\n<!-- OUTPUT:END -->\n\n## Command Aliases\n\nFor faster typing, all commands have short aliases:\n\n- `matty r` \u2192 `matty rooms` - List all rooms\n- `matty m` \u2192 `matty messages` - Show messages from a room\n- `matty u` \u2192 `matty users` - Show users in a room\n- `matty s` \u2192 `matty send` - Send a message\n- `matty t` \u2192 `matty threads` - List threads\n- `matty th` \u2192 `matty thread` - Show thread messages\n- `matty re` \u2192 `matty reply` - Reply to a message\n- `matty ts` \u2192 `matty thread-start` - Start a thread\n- `matty tr` \u2192 `matty thread-reply` - Reply in a thread\n- `matty rx` \u2192 `matty react` - Add a reaction to a message\n- `matty del` \u2192 `matty redact` - Delete/redact a message\n- `matty rxs` \u2192 `matty reactions` - Show reactions on a message\n\n## Examples\n\n### Basic Usage\n\n```bash\n# List all rooms\nmatty rooms\n# or use alias: matty r\n\n# Show users in a room (with mention hints)\nmatty users lobby\n# or: matty u lobby\n\n# Get recent messages from a room\nmatty messages lobby --limit 10\n# or: matty m lobby --limit 10\n\n# Send a message to a room\nmatty send lobby \"Hello from CLI!\"\n# or: matty s lobby \"Hello from CLI!\"\n\n# Send a message with mentions\nmatty send lobby \"@alice check this out!\"\n# or: matty s lobby \"@bob @alice meeting at 3pm\"\n\n# Use different output formats\nmatty rooms --format json\nmatty rooms --format simple\n# or: matty r --format json\n```\n\n### Working with Threads\n\n```bash\n# List threads in a room\nmatty threads lobby\n\n# View messages in a specific thread (using simple ID)\nmatty thread lobby t1\n\n# Start a thread from a message\nmatty thread-start lobby m2 \"Starting a thread!\"\n\n# Reply in a thread (using simple thread ID)\nmatty thread-reply lobby t1 \"Reply in thread\"\n```\n\n### Reactions and Redaction\n\n```bash\n# Add a reaction to a message\nmatty react lobby m3 \"\ud83d\udc4d\"\n# or: matty rx lobby m3 \"\ud83d\ude80\"\n\n# View reactions on a message\nmatty reactions lobby m3\n# or: matty rxs lobby m3 --format simple\n\n# Delete/redact a message\nmatty redact lobby m5 --reason \"Accidental message\"\n# or: matty del lobby m5\n```\n\n### Message Handles and Replies\n\n```bash\n# Reply to a message using handle\nmatty reply lobby m3 \"This is a reply!\"\n\n# Reply to the 5th message in a room\nmatty messages lobby --limit 10\nmatty reply lobby m5 \"Replying to message 5\"\n```\n\n### Mentions\n\nThe CLI supports @mentions in messages:\n\n```bash\n# Mention a user by username\nmatty send lobby \"@alice can you check this?\"\n\n# Multiple mentions\nmatty send lobby \"@bob @alice meeting in 5 minutes\"\n\n# List users to see available mentions\nmatty users lobby  # Shows User IDs and simplified @mentions\n\n# Mentions work in replies and threads too\nmatty reply lobby m3 \"@alice I agree with your point\"\nmatty thread-reply lobby t1 \"@bob what do you think?\"\n```\n\nThe mention system will:\n- Automatically find the full Matrix ID for @username mentions\n- Support full Matrix IDs like @user:server.com\n- Format mentions properly so users get notified\n\n## Message Handles and Thread IDs\n\nThe CLI uses convenient handles to reference messages and threads:\n\n- **Message handles**: `m1`, `m2`, `m3`, etc. - Reference messages by their position\n- **Thread IDs**: `t1`, `t2`, `t3`, etc. - Reference threads with simple persistent IDs\n\nThese IDs are stored in `~/.matrix_cli_ids.json` and persist across sessions.\n\n### Why Simple IDs?\n\nMatrix uses complex IDs like:\n- Event: `$Uj2XuH2a8EqJBh4g:matrix.org`\n- Room: `!DfQvqvwXYsFjVcfLTp:matrix.org`\n\nOur CLI simplifies these to:\n- Messages: `m1`, `m2`, `m3` (temporary handles for current view)\n- Threads: `t1`, `t2`, `t3` (persistent IDs across sessions)\n\n## Output Formats\n\nThe CLI supports three output formats:\n\n1. **Rich** (default) - Beautiful terminal UI with tables and colors\n2. **Simple** - Plain text output, perfect for scripts\n3. **JSON** - Machine-readable format for automation\n\nExample:\n```bash\n# Pretty tables with colors\nmatty rooms\n\n# Simple text output\nmatty rooms --format simple\n\n# JSON for automation\nmatty rooms --format json | jq '.[] | .name'\n```\n\n## Project Structure\n\n```\nmatrix-cli/\n\u251c\u2500\u2500 matty.py         # Main CLI application (functional style)\n\u251c\u2500\u2500 test_client.py        # Connection testing utility\n\u251c\u2500\u2500 tests/                # Test suite\n\u2502   \u251c\u2500\u2500 __init__.py\n\u2502   \u251c\u2500\u2500 conftest.py       # Pytest configuration\n\u2502   \u2514\u2500\u2500 test_matrix_cli.py # Unit tests\n\u251c\u2500\u2500 .github/              # GitHub Actions workflows\n\u2502   \u2514\u2500\u2500 workflows/\n\u2502       \u251c\u2500\u2500 pytest.yml    # Test runner\n\u2502       \u251c\u2500\u2500 release.yml   # PyPI release\n\u2502       \u2514\u2500\u2500 markdown-code-runner.yml # README updater\n\u251c\u2500\u2500 .env                  # Your credentials (not in git)\n\u251c\u2500\u2500 .env.example          # Example environment file\n\u251c\u2500\u2500 CLAUDE.md            # Development guidelines\n\u251c\u2500\u2500 pyproject.toml       # Project configuration\n\u2514\u2500\u2500 README.md            # This file\n```\n\n## Development\n\nThis project follows functional programming principles:\n- Private functions (`_function_name`) for internal logic\n- Dataclasses over dictionaries for data structures\n- Type hints everywhere for clarity\n- No unnecessary abstractions or class hierarchies\n- Functions over classes where possible\n\nSee `CLAUDE.md` for detailed development guidelines.\n\n## Testing\n\n```bash\n# Run tests\nuv run pytest tests/ -v\n\n# Test with coverage\nuv run pytest tests/ -v --cov=matty --cov-report=term-missing\n\n# Test connection to Matrix server\nuv run python test_client.py\n\n# Run pre-commit checks\nuv run pre-commit run --all-files\n```\n\n## License\n\nMIT\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A Terminal UI for Matrix chat - simple and AI-friendly",
    "version": "0.9.0",
    "project_urls": {
        "Documentation": "https://github.com/basnijholt/matty#readme",
        "Homepage": "https://github.com/basnijholt/matty",
        "Issues": "https://github.com/basnijholt/matty/issues",
        "Repository": "https://github.com/basnijholt/matty"
    },
    "split_keywords": [
        "ai-friendly",
        " chat",
        " cli",
        " client",
        " matrix"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "6c162e662263e7a74a7081caa48864f8d0da938c0fddc5d5255319a14e68fea5",
                "md5": "e36391443bb94a61617cd4948d092db6",
                "sha256": "abda9ab3f72001e85a66765a4f2c481e929786f83a3c9d1c2af02c55dc06b528"
            },
            "downloads": -1,
            "filename": "matty-0.9.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e36391443bb94a61617cd4948d092db6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.12",
            "size": 18651,
            "upload_time": "2025-08-24T19:52:04",
            "upload_time_iso_8601": "2025-08-24T19:52:04.753311Z",
            "url": "https://files.pythonhosted.org/packages/6c/16/2e662263e7a74a7081caa48864f8d0da938c0fddc5d5255319a14e68fea5/matty-0.9.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "7846d6b63da9b3721f04217f15ebff9079b8bae48f162cdb032d1bbd35a3bf3b",
                "md5": "d44e1fc95eab8cafb8146a66b5c3b983",
                "sha256": "4bd2bf8a8473a9f329fcf168037e46d6b68bda511a37473b6b33da4683d690a6"
            },
            "downloads": -1,
            "filename": "matty-0.9.0.tar.gz",
            "has_sig": false,
            "md5_digest": "d44e1fc95eab8cafb8146a66b5c3b983",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.12",
            "size": 23860,
            "upload_time": "2025-08-24T19:52:06",
            "upload_time_iso_8601": "2025-08-24T19:52:06.186580Z",
            "url": "https://files.pythonhosted.org/packages/78/46/d6b63da9b3721f04217f15ebff9079b8bae48f162cdb032d1bbd35a3bf3b/matty-0.9.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-24 19:52:06",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "basnijholt",
    "github_project": "matty#readme",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "matty"
}
        
Elapsed time: 9.58368s