Metadata-Version: 2.4
Name: mattermost-cli
Version: 0.0.2
Summary: Mattermost CLI for humans and agents
Project-URL: Homepage, https://github.com/rhnvrm/mattermost-cli
Project-URL: Repository, https://github.com/rhnvrm/mattermost-cli
Project-URL: Issues, https://github.com/rhnvrm/mattermost-cli/issues
Author-email: Rohan Verma <hello@rohanverma.net>
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Communications :: Chat
Requires-Python: >=3.9
Requires-Dist: click>=8.0
Requires-Dist: httpx<1.0.0,>=0.20.0
Requires-Dist: mattermostdriver>=7.3
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == 'dev'
Description-Content-Type: text/markdown

# mattermost-cli

Mattermost CLI for humans and agents.

## Install

```bash
# via uvx (recommended)
uvx mattermost-cli --help

# or pip
pip install mattermost-cli
```

## Setup

```bash
# Interactive login (password + MFA)
mm login

# Or with a Personal Access Token
mm login --token <your-pat>

# Verify
mm whoami
```

## Usage

```bash
# List channels
mm channels

# Show unread messages
mm unread

# Read messages from a channel
mm messages general
mm messages general --since 1h
mm messages @username          # DM with a user

# Read a thread
mm thread <post-id>

# Search
mm search "deployment issue"
mm mentions
```

## Options

```
--human    Human-readable markdown output (default is JSON)
--team     Filter to a specific team
--debug    Enable debug output
```

## Auth

Two methods supported:

**Password + MFA** (primary): `mm login` prompts interactively. Session token
is stored locally - password is never saved to disk. When the session expires,
run `mm login` again.

**Personal Access Token** (optional): `mm login --token <pat>`. Requires admin
to enable PATs on the Mattermost server. Tokens don't expire.

Credentials stored at `~/.config/mm/config.json` (token only, 600 permissions).

Environment variables override config: `MATTERMOST_URL`, `MATTERMOST_TOKEN`,
`MATTERMOST_TEAM`.

## License

MIT
