Releases: marcfargas/go-easy
v0.4.0
Minor Changes
-
#3
5a516d5Thanks @marcfargas! - Add--format=text,--format=html, and--format=sane-htmltogo-gmail get— extract message body directly without parsing the full JSON response.--format=text— plain text body--format=html— raw HTML body--format=sane-html— HTML with<script>, event handlers,javascript:hrefs, anddata:image URIs stripped (safe to render)
All formats support
--output=<path>and--b64encode, matching the existing--format=emlcontract.New library export:
sanitizeEmailHtml(html)from@marcfargas/go-easy/gmail.
New dependency:sanitize-html. -
#3
5a516d5Thanks @marcfargas! - Add--format=emlforgo-gmail getand--format=mboxforgo-gmail thread— download raw RFC 2822 email or full thread as mbox.New output modes work with
--output=<path>(write to file) and--b64encode(base64 JSON, agent-safe), or pipe raw bytes directly to stdout.This also fixes retrieval of
message/rfc822embedded attachments (forwarded .eml files) which previously failed with "Invalid attachment token" —--format=emlreturns the complete outer message via Gmail'sformat=rawAPI, bypassing the brokenattachments.getendpoint.New library exports:
getMessageRaw(auth, messageId),getThreadMbox(auth, threadId, fromAddress).
Patch Changes
-
#3
5a516d5Thanks @marcfargas! - Internal code quality improvements — no behaviour changes.- Extract
gmailApiandhandleApiErrortosrc/gmail/api.ts(eliminates duplication betweenindex.tsandraw.ts) - Extract
parseFlagsandreadBodyFlagstosrc/bin/gmail-flags.ts(enables proper test imports) - Extract
serializeMimePart()MIME helper (eliminates copy-paste betweenbuildMimeMessageandbuildForwardMime) - Remove unused
lookupimport fromhelpers.ts - Fix
handleRawOutputreturn type annotation
- Extract
v0.3.1
Patch Changes
- Fix encoding of non-ASCII display names in email address headers (From, To, Cc, Bcc). Characters like "Júlia" were corrupted due to missing RFC 2047 encoding — now properly encoded as
=?UTF-8?B?...?=.
v0.3.0
Minor Changes
-
8cf8524Thanks @marcfargas! - Beta release — own auth system, Google Tasks, reply CLI, file-based body flags, Markdown emails.Auth (BREAKING)
go-easy now owns its own OAuth2 tokens at
~/.go-easy/instead of reading from legacy CLI stores (~/.gmcli,~/.gdcli,~/.gccli).npx go-easy auth add <email>— agent-compatible two-phase OAuth flow (start → poll)npx go-easy auth list— list configured accounts and scopesnpx go-easy auth remove <email> --confirm— remove an account- One combined token per account covers Gmail + Drive + Calendar + Tasks
- Specific error codes with
fixfield:AUTH_NO_ACCOUNT,AUTH_MISSING_SCOPE,AUTH_TOKEN_REVOKED,AUTH_NO_CREDENTIALS
Google Tasks (NEW)
New service module and CLI for Google Tasks API:
npx go-tasks <account> lists— list task listsnpx go-tasks <account> tasks <listId>— list tasks with paginationnpx go-tasks <account> get/add/update/complete/move/delete— full CRUDnpx go-tasks <account> create-list/delete-list/clear— list management- Subtask support via
--parentflag - Library:
@marcfargas/go-easy/tasksexport - Requires re-auth for existing accounts (
npx go-easy auth add <email>)
Gmail CLI
- Add
replycommand — reply and reply-all with--reply-allflag (DESTRUCTIVE, requires--confirm) - Add
--in-reply-toflag fordraftcommand (thread association) - Add
--ccand--bccflags fordraftandsendcommands - Add
--page-tokenforsearchanddraftspagination
Body Flags (BREAKING)
Replace inline
--body,--html,--mdflags with file-based alternatives:--body-text-file=<path>— read plain text body from UTF-8 file--body-html-file=<path>— read HTML body from UTF-8 file--body-md-file=<path>— read Markdown body from file (auto-converted to HTML)
This eliminates shell escaping, encoding, and multiline issues for agent use.
Markdown Email Support
- New
markdownoption onsend,reply,forward, andcreateDraft - Auto-converts Markdown to email-safe HTML with inline styles
- GFM support: tables, strikethrough, code blocks, links, lists
markdownToHtml()helper exported from@marcfargas/go-easy/gmail
Forward Improvements
- Forward creates a draft by default (WRITE, no safety gate)
--send-now --confirmto send immediately (DESTRUCTIVE)- Attachment filtering:
--include=nameand--exclude=name(substring match) --no-threadto break out of the original thread- Body content appears above the forwarded message
Calendar
- Support all event types: working location, out-of-office, focus time, birthday
--page-tokenfor events pagination- Fix
updatecommand: use PATCH instead of PUT to prevent data loss on partial updates
Drive
--page-tokenforlsandsearchpagination
Fixes
- RFC 2047 encode Subject headers with non-ASCII characters
- Fix forward threading (keep in original thread by default)
- Fix auth HTML pages: add
<meta charset="utf-8">for emoji rendering
v0.2.0
Minor Changes
-
5f424e1Thanks @marcfargas! - Initial release — Gmail, Drive & Calendar APIs for AI agents and humans.- Gmail: search, getMessage, getThread, send, reply, forward, createDraft, sendDraft, listDrafts, listLabels, batchModifyLabels, getAttachmentContent, getProfile
- Drive: listFiles, searchFiles, getFile, downloadFile, exportFile, uploadFile, createFolder, moveFile, renameFile, copyFile, trashFile, listPermissions, shareFile, unshareFile
- Calendar: listCalendars, listEvents, getEvent, createEvent, updateEvent, deleteEvent, queryFreeBusy
- Gateway CLIs: go-gmail, go-drive, go-calendar (JSON output, --confirm safety)
- Safety model: READ/WRITE/DESTRUCTIVE operation classification
- Auth: multi-account OAuth2 with per-service token stores