Skip to content

feat(cli): add interactive vendor selection for auth commands - #287

Merged
wsxiaoys merged 3 commits into
mainfrom
cli/adding-interactive-for-auth
Sep 15, 2025
Merged

feat(cli): add interactive vendor selection for auth commands#287
wsxiaoys merged 3 commits into
mainfrom
cli/adding-interactive-for-auth

Conversation

@Sma1lboy

@Sma1lboy Sma1lboy commented Sep 12, 2025

Copy link
Copy Markdown
Contributor

https://jam.dev/c/bc86bbbb-ae5c-42e2-ad9d-8f715d8570cd

Summary

• Add interactive vendor selection for authentication commands using inquirer
• Improve error handling for authentication cancellation scenarios
• Replace required vendor flags with user-friendly selection prompts
• Add support for showing authentication status in vendor selection

Changes

Interactive Selection: Replace -v, --vendor required option with interactive prompts using @inquirer/select
Enhanced UX: Show authentication status and user information in vendor selection
Better Error Handling: Handle user cancellation (Ctrl+C) gracefully for both login and logout
Smart Defaults: Auto-select single vendor when only one is available
Improved Logout: Interactive selection from authenticated vendors with user details

Test plan

  • Test login flow with multiple vendors
  • Test login flow with single vendor (auto-selection)
  • Test login cancellation handling
  • Test logout with multiple authenticated vendors
  • Test logout with no authenticated vendors
  • Test logout cancellation handling
  • Test re-authentication confirmation for already logged-in vendors

🤖 Generated with Pochi

image image image

@wsxiaoys wsxiaoys left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

otherwise LGTM

Comment thread packages/cli/package.json Outdated
@wsxiaoys
wsxiaoys added this pull request to the merge queue Sep 15, 2025
Merged via the queue into main with commit d01a3ed Sep 15, 2025
3 checks passed
@wsxiaoys
wsxiaoys deleted the cli/adding-interactive-for-auth branch September 15, 2025 00:31
DESU-CLUB pushed a commit to DESU-CLUB/pochi that referenced this pull request Sep 15, 2025
…L#287)

* feat(cli): add vendor selection for authentication using inquirer

* fix(cli): improve error handling for logout cancellation

* fix(cli): move @inquirer/select to devDependencies in package.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants