CLI for AI agents to access Fastmail via JMAP - draft responses without sending
Project description
fastmail-cli
Read-only email access for AI agents via JMAP, and draft responses.
Demo
Installation
uv add fastmail-cli
Or run without installing:
uvx fastmail-cli help
Setup
export FASTMAIL_API_TOKEN="fmu1-..." # from Fastmail Settings → Integrations
Usage
fastmail-cli help # list commands
fastmail-cli email.query --limit 5 # recent emails
fastmail-cli email.get --ids '["M123"]' # get by ID
fastmail-cli mailbox.query # list mailboxes
Create Drafts (Safe for AI Agents)
# Create a draft - human reviews in Fastmail UI before sending
fastmail-cli email.draft \
--to "recipient@example.com" \
--subject "Re: Your question" \
--body "Here's the response..."
# Draft with body from file
fastmail-cli email.draft \
--to "user@example.com" \
--subject "Report" \
--body @report.txt
Draft Replies to Existing Emails
# Reply to an email (auto-threads, auto-sets subject)
fastmail-cli email.draft-reply \
--id "M12345" \
--body "Thanks for reaching out..."
# Reply-all to include all original recipients
fastmail-cli email.draft-reply \
--id "M12345" \
--body "Replying to everyone..." \
--reply-all
All output is JSON with ok, command, meta, and data/error fields.
Required Reading
License
Apache 2.0
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fastmail_cli-0.2.0.tar.gz
(3.4 MB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fastmail_cli-0.2.0.tar.gz.
File metadata
- Download URL: fastmail_cli-0.2.0.tar.gz
- Upload date:
- Size: 3.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2e0605c4846b5907b87a8fc24932d86498d8dcbfd717687b05b7134c92d8e91
|
|
| MD5 |
dc589d1920ea0273511d87b596144b2c
|
|
| BLAKE2b-256 |
9849238f3467aaa5eb7415e136de93f4b6bda16ce8a2bc4a9341db2d74616995
|
File details
Details for the file fastmail_cli-0.2.0-py3-none-any.whl.
File metadata
- Download URL: fastmail_cli-0.2.0-py3-none-any.whl
- Upload date:
- Size: 15.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
831c4583bf64765108623bb89acd578d7438afbb12670724b7101d273a019451
|
|
| MD5 |
8ed963ce0b791eac3d47b36c95a63576
|
|
| BLAKE2b-256 |
3fdba5e4940a57a400d6cb93a3fe91b897d703274343a0bf050e8fd9fdf3fd2f
|