Add non-interactive mode to claude-search CLI#45
Open
MaxGhenis wants to merge 1 commit into
Open
Conversation
Add --no-interactive/-n flag that prints results and exits without the V/E/Q interactive prompt, making claude-search usable in piped, scripted, and Claude Code session contexts. Also adds --help/-h and --max-results/-m flags via argparse. Closes ZeroSumQuant#44 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
--no-interactive/-nflag toclaude-searchthat prints results and exits without the V/E/Q interactive prompt--help/-hwith proper usage info (viaargparse)--max-results/-mflag (was hardcoded to 20)sys.argvparsing withargparseMotivation
claude-searchcurrently hangs in non-interactive contexts becauseinput()blocks waiting for stdin:claude-searchfrom within Claude Code's Bash tool hangs on the V/E/Q promptclaude-search "query" | headCloses #44
Test plan
tests/test_search_cli.pycovering:parse_args)--no-interactiveskipsinput()calls--no-interactivestill prints results--max-resultsforwarded to searcher--helpprints usage and exitsUsage
🤖 Generated with Claude Code