Cleanup files added to the .gemini directory
What happened?
Gemini CLI adds a number of files to the users directory under the .gemini folder.
the GEMINI.md and settings.json files are important but others are a distraction.
What did you expect to happen?
I expected fewer files. In particular files like installation_id, google_accounts.json, and user_id are suprising and should be in a subdir or should be merged into a single file.
Client information
Login information
No response
Anything else we need to know?
No response
Moved this to core rather than UX to reflect that the impact of this is a poor user experience due to excessive files users don't care about.
@NTaylorMullen, @jacob314, I'll be working on this. I'll move all files and subfolders like history or tmp to a separate subfolder and leave gemini.md and settings.json inside .gemini. What do you think?
what name do you suggest for the subfolder? as long as the name makes sense to users that seems reasonable. if we can't come up with a good name I'd suggest we merge the 3 small files together.
what name do you suggest for the subfolder? as long as the name makes sense to users that seems reasonable. if we can't come up with a good name I'd suggest we merge the 3 small files together.
What about naming it cache? Here's why:
Filesystem Conventions: This aligns with standard practices for application data on systems like Linux, which often distinguish between:
- User Configuration: Files the user edits.
- User Data: Application data that isn't configuration.
- User Cache: Data that can be regenerated.
By naming it cache, it signals to a technical user that the contents are non-essential for their personal setup and can be cleared if needed without breaking the application, which is a common troubleshooting step. Other names like data or internal would also be reasonable, but cache most accurately reflects that the data is regenerable.
The name cache seems reasonable to me. I would suggest renaming temp to logs to make its intent clearer as well.
I just realized someone already worked on this last week :/ : https://github.com/google-gemini/gemini-cli/pull/4078
@y-okt can you try using /assign to assign yourself to this issue?
@hugomurillomtz Hi, it seems that I didn't correctly link my PR and this issue, and this issue wasn't closed. Apologies🙇
/assign
👋 @y-okt, you've been assigned to this issue! Thank you for taking the time to contribute. Make sure to check out our contributing guidelines.
I'll close this issue as my previous PR has already addressed this. I have one follow-up PR and there I'll link this issue and will close this
Fixed by https://github.com/google-gemini/gemini-cli/pull/4078