C.W.K.
Stream
Lesson 02 of 10 · published

Interactive REPL — Themes, History, /help

~12 min · gemini, interactive, repl, history

Level 0🌱 Novice
0 XP0/70 lessons0/11 achievements
0/120 XP to next level120 XP to go0% complete

The Gemini TUI

Default gemini drops you into a streaming REPL. The composer accepts plain text plus a few built-in commands: /help, /clear, /compact, /cost, /theme, /exit. Multi-line prompts via Shift+Enter; ↑/↓ for history; Ctrl+C interrupts.

Print mode (gemini -p) is the non-interactive equivalent — single shot, stdout, exit. Same composability as Claude Code's -p and Codex's exec.

Code

Three modes side by side·bash
# Interactive REPL (default)
gemini

# Print mode
gemini -p "explain the auth flow in this repo"

# Compose with shell
git diff HEAD~1 | gemini -p "review for bugs"

# History persists across sessions in ~/.gemini/history.jsonl
TUI shortcuts·text
↑/↓          previous / next prompt
Shift+Enter  newline in composer
Ctrl+C       interrupt current operation
Ctrl+D       exit
/clear       reset conversation
/compact     squeeze history
/theme       change color scheme
/exit        quit

External links

Exercise

Run a real session in the Gemini REPL. Use /compact at least once. Try print mode for the same query. Note which mode you reached for first instinctively.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.