Run interactive commands in Gemini CLI (developers.googleblog.com)

🤖 AI Summary
Gemini CLI now supports full interactive terminal sessions so you can run tools like vim, top, or interactive git rebase -i directly inside the CLI without dropping to a separate shell. This upgrade keeps everything in Gemini’s context (no more “hanging” agentic CLIs or context loss) and is enabled by default in v0.9.0, so users can remain in a single, consistent session for editing, monitoring, or other TUI-driven workflows. Technically, Gemini spawns each shell command in a pseudo-terminal (PTY) using the node-pty library so the OS and applications see a real terminal. A serializer snapshots the PTY’s output (text, ANSI colors, cursor position) and streams those frames to the client like a live video feed, while two-way communication sends keystrokes and resize events back to the running process. Output rendering now preserves colors and terminal control codes, and you can focus the terminal with Ctrl+F. Upgrade with: npm install -g @google/gemini-cli@latest. This change reduces context switching, enables richer CLI integrations and reproducible interactive workflows, and the team is iterating on cross-platform input handling—feedback is welcome on GitHub.
Loading comments...
loading comments...