Skip to content

feat: show interactive client select when --client not provided#39

Merged
Dhravya merged 3 commits intosupermemoryai:mainfrom
remorses:interactive-client-select
Jan 20, 2026
Merged

feat: show interactive client select when --client not provided#39
Dhravya merged 3 commits intosupermemoryai:mainfrom
remorses:interactive-client-select

Conversation

@remorses
Copy link
Copy Markdown
Contributor

@remorses remorses commented Jan 17, 2026

Shows an interactive select prompt with all available clients when --client flag is not provided. Uses consola's built-in prompt functionality (no new dependencies).

Closes #38

cc @Dhravya

Copilot AI review requested due to automatic review settings January 17, 2026 21:26
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request implements an interactive client selection prompt that appears when the --client flag is not provided, improving the user experience by allowing users to select from available clients interactively rather than requiring them to know and provide the correct client name upfront.

Changes:

  • Made the client parameter optional in the InstallArgv interface
  • Removed demandOption: true from the client option in the command builder
  • Added interactive prompt for client selection using consola when client is not provided or is invalid
  • Updated all references from argv.client to use a local client variable throughout the handler
Comments suppressed due to low confidence (1)

src/commands/install.ts:264

  • Missing validation after the target prompt. If the user cancels the prompt, it may return undefined or an empty value, but the code continues execution. This could lead to errors when inferring the name from an undefined target or building commands. Add validation to check if a valid target was entered, and exit gracefully if not.
  let target = argv.target
  if (!target) {
    target = (await logger.prompt('Enter the package name, command, or URL:', {
      type: 'text',
    })) as string
  }

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Dhravya Dhravya merged commit c039317 into supermemoryai:main Jan 20, 2026
2 checks passed
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.

Show a select with the possible clients when user does not pass --client

3 participants