Skip to main content
Gemini CLI is Google’s command-line interface for Gemini AI. Entire supports capturing sessions from Gemini CLI, tracking your AI-assisted coding interactions. The Gemini CLI integration is still in preview mode and may contain bugs.

Prerequisites

How It Works

Entire automatically detects when Gemini is active and begins capturing the session. Entire integrates with Gemini CLI through Git hooks:
  1. Process Detection - Entire detects when Gemini CLI is running
  2. File Monitoring - File changes are tracked during the session
  3. Checkpoint Creation - Based on your strategy settings
  4. Session Storage - Data saved to entire/checkpoints/v1 branch

Captured Data

DataDescription
File changesAll files modified during the session
TimestampsSession and checkpoint timing
Session boundariesStart and end of Gemini sessions
CheckpointsRewind points within sessions

Features

Session Capture

When you start Gemini CLI in an Entire-enabled repository:
  1. Entire creates a new session
  2. File changes are tracked
  3. Checkpoints created per your strategy
  4. Session ends when Gemini CLI exits

Rewind Support

Rewind to previous checkpoints during or after a session:
# Interactive mode
entire rewind

# Or rewind to a specific checkpoint
entire rewind --to <checkpoint-id>

# List available rewind points
entire rewind --list
FlagDescription
--to <commit>Rewind to specific commit ID (non-interactive)
--listList available rewind points (JSON output)
--logs-onlyOnly restore logs, don’t modify working directory
--resetReset branch to commit (destructive)

Resume Previous Sessions

Resume a previous Gemini CLI session by switching to its branch:
entire resume <branch>
This command:
  1. Checks out the specified branch
  2. Finds the session ID from commits unique to this branch
  3. Restores the session log if it doesn’t exist locally
  4. Shows the command to resume the session
FlagDescription
-f, --forceResume from older checkpoint without confirmation

Explain Commits

View or generate explanations of how code was written:
# Explain a specific commit
entire explain --commit abc1234

# Explain a specific checkpoint
entire explain --checkpoint a3b2c4d5

# Show full transcript
entire explain --full
FlagDescription
-c, --checkpoint <id>Explain a specific checkpoint (ID or prefix)
--commit <sha>Explain a specific commit (SHA or ref)
--fullShow full parsed transcript (all prompts/responses)
-s, --shortShow summary only (omit prompts and files)

Best Practices

Use Manual Commit Strategy

For command-line AI tools like Gemini CLI:
entire enable --strategy manual-commit
Commit when you’ve made meaningful progress:
git add .
git commit -m "Implement feature with Gemini assistance"

Check Status Regularly

Monitor your session:
entire status

Example Workflow

# 1. Setup
cd my-project
entire enable

# 2. Start Gemini CLI
gemini

# 3. Work with Gemini
# Ask it to write code, make changes, etc.

# 4. Check session (in another terminal)
entire status

# 5. Rewind if needed
entire rewind

# 6. Commit when ready
git add .
git commit -m "Add feature with Gemini"

# 7. Push
git push

Troubleshooting

  1. Ensure you’re in an Entire-enabled repo: entire status
  2. Verify Gemini CLI is running from within the repository
  3. Check hooks are installed: ls .git/hooks
  1. Checkpoints require file changes
  2. Make sure Gemini is modifying files in the repository
  3. Check your strategy settings in .entire/settings.json

Limitations

  • Conversation transcripts may not be captured depending on Gemini CLI version
  • Session detection relies on process monitoring
  • Works best with the manual-commit strategy