cli: add display name lookup to get-users#543
Merged
Conversation
Adds NIP-50 full-text search on kind:0 profiles with client-side case-insensitive substring filtering on display_name and name fields. sprout get-users --name "Bana" Mutually exclusive with --pubkey. Rejects empty queries. Output shape matches the existing --pubkey path (raw event array).
4e98024 to
a7f1105
Compare
This was referenced May 28, 2026
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.
Adds
--nameflag tosprout get-usersfor looking up user profiles by display name.What
sprout get-users --name "Bana"Searches kind:0 profile events via NIP-50 full-text search, then filters client-side for case-insensitive substring match on
display_nameandnamefields.Why
Agents and operators frequently need to resolve a human-readable display name to a hex pubkey — for example, to add teammates to a channel via
add_channel_member. Until now, this required knowing the pubkey upfront or manually inspecting channel member lists.Details
--pubkey(returns a clear error if both are provided)--namequeries--pubkeypath (raw event array from the relay)[]if the relay does not support NIP-50 search on kind:0