Skip to content

Releases: noc0dev/fastmail-cli

v0.2.3

10 Feb 09:23
b43a4d1

Choose a tag to compare

What's new

email.get --fetch-all-body-values (#11)

Exposes JMAP's fetchAllBodyValues: true (RFC 8621) as a CLI flag. Without this, bodyValues always returned {} even when included in --properties.

email.read convenience command (#11)

New command that returns subject, from, to, plain text body, and attachment metadata in a single call — the most common "read an email" use case.

blob.download command (#12)

Downloads a blob to a local file using the JMAP downloadUrl template (RFC 8620 §6.2). Returns a JSON envelope with bytesWritten, sha256, and output path. URI template variables are properly percent-encoded per RFC 6570.

Agent workflow: read email + download attachments

# Step 1: Read email, discover attachments
fastmail-cli email.read --id M123
# → data.attachments[0] = {blobId: "G...", name: "invoice.pdf", ...}

# Step 2: Download
fastmail-cli blob.download --blob-id "G..." --name "invoice.pdf" \
  --type "application/pdf" --output "./invoice.pdf"

Bug fixes

  • pipeline.run no longer crashes when --json is omitted (#11)
  • Proper percent-encoding of downloadUrl template variables (#12)

Full changelog: v0.2.2...v0.2.3

v0.2.2

07 Feb 05:35
b9f7617

Choose a tag to compare

Security

  • Redact API token from JSON output. The envelope() function previously included the raw api_token in every response's "args" field. All output now shows "**REDACTED**" instead of the actual token value. (#10)

Docs

  • Expanded AGENTS.md with project structure, security conventions, and contribution guidance.

v0.2.0

20 Jan 22:13
7337889

Choose a tag to compare

What's New

Draft Commands (Safe for AI Agents)

  • email.draft - Create new draft emails without sending
  • email.draft-reply - Create draft replies to existing emails with auto-threading

Features

  • Auto-sets In-Reply-To and References headers for proper threading
  • Auto-prefixes Re: to subject when replying
  • --reply-all flag to include all original recipients
  • --from flag to specify sender identity
  • --to and --subject overrides

Safety Model

Drafts are created using Email/set only - never EmailSubmission/set. Even with a write-enabled token, the CLI cannot send emails. Humans review drafts in Fastmail UI before sending.

Other Changes

  • Renamed FASTMAIL_READONLY_API_TOKENFASTMAIL_API_TOKEN (backwards compatible)
  • Fixed @file/@- body input to read plain text (not JSON)
  • CLI help now shows fastmail-cli instead of jmapc-cli

Example Usage

# Create a draft reply
fastmail-cli email.draft-reply \
  --id "M12345" \
  --body "Thanks for reaching out..." \
  --from "[email protected]"

# Create a new draft
fastmail-cli email.draft \
  --to "[email protected]" \
  --subject "Hello" \
  --body @message.txt

Full Changelog: v0.1.1...v0.2.0

v0.1.1 - Fix PyPI README images

20 Jan 20:27

Choose a tag to compare

Changes

  • Fix README images on PyPI by using absolute raw.githubusercontent.com URLs
  • PyPI doesn't support relative image paths in README

Full Changelog: v0.1.0...v0.1.1

v0.1.0 - Initial Release

20 Jan 20:22
85d4f7d

Choose a tag to compare

Initial Release

Read-only CLI for AI agents to access Fastmail via JMAP.

Features

  • email.query - Query emails with filters and limits
  • email.get - Get email by ID with full content
  • email.changes - Track email changes since a state
  • mailbox.query - List mailboxes
  • thread.get - Get email threads
  • searchsnippet.get - Get search snippets
  • events.listen - Stream real-time events (SSE)
  • pipeline.run - Run raw JMAP pipelines

Installation

uv add fastmail-cli

Or run without installing:

uvx fastmail-cli help

Required Reading