Rename -y flag to --non-interactive (-n) for clarity - #592
Draft
razor-x wants to merge 1 commit into
Draft
Conversation
Non-interactive mode was only reachable via the undocumented -y flag. Add --non-interactive with a -n short flag as the documented spelling, keeping -y working as an alias. Interactivity flags are no longer forwarded to the API as request parameters. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TxQCkfVypobQVA7DpF4jvx
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.
Summary
Refactored the CLI argument handling to replace the
-yflag with a more descriptive--non-interactive(alias-n) flag. The-yflag is retained as a legacy alias for backward compatibility. This improves CLI usability by making the flag's purpose clearer to users.Key Changes
New utility module (
src/lib/util/cli-args.ts): Extracted argument parsing logic into a dedicated module with:parseCliArgs(): Centralized argument parser with proper configuration for the new flagisInteractive(): Helper function to determine if interactive mode is enablednonInteractiveFlags: Array of flag names that disable interactive promptsUpdated CLI entry point (
src/bin/cli.ts):parseArgs()call withparseCliArgs()from the new utilityisInteractivecalculation to use the new helper function--non-interactiveinstead of-yComprehensive test coverage (
src/lib/util/cli-args.test.ts):--non-interactive,-n,-y)Documentation updates (README.md):
--non-interactiveas the primary flag-yis now a legacy aliasImplementation Details
-yflag is maintained as a backward-compatible alias through minimist'saliasconfigurationhttps://claude.ai/code/session_01TxQCkfVypobQVA7DpF4jvx