Skip to content

Releases: kvnwdev/protoncli

v0.4.4

Choose a tag to compare

@kvnwdev kvnwdev released this 24 Jul 16:03

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.
  • read changes 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

Choose a tag to compare

@kvnwdev kvnwdev released this 28 Jan 17:39

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 secrecy crate for secure credential handling
  • Added documentation for TLS certificate bypass rationale (localhost Bridge connections)
  • Pre-commit hook for cargo fmt enforcement

Upgrade

brew upgrade protoncli

Full Changelog: v0.4.1...v0.4.2

v0.4.1

Choose a tag to compare

@kvnwdev kvnwdev released this 27 Jan 18:45

Bug Fixes

  • Fix inbox count inconsistency: Resolved issue where inbox counts varied between calls due to async-imap ENVELOPE parser failing on Unicode characters (e.g., smart apostrophe in "Arby's"). Switched to mail-parser for robust header parsing.

  • Fix selection not persisting: Selection now properly stores and retrieves shadow UIDs, fixing the issue where select show returned 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.4.0...v0.4.1

v0.3.5: Fix critical query filtering bugs

Choose a tag to compare

@kvnwdev kvnwdev released this 27 Jan 16:38
54f193a

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.4...v0.3.5

v0.3.0: Batch Operations with Selection System

Choose a tag to compare

@kvnwdev kvnwdev released this 27 Jan 01:36

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 syntax

    protoncli 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 selection

    protoncli 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 operations

    protoncli 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                                  # Execute

Incremental selection:

protoncli query "from:newsletter@example.com" --select
protoncli query "from:updates@example.com" --select
protoncli select add 101 102 103
protoncli archive --selection

Technical 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

Choose a tag to compare

@kvnwdev kvnwdev released this 27 Jan 00:46

New Features

Message Management Commands

  • move - Move messages between folders

    protoncli move 12345 --to Archive
    protoncli move 12345 12346 --to "Labels/Work" --from INBOX
  • copy - Copy messages to another folder

    protoncli 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 Archive

    protoncli archive 12345
  • flag - Modify message flags and optionally move

    protoncli flag 12345 --read --starred
    protoncli flag 12345 --label Work --label Urgent --move Archive

Improved State Tracking

  • Agent read status now uses message_id as 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
  • --from to specify source folder (defaults to INBOX)
  • --output json for machine-readable output