Skip to content

Commit 1e71dc6

Browse files
feat: show message id and open email button, fix chocolatey validation
1 parent 915634c commit 1e71dc6

4 files changed

Lines changed: 27 additions & 7 deletions

File tree

.goreleaser.yaml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,16 @@ chocolateys:
6868
- name: fce
6969
owners: DishIs
7070
authors: DishIs
71+
title: "FreeCustom.Email CLI"
72+
description: "Manage disposable inboxes, extract OTPs, and stream real-time email events from your terminal."
73+
summary: "FreeCustom.Email CLI — Disposable Email API"
7174
project_url: "https://github.com/DishIs/fce-cli"
72-
description: "FreeCustom.Email CLI — Manage disposable inboxes from your terminal."
73-
summary: "FreeCustom.Email CLI"
75+
icon_url: "https://github.com/DishIs.png"
76+
license_url: "https://github.com/DishIs/fce-cli/blob/main/LICENSE"
77+
docs_url: "https://github.com/DishIs/fce-cli/blob/main/README.md"
78+
bug_tracker_url: "https://github.com/DishIs/fce-cli/issues"
79+
package_source_url: "https://github.com/DishIs/fce-cli"
80+
project_source_url: "https://github.com/DishIs/fce-cli"
81+
release_notes: "https://github.com/DishIs/fce-cli/releases/tag/{{ .Tag }}"
82+
tags: "cli email disposable-email otp websocket"
7483
api_key: "{{ .Env.CHOCOLATEY_API_KEY }}"

cmd/root.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,12 +376,14 @@ var messagesCmd = &cobra.Command{
376376
if !ok {
377377
continue
378378
}
379+
id := strVal(m, "id")
379380
from := strVal(m, "from")
380381
subject := strVal(m, "subject")
381382
date := strVal(m, "date")
382383
otp := strVal(m, "otp")
383384

384385
display.Table([]display.Row{
386+
{Key: "ID", Value: id},
385387
{Key: "From", Value: from},
386388
{Key: "Subject", Value: subject},
387389
{Key: "Date", Value: date},

internal/display/logo.go

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,19 +149,27 @@ func PlanBadge(plan string) string {
149149

150150
// ── Live event (for watch) ────────────────────────────────────────────────────
151151

152-
func EmailEvent(from, subject, otp, link string, timestamp string) {
152+
func EmailEvent(id, from, subject, otp, link string, timestamp string) {
153153
div := styleDim.Render(strings.Repeat("─", 52))
154154
fmt.Println()
155155
fmt.Println(div)
156+
fmt.Printf(" %s %s\n", styleDim.Render("ID "), styleDim.Render(id))
156157
fmt.Printf(" %s %s\n", styleDim.Render("FROM"), styleBright.Render(from))
157158
fmt.Printf(" %s %s\n", styleDim.Render("SUBJ"), styleMuted.Render(subject))
158159
fmt.Printf(" %s %s\n", styleDim.Render("TIME"), styleDim.Render(timestamp))
159-
if otp != "" && otp != "__DETECTED__" && otp != "null" {
160+
if otp != "" {
160161
otpVal := styleAccent.Render(otp)
161162
fmt.Printf(" %s %s\n", styleBright.Render("OTP "), otpVal)
162163
}
163-
if link != "" && link != "null" {
164-
fmt.Printf(" %s %s\n", styleDim.Render("LINK"), styleDim.Render(link))
164+
if link != "" {
165+
// Render as a "button" like link
166+
button := lipgloss.NewStyle().
167+
Foreground(lipgloss.Color("0")).
168+
Background(lipgloss.Color("255")).
169+
Padding(0, 1).
170+
Bold(true).
171+
Render("OPEN EMAIL")
172+
fmt.Printf("\n %s %s\n", button, styleDim.Render(link))
165173
}
166174
fmt.Println(div)
167175
fmt.Println()

internal/ws/watch.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,11 @@ func Watch(apiKey, mailbox string) error {
116116

117117
default:
118118
// Email event
119+
id := event.ID
119120
otp := safeStr(event.OTP)
120121
link := safeStr(event.VerificationLink)
121122
ts := formatTimestamp(event.Date)
122-
display.EmailEvent(event.From, event.Subject, otp, link, ts)
123+
display.EmailEvent(id, event.From, event.Subject, otp, link, ts)
123124
}
124125
}
125126
}

0 commit comments

Comments
 (0)