Repository navigation
feat(cli): add list subcommand - #1752
Open
Robin-Everaars wants to merge 2 commits into
Open
Robin-Everaars wants to merge 2 commits into
Robin-Everaars wants to merge 2 commits into
Conversation
Add `matcha folders [--from <email>] [--json]`, the first read-only mail command next to `send`. The shared plumbing for the follow-up commands lives in cli/util.go (account resolution by --from, matching Email and then FetchEmail case-insensitively) and cli/main.go (hookable config loader, service constructor and output writers for tests). daemonclient gains NewCLIClient(cfg, autoStart). With autoStart off, a one-shot command uses a running daemon and otherwise connects directly instead of forking a daemon. NewService keeps its behaviour. Refs floatpane#1642
Add `matcha list [folder] [--from <email>] [--json]`, which prints the newest 50 messages of a folder (INBOX by default) as a table or as JSON with uid, from, subject, date and is_read. Adds the helpers the later read, search and manage commands share: INBOX normalization, flag parsing that allows flags after positionals, and the table/JSON email renderer. Refs floatpane#1642
This was referenced Oct 27, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Adds
matcha list [folder] [--from <email>] [--json]. It prints the newest 50 messages of a folder (INBOX by default) as a table, or as JSON withuid,from,subject,dateandis_read.It also adds helpers that read, search and manage reuse: INBOX normalization, flag parsing that accepts flags after positionals and the table/JSON renderer.
Why?
Part of #1642. Depends on #1751.
This is one of five small PRs that replace #1680, as asked there: rebuilt on
release/v1and split per command. They stack, so please merge them in order. Each one shows its predecessors' commits until those are merged.Every step passes
gofmt,go vet,go test ./...,go mod tidyand golangci-lint on the new code.