cli icon indicating copy to clipboard operation
cli copied to clipboard

Batch operations for code search / in general

Open vz443 opened this issue 7 months ago • 2 comments

Hello people,

AI related feature

https://github.com/cli/cli/issues/5782 is a related issue but is for batch issue edits. Maybe something more thorough should be thought of for batch operations on other commands

In my case, i am at a large enterprise developing a system to use an agent to triage incoming issues and whatnot, without needing the repository cloned on device, this is powered by gh cli + other context from internal services.

The main use is gh search code, however the agent fires multiple parallel calls in quick succession to get results for a few searches.

I can fix this by stopping that ofc, but it is faster this way and the agent does get rate limited.

However if this is implemented, execution becomes faster and cleaner. Whilst i also believe it saves api costs overall and would be used by others as well.

Could be done as a prefix command like gh batch search code or something; thats just an idea

vz443 avatar Apr 15 '26 23:04 vz443

Thank you for your issue! We have categorized it as an enhancement (feature or improvement) request, and it has been added to our backlog. In doing so, we are not committing to implementing this feature at this time, but, we will consider it for future releases based on community feedback and our own product roadmap.

Unless you see the https://github.com/cli/cli/labels/help%20wanted label, we are not currently looking for external contributions for this feature.

If you come across this issue and would like to see it implemented, please add a thumbs up! This will help us prioritize the feature. Please only comment if you have additional information or viewpoints to contribute.

github-actions[bot] avatar Apr 28 '26 16:04 github-actions[bot]

I opened a focused proposal for adding --batch to gh api specifically: #13333

It includes a working prototype with tests (SebTardif/cli@feat/api-batch) and quantified impact data from real LLM agent sessions — showing ~75% reduction in process/connection overhead for typical automation workflows.

The gh api --batch approach reads newline-separated endpoints from stdin (plain paths or JSON objects) and processes them over a shared HTTP connection, which addresses the core efficiency problem described here.

SebTardif avatar May 03 '26 17:05 SebTardif