Support Typescript SDK and non-interactive mode cli
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