Mail CLI
Mail CLI - An open-source email command-line tool for managing emails from the terminal.
Documentation
- Chinese product standard doc:
docs/README.zh-CN.md - Chinese command reference:
docs/COMMANDS.zh-CN.md - Release guide (Chinese):
docs/RELEASING.zh-CN.md - Changelog:
CHANGELOG.md - Requirements issues:
https://github.com/andyWang1688/mailcli/issues?q=is%3Aissue+is%3Aopen+label%3Arequirement - Bug issues:
https://github.com/andyWang1688/mailcli/issues?q=is%3Aissue+label%3Abug
Quick Start
Installation
Preferred installation method: pip direct install.
Option A: Install from PyPI (target release channel)
pip install exmail-cli
After publishing to PyPI, this is the recommended way for all users.
The installed CLI command remains mailcli.
Publishing strategy: merge to main does not publish; pushing a version tag like v0.1.0 publishes to PyPI.
Option B: Install from local source (current development stage)
cd ~/Downloads/mailcli
python3.13 -m venv .venv
source .venv/bin/activate
python -m pip install -U pip
pip install .
Verify installation:
mailcli --help
Configuration
Copy the example configuration to your home directory:
mkdir -p ~/.config/mailcli
cp config/config.example.toml ~/.config/mailcli/config.toml
Edit the configuration file with your email account details:
default_account = "exmail-main"
[accounts.exmail-main]
email = "your.name@example.com"
use_ssl = true
[accounts.exmail-main.imap]
host = "imap.exmail.qq.com"
port = 993
[accounts.exmail-main.smtp]
host = "smtp.exmail.qq.com"
port = 465
[accounts.exmail-main.auth]
raw = "your_app_password_or_token"
[quirks]
provider = "exmail"
Usage
Detailed command guide (Chinese):
docs/COMMANDS.zh-CN.md
Architecture
docs/plan/: execution plans and milestonesdocs/architecture/: architecture and directory conventionssrc/mailcli/core/: business logicsrc/mailcli/providers/: provider-specific quirks (e.g., Exmail)src/mailcli/infra/: infrastructure (IMAP/SMTP, config, output)tests/: unit and integration tests
Development
Run tests:
source .venv/bin/activate
python -m pytest tests/ -v
# Or use the test script
./test.sh
See TESTING.md for detailed test coverage.
Current Status (v0.1)
Completed (M1-M3)
-
M1: CLI + Config + Diagnostics
- CLI framework with command groups
- Configuration loading (TOML)
- Error handling and output formatting (plain/json)
- IMAP/SMTP connection adapters
- Account management (list, default, diagnose)
-
M2: IMAP Operations
- Envelope list and search
- Message read
- Attachment list and download
-
M3: SMTP Operations
- Message send
Summary
- 13 Python source files (~1200 lines)
- 3 test files with 14 tests
- Full support for Exmail IMAP/SMTP workflows
- All core commands support
--output json
Next Steps
- Additional provider support (Gmail, M365)
- Folder management
- Flag operations
- Message operations (write, reply, forward)
- HTML email support
- Multiple attachments
Metadata
Release files for exmail-cli 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 | Provenance | Actions |
|---|---|---|---|---|
| exmail_cli-0.1.0.tar.gz | 14.7 kB | Without provenance | Details for exmail_cli-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| exmail_cli-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for exmail_cli-0.1.0-py3-none-any.whl |
Total release size: 30.0 kB
Release files / exmail_cli-0.1.0.tar.gz
| Download URL | exmail_cli-0.1.0.tar.gz |
|---|---|
| Size | 14.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1aea709f77139f9eec6e883968fc090fdf81540d46ed81253dd43c7abf9ed63f
|
|
BLAKE2b-256 checksum How to use checksums |
9ec0a9456ad3ce3b8caa91ae2a71b796a52b0254ae26b5f1ada0da005e3e8c07
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / exmail_cli-0.1.0-py3-none-any.whl
| Download URL | exmail_cli-0.1.0-py3-none-any.whl |
|---|---|
| Size | 15.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
aa62e3cd40ee9d55f7eaf15531b4dee728e99f29055c980ed08d6f995491ac14
|
|
BLAKE2b-256 checksum How to use checksums |
4d55136c3901e905e64e41244358bb6e44377da1539c8ab10e53178198631dfa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Security for exmail-cli 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.