Repository navigation
Conversation
…a workaround to run on windows
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.
Interactive CLI Menus and Setup Improvements
Overview
This change upgrades the CLI experience by replacing legacy text-based prompts with keyboard-navigable
questionarymenus. The improvements cover both the initial setup flow and core command-generation actions while preserving the existing non-interactive CLI workflow.1. Replaced Legacy Prompts with Keyboard-Navigable Menus
Added Dependency
questionarytorequirements.txt.Improved Setup Flow
Updated
how/how.pyto replace Typer's basic prompts withquestionary:questionary.questionary.Users can now navigate provider selections using the
↑/↓arrow keys instead of manually entering or selecting values.2. Upgraded Action Menus
Updated
how/actions.pyto provide a more consistent interactive experience after generating shell commands.Interactive Action Menu
The available actions:
are now presented through a
questionaryselection menu instead of requiring users to manually type a letter.Execution Confirmations
Replaced
typer.confirm()withquestionary.confirm()for:Inline Command Modification
Command modification now uses
questionary.text()instead of the previous fallback text prompt.Safety Guardrail
The destructive-action safety confirmation remains a manual text-entry prompt intentionally. This ensures that high-risk actions require an explicit confirmation rather than being accidentally accepted through a simple selection.
3. Backward Compatibility and Test Coverage
Non-Interactive CLI Support
Existing non-interactive setup flags remain fully supported, including:
--provider--api-keyThis ensures that scripted and automated setup workflows continue to work without requiring interactive input.
New CLI Tests
Added
tests/test_cli.pyto verify the non-interactive setup path and ensure that CLI flags and supplied parameters are correctly respected.Updated Existing Tests
Updated mocks in
tests/test_actions.pyto correctly patch the newquestionaryinteractions instead of the previous Typer/Rich prompts.Also fixed a Windows-specific issue in
tests/test_context.pyby mocking the system platform during the relevant test.4. Documentation Updates
Updated
README.mdto mention the new keyboard-navigable setup menu, helping first-time users understand that provider selection can be performed using the arrow keys.Summary
This update modernizes the CLI interaction model while maintaining compatibility with existing automation workflows. It provides a more consistent terminal UI, improves command-generation actions, preserves destructive-action safeguards, and adds test coverage for both interactive and non-interactive behavior.