Interactive Mode Quick Start
Streaming Conversations · Persistent Context · Instant Code Generation
Interactive Mode transforms Gemini CLI into a persistent conversation partner. Unlike single-command interactions, it maintains context across your entire session, enabling natural back-and-forth conversations that build upon previous exchanges. Perfect for iterative development, debugging, and complex problem-solving workflows.
Enable Mode
Start Interactive Mode with a simple command. The CLI will enter a persistent session where each input builds on the conversation history:
Context Memory
The session remembers everything from your conversation. Reference previous code, continue discussions, and build complex solutions step by step:
Command Shortcuts
Interactive Mode includes powerful shortcuts for session management:
/help
Show all available commands and shortcuts/clear
Reset conversation context and start fresh/save
Export current conversation to a file/load
Import and continue a previous conversation/exit
Gracefully exit Interactive ModeCtrl+C
Force quit immediately
Exit & Cleanup
Properly exit your session to save context and clean up resources:
Best Practices
- •Start with context: Begin sessions by describing your project or goals to establish relevant context.
- •Use descriptive requests: Reference "the component we just created" or "the function above" to leverage context memory.
- •Save important sessions: Use /save for complex conversations you might want to revisit or share.
- •Clear when switching topics: Use /clear to reset context when moving to unrelated tasks.
- •Iterate incrementally: Build complex solutions step by step, letting each response inform the next request.
- •Use for debugging: Perfect for troubleshooting where you need to share error messages and iterate on solutions.