gemini-cli icon indicating copy to clipboard operation
gemini-cli copied to clipboard

Support Typescript SDK and non-interactive mode cli

Open Flux159 opened this issue 5 months ago • 8 comments

What would you like to be added?

Claude Code supports a non-interactive SDK using the -p flag (and associated --output-format stream-json). It also supports using previous sessions so you can use -p iteratively keeping message history.

Recently, they also added an SDK that allows you to directly query in typescript: https://docs.anthropic.com/en/docs/claude-code/sdk

Gemini CLI should support an SDK that would allow users to integrate it into other applications via shell (-p and sessions / message history) or directly call from typescript to run agentic coding workflows in CI environments automatically.

This was partially mentioned in #1585

Why is this needed?

An SDK & non-interactive CLI would allow developers to utilize Gemini CLI (/agentic coding workflows) in Github Actions environments, via other applications to dynamically generate code on the fly, and many other use cases.

This would make it simpler for developers to add this functionality without having to reinvent the agentic coding / tool calling from raw LLM calls.

Additional context

No response

Flux159 avatar Jun 26 '25 21:06 Flux159