Gemini CLI
Save Gemini CLI sessions with the SpecStory CLI.
Before you start
Install Gemini CLI and the SpecStory CLI. Open your project folder in a terminal and run specstory check gemini.
Run with SpecStory
bash
specstory run gemini
Use Gemini as usual. SpecStory saves the conversation in .specstory/history/. Cloud sync can run when you are logged in; add --no-cloud-sync to keep the session local.
Export existing sessions
bash
specstory list gemini
specstory sync gemini
# Export a single session
specstory sync gemini -s <session-id>
SpecStory reads Gemini's session history from ~/.gemini/tmp/ and matches it to your project. You can export conversations even if you did not start them through SpecStory.
Capture in the background
bash
specstory watch gemini
Leave this running while using Gemini directly. Stop watching with Ctrl+C.
Find and resume a session
Run specstory search to find saved work or specstory resume to choose a previous session. See search and resume for the picker and supported handoffs.
Troubleshooting
If Gemini is not detected, check that gemini is on your PATH. If no sessions appear, open the project where you used Gemini and confirm that its local history still exists.
See the CLI reference for custom commands, configuration, and debug logging.