Skip to content

v0.3.0: Batch Operations with Selection System

Choose a tag to compare

@kvnwdev kvnwdev released this 27 Jan 01:36
· 21 commits to main since this release

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