Liametahi
An AI-powered mailbox cleanup tool for IMAP. Point it at an inbox and it can:
- Trash, move, label, or route mail using both plain conditions (sender, age, size, headers) and an AI's answer to a question you write ("is this spam?", "how urgent is this?")
- Preview any run with
--dry-run, back up before deleting, and restore anytime - Run unattended on a schedule — locking, crash recovery, and a report of every past run
- Mix a fast/cheap model with a slower one, only escalating the mail the first pass is unsure about
processors:
vibe-check:
model: local
type: noul
instructions: A newsletter or digest with nothing time-sensitive left in it.
tasks:
inbox-cleanup:
account: personal
source_mailboxes: [INBOX]
rules:
- when:
- older-than: 30d
- processor: "vibe-check.value >= 0.9"
actions: [backup, trash]
Install
Needs Python ≥ 3.14, uv, an IMAP account, and
a model endpoint — an OpenAI-compatible chat API, Anthropic, or a
Jev-compatible API.
uv tool install liametahi
liametahi --help
Running from a source checkout instead? See docs/development.md.
Usage
liametahi config check [--connect]
liametahi run TASK [--dry-run] [--fail-fast] [--reevaluate] [--wait SECONDS] [--format table|json] [--verbose]
liametahi report [RUN_ID] [--list] [--task TASK] [--format table|json] [--verbose]
liametahi restore BACKUP_ID --mailbox MAILBOX [--account NAME] [--dry-run]
--config PATH works on every subcommand. Run/backup ids are short strings
(4w8wbbs3fs); type any unambiguous leading prefix (eg. 4w8b).
Quickstart
curl -o config.yaml https://raw.githubusercontent.com/4piu/liametahi/master/config.example.yaml
$EDITOR config.yaml # at least an account and a model
chmod 600 config.yaml
liametahi config check --connect
liametahi run inbox-classify --dry-run --verbose # preview, no mutation
liametahi run inbox-classify # for real
liametahi report # review the last run
liametahi restore 4w8w --mailbox INBOX # undo a trash
See docs/configuration.md for every key and how conditions/rules compose. Config file location, first match wins:
--config PATH$LIAMETAHI_CONFIG$(pwd)/config.yaml~/.config/liametahi/config.yaml(Linux);~/Library/Application Support/liametahi(macOS);%LOCALAPPDATA%\liametahi(Windows)
Documentation
- docs/configuration.md — full config key reference: accounts, models, processors, tasks, rule conditions.
- docs/internals.md — safety model, run phases, decision cache, and the reasoning behind each guarantee.
- docs/development.md — test tiers, running the suite, and live-mailbox testing.
Metadata
Release files for liametahi 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| liametahi-0.1.0.tar.gz | 268.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| liametahi-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 394.1 kB
Release files / liametahi-0.1.0.tar.gz
| Download URL | liametahi-0.1.0.tar.gz |
|---|---|
| Size | 268.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9020a5910f5988ec9a4143d4e8c8d479039ebb0f94810fe1f87c62241c315f75
|
|
BLAKE2b-256 checksum How to use checksums |
e2f310b2ef4667cde288a3ea58330a646389a195a80a665e4237c7b2e3f7128d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.18 {"installer":{"name":"uv","version":"0.12.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / liametahi-0.1.0-py3-none-any.whl
| Download URL | liametahi-0.1.0-py3-none-any.whl |
|---|---|
| Size | 125.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
954dd1c0b0db3f37fbbba3a69d29db422bbff11e2aba12a2cc2448b445b382bc
|
|
BLAKE2b-256 checksum How to use checksums |
bd5b861d9fddce7d0327191f609a8fdbca5a69ccb075bbc6f3eb49417a827761
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.18 {"installer":{"name":"uv","version":"0.12.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|