Repository navigation
Releases: kvnwdev/protoncli
Release list
v0.4.4
Highlights
- Stable folder reads and safer nested-folder management.
- Multi-folder message location tracking and verified, retry-safe moves.
- Bulk mutations above 50 messages now require
--execute; drafts remain safe previews. readchanges local agent-read state only with--mark-agent-read.- Added a signed local macOS install workflow for stable Keychain access.
This source release supports Homebrew builds. For a personal signed install, run scripts/install-signed-local.sh from the checkout.
v0.4.2 - Security Hardening
Security Fixes
This release addresses findings from a security audit:
| Severity | Issue | Fix |
|---|---|---|
| HIGH | SecurityType::None allowed insecure connections |
Removed entirely - all connections now require TLS |
| MEDIUM | IMAP query injection via control characters | Now filters \r, \n, and \0 from queries |
| MEDIUM | Path traversal in attachments | Paths are canonicalized and verified as regular files |
| MEDIUM | Passwords stored in plaintext memory | Now uses SecretString with automatic zeroing on drop |
New Features
- Multi-folder query support - Query across multiple IMAP folders in a single command
# Using in:folder syntax protoncli query "from:alice in:Sent in:Archive" # Using --folder flags protoncli query "from:alice" -F Sent -F Archive
- Automatic deduplication by message ID when querying multiple folders
- Results sorted by date (newest first) across all folders
Changes
- Added
secrecycrate for secure credential handling - Added documentation for TLS certificate bypass rationale (localhost Bridge connections)
- Pre-commit hook for
cargo fmtenforcement
Upgrade
brew upgrade protoncliFull Changelog: v0.4.1...v0.4.2
v0.4.1
Bug Fixes
-
Fix inbox count inconsistency: Resolved issue where inbox counts varied between calls due to
async-imapENVELOPE parser failing on Unicode characters (e.g., smart apostrophe in "Arby's"). Switched tomail-parserfor robust header parsing. -
Fix selection not persisting: Selection now properly stores and retrieves shadow UIDs, fixing the issue where
select showreturned empty results. -
Fix preview showing raw HTML: Preview extraction now properly handles MIME content to show actual text instead of raw HTML.
Technical Changes
- Switch from ENVELOPE to BODY.PEEK[HEADER] parsing with mail-parser
- Use RFC822 + mail-parser for preview extraction
- Add FetchStats for diagnostic output in JSON responses
- Set FETCH_BATCH_SIZE to 25 for batched IMAP operations
Full Changelog
v0.3.5: Fix critical query filtering bugs
Summary
Critical bugfix release that fixes all query filtering issues.
What's Fixed
- ✅
from:filter now correctly returns emails from the specified sender - ✅
subject:filter now correctly returns emails with the specified subject - ✅ Inbox count is now consistent between calls
- ✅ Queries now find emails immediately after move operations
Root Cause
The IMAP client was using search() which returns sequence numbers, but then passing those to uid_fetch() which expects UIDs. Changed to uid_search() to fix.
Full Changelog
v0.3.0: Batch Operations with Selection System
What's New
This release adds a selection-based workflow for batch message operations, with a draft/intent system for staging actions before execution.
New Commands
-
query: Search messages with Gmail-style syntaxprotoncli query "from:alice subject:report" # Search and display protoncli query "from:alice" --fields uid,subject,from # Specific fields protoncli query "from:alice" --select # Add to selection
-
select: Manage message selectionprotoncli select add 123 456 789 # Add specific UIDs protoncli select last # Add from last query protoncli select show # View selection protoncli select clear # Clear selection protoncli select count # Count selected
-
draft: View and manage pending operationsprotoncli draft show # View current draft protoncli draft clear # Clear draft without executing
Updated Action Commands
All action commands (move, copy, delete, archive, flag) now support:
| Flag | Description |
|---|---|
--selection |
Use selection instead of UIDs |
--draft |
Stage action without executing; shows preview |
--keep |
Preserve selection after action (default: clear) |
Example Workflows
Batch mark as read:
protoncli query "unread:true AND date:>2025-01-01" --select
protoncli select show
protoncli flag --selection --read --draft # Preview
protoncli flag # ExecuteIncremental selection:
protoncli query "from:newsletter@example.com" --select
protoncli query "from:updates@example.com" --select
protoncli select add 101 102 103
protoncli archive --selectionTechnical Details
- Selection persists across CLI invocations via SQLite
- Draft system supports flag merging (OR logic for booleans, concatenate arrays)
- Batch processing chunks large UID lists for reliable IMAP operations
- New database migration (003) adds selections, query_history, and drafts tables
Full Changelog: v0.2.0...v0.3.0
v0.2.0
New Features
Message Management Commands
-
move- Move messages between foldersprotoncli move 12345 --to Archive protoncli move 12345 12346 --to "Labels/Work" --from INBOX -
copy- Copy messages to another folderprotoncli copy 12345 --to "Labels/Important" -
delete- Delete messages (soft or permanent)protoncli delete 12345 # Move to Trash protoncli delete 12345 --permanent --yes # Permanent delete
-
archive- Shortcut to move messages to Archiveprotoncli archive 12345
-
flag- Modify message flags and optionally moveprotoncli flag 12345 --read --starred protoncli flag 12345 --label Work --label Urgent --move Archive
Improved State Tracking
- Agent read status now uses
message_idas the stable identifier - Read status persists when messages are moved between folders
- Automatic migration from old schema
All Commands Support
- Multiple UIDs in a single command
--fromto specify source folder (defaults to INBOX)--output jsonfor machine-readable output