English

Product LaunchesGoogleGemini CLI

Gemini CLI adds pseudo-terminal support, enabling internal execution of interactive commands like vim

This article is a translation. Read the Japanese original

Google has enhanced the terminal capabilities of the Gemini CLI. This allows complex commands requiring interactive operations, such as editing with vim or monitoring with top, to be executed directly from within the Gemini CLI.

Previously, users had to switch to a separate terminal to run interactive commands. This process often caused the agent to lose its context.

In this update, a pseudo-terminal (PTY) utilizing the node-pty library is launched in the background. Because the OS recognizes this session as a standard terminal, applications function as originally designed.

The screen display functions similarly to a video stream. A new serializer constantly takes snapshots of the PTY's text, colors, and cursor position, delivering them in real time.

Bidirectional communication is now also possible. Key inputs are sent to the running process, and the internal application layout is automatically adjusted according to window resizing. Press ctrl+f to focus on the terminal.

Rendering of color output has also been improved, preserving the original display of command-line tools. This new feature is enabled by default starting from v0.9.0.

To upgrade to the latest version, run npm install -g @google/gemini-cli@latest. For more details, please refer to the official documentation.


Source: Run interactive commands in Gemini CLI (HN 209pt, 77 comments) (HN Search (backfill), 2025-10-16)