It is possible to list the key/name pairs like this:
> ipfs key list -l --ipns-base b58mh
12D3KooWF44SaSomGuUSNycgpkRwQcxcsMYeNbtn6XCHPR2ojodv self
12D3KooWMNrGeGSAMw64MCBsqiFy3B67vZb6bRmHnxsT9QazWBAL test1
12D3KooWSBaU3k8BSmKZS319v7uqHabrXqxidxAnveiL3NjfYZgm test2
12D3KooWDisrDBrcQfjGcYd7iGin8JoTmSMva5isCDuu9kieUR7H test3
It would be nice to add a way to get a key by name like:
> ipfs key get --name test2
12D3KooWSBaU3k8BSmKZS319v7uqHabrXqxidxAnveiL3NjfYZgm
Is it worth opening a feature request issue on kubo repo? I do not see an existing one.
PS: related to How IPNS, "ipfs key" keystore file name are made? which answers how to get the key in command line. It should also be possible via the RPC API.