hey compose --json should return a send receipt (thread id, urls, envelope)

Open
#468 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
go
Domain
cli

Research direction

Start by locating the hey compose --json and --quiet success and failure output paths, then inspect how hey reply and --ids-only are handled. Define a stable post-send receipt containing the requested identifiers, URLs, resolved recipients, subject, and timestamp while preserving non-zero structured failures; verify the output for successful and failed sends.

Written by the indexing model from the issue text.

Description

Context

Automation that sends with hey compose --json currently gets a success envelope (ok / a short summary) and nothing that identifies the message that was just created. Scripts already know --to and --subject because they passed them in; they do not get thread_id / topic_id, an app_url, the resolved from, or created_at.

To attach a send to a later hey thread or hey reply, the only workaround is a second search (usually --to the same address) and hoping the newest hit is the one just sent. That is racy and extra API traffic.

Related: #446 asks for a pre-send dry-run of resolved recipients. This request is the post-send receipt.

No account-specific details below.

Ask

On a successful hey compose (and ideally hey reply) with --json / --quiet, return a stable receipt, for example:

  • thread_id / topic_id
  • message_id if that is a distinct object
  • app_url (and/or API url) for the thread
  • resolved from, to, cc, bcc
  • subject
  • created_at

On failure, keep a non-zero exit and include enough structured error to log without scraping stderr.

--ids-only after a send could print the new thread id.

Why it matters

Agent and campaign scripts need to write a complete send log in the same process as the send. A receipt makes that one step instead of compose + search + guess.

Dominant language
Go
Stars
376
Forks
44
Avg merge
1d 5h
Merged PRs (30d)
130

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from basecamp/hey-cli

All issues in basecamp/hey-cli

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.