neocities / neocities-ruby

The Neocities Gem - A CLI and library for using the Neocities web site API.
https://neocities.org
51 stars 14 forks source link

Remove Confusing String When Authenticating Through Password #55

Open zakuArbor opened 2 months ago

zakuArbor commented 2 months ago

There is a confusing string that is printed when you do not have the environment variable NEOCITIES_API_KEY set: Please login to get your API key:

$ neocities list
Please login to get your API key:
sitename: <random_site>
password: ••••••••••••••••••••••••••••••••••••

File: lib/neocities/cli.rb Line: 72 Link: https://github.com/neocities/neocities-ruby/blob/1d1c3bdddbcc32f0e37ac676e2e469dbec6b5950/lib/neocities/cli.rb#L72

Requested Solution: Remove this line

Reason: There will be users who will think they will need to place the API key instead of their password. I did not realize it was asking for a password because it mentioned API key before prompting me for my sitename and password. I do recognize in hindsight that it was asking for a password but it would ease potential friction for future users of the tool.

Helpful Issue: #31

p.s. thanks for the useful tool

zakuArbor commented 1 month ago

Never mind, I now noticed the sentence asks you to login first before you can grab your API key. I misunderstood the prompt. Though it is not obvious as to why it is asking you to fetch your API key. Perhaps an additional explanation can be given to the string such as:

Please login to get your API key to enable autologin