We’re excited to announce an enhancement to Gemini CLI that makes your workflow extra highly effective and acquainted. We have upgraded the terminal to help you run complicated, interactive instructions—like vim for modifying, high for monitoring, and even an interactive git rebase -i—all instantly inside Gemini CLI. You now not have to leap to a separate terminal or take care of an agentic CLI that “hangs” for interactive instructions. Every thing stays proper the place you’re.
Holding every thing in context
This issues as a result of every thing now stays inside Gemini CLI’s context. Beforehand, you’ll have needed to exit Gemini CLI to run interactive shell instructions. Extra importantly, these instructions had been being run exterior Gemini CLI’s context. By introducing pseudo-terminal (PTY) help, instructions that require wealthy capabilities– corresponding to textual content editors, system screens, or reliance on terminal management codes, can now all be run from inside Gemini CLI and inside its context.
The way it works: Serializing the terminal state
Now, if you run a shell command, Gemini CLI spawns a brand new course of inside a pseudo-terminal within the background, leveraging the node-pty library. The PTY acts as an middleman, offering the required interface for the working system to acknowledge the session as a terminal. This permits functions and instructions to be run as they had been naturally designed to.
So how does this digital terminal operating within the background present up in your display? Consider it like a video stream. Our new serializer takes a snapshot of the pseudo terminal at each second—capturing every bit of textual content, each colour, and even the cursor’s place. These snapshots are then streamed to you, permitting you to see and work together with the terminal utility in real-time. It isn’t only a stream of textual content; it is a dwell feed.
Full two-way interplay
This new structure allows two-way communication. We have added new capabilities to jot down enter to the terminal and even resize it on the fly. While you sort, your keystrokes are despatched to the operating course of, and if you resize your window, the appliance inside Gemini’s shell will adapt its format, similar to in a native terminal. You’ll be able to give attention to the terminal by urgent ctrl+f.
We have additionally improved our output dealing with to accurately render colourful terminal output, so you’ll be able to get pleasure from your favourite command-line instruments in all their glory.
Getting began with the interactive shell
The brand new interactive shell is enabled by default in Gemini CLI as of v0.9.0.
Improve to the newest model utilizing the next command:
npm set up -g @google/gemini-cli@newest
For extra info please discuss with the official Gemini CLI documentation.
Listed here are a number of examples of the kind of instructions you’ll be able to now run with the interactive shell:
- Edit code with vim, nvim or nano.
- Handle your commits with interactive git instructions.
- Use interactive REPLs on your favourite languages.
- Run full-screen terminal functions like htop or mc.
- Effortlessly navigate interactive setup scripts like npm init or ng new.
- Reply to interactive prompts for sure gcloud instructions.
It is a main step for our shell integration, and we’re actively working to refine enter dealing with throughout all platforms. We encourage you to share your suggestions on our GitHub repository for those who encounter any inconsistencies.
Strive it out and tell us what you suppose!







