cli: add code search via peregrine (ENT-993, ENT-994) - #2380
Draft
entire[bot] wants to merge 2 commits into
Draft
Conversation
Add `entire search --code <query>` to search code content through peregrine via entire-api cells. Gated behind ENTIRE_CODE_SEARCH=1 env var so it stays dark until launch. - New `codesearch` package: client for peregrine's /search/api/search endpoint with request/response types matching the peregrine API - Auth via NewEntireAPICellClient (jurisdictional identity tokens), same pattern as `entire api --to cell` - Output modes: grep-style text (terminal) or JSON (--json / piped) - Flags: --code, --case-sensitive, --repo, --limit - Rejects incompatible flags (--page, --all-repos, --case-sensitive without --code) with clear error messages - Response overflow detection (8 MiB cap with explicit error) - Timeout scoped to the search call only (30s), not auth resolution Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Parse inline repo: filters for --code path (was passing them as literal query text to peregrine) - Handle repo:* and --all-repos with --code as "no filter" instead of passing literal "*" to the API - Use api.ErrorResponse/HTTPError for error parsing instead of inline struct (supports both legacy and newer error envelopes) - Fix --limit help text to clarify behavior differs for --code - Drop --page/--all-repos rejection (silently ignored is less disruptive than breaking shared scripts) 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.
https://entire.io/gh/entireio/cli/trails/739
This draft pull request was opened by Entire after CI was requested for the linked trail. Feel free to edit the title or body — the link above is what keeps the trail and PR connected.