From 400ff5541977f510cae0a999677a93587f5ea085 Mon Sep 17 00:00:00 2001 From: Steve Yegge Date: Thu, 18 Dec 2025 19:42:37 -0800 Subject: [PATCH] fix: use bd mail instead of bd message MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The bd CLI renamed 'message' subcommand to 'mail'. Updated gt mail to call the correct bd subcommand, and fixed body to use -m flag instead of positional argument. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- internal/mail/mailbox.go | 8 ++++---- internal/mail/router.go | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/internal/mail/mailbox.go b/internal/mail/mailbox.go index d9554824..14dd7b77 100644 --- a/internal/mail/mailbox.go +++ b/internal/mail/mailbox.go @@ -72,8 +72,8 @@ func (m *Mailbox) List() ([]*Message, error) { } func (m *Mailbox) listBeads() ([]*Message, error) { - // bd message inbox --json - cmd := exec.Command("bd", "message", "inbox", "--json") + // bd mail inbox --json + cmd := exec.Command("bd", "mail", "inbox", "--json") cmd.Dir = m.workDir cmd.Env = append(cmd.Environ(), "BD_IDENTITY="+m.identity) @@ -173,7 +173,7 @@ func (m *Mailbox) Get(id string) (*Message, error) { } func (m *Mailbox) getBeads(id string) (*Message, error) { - cmd := exec.Command("bd", "message", "read", id, "--json") + cmd := exec.Command("bd", "mail", "read", id, "--json") cmd.Dir = m.workDir var stdout, stderr bytes.Buffer @@ -221,7 +221,7 @@ func (m *Mailbox) MarkRead(id string) error { } func (m *Mailbox) markReadBeads(id string) error { - cmd := exec.Command("bd", "message", "ack", id) + cmd := exec.Command("bd", "mail", "ack", id) cmd.Dir = m.workDir var stderr bytes.Buffer diff --git a/internal/mail/router.go b/internal/mail/router.go index 7f859362..a8a22014 100644 --- a/internal/mail/router.go +++ b/internal/mail/router.go @@ -31,9 +31,10 @@ func (r *Router) Send(msg *Message) error { toIdentity := addressToIdentity(msg.To) fromIdentity := addressToIdentity(msg.From) - // Build command: bd message send -s - args := []string{"message", "send", toIdentity, msg.Body, + // Build command: bd mail send -s -m + args := []string{"mail", "send", toIdentity, "-s", msg.Subject, + "-m", msg.Body, } // Add importance flag for high priority