gemini-cli icon indicating copy to clipboard operation
gemini-cli copied to clipboard

Cleanup files added to the .gemini directory

Open jacob314 opened this issue 1 year ago • 12 comments

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.

Image

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

jacob314 avatar Jul 12 '25 19:07 jacob314

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.

jacob314 avatar Jul 31 '25 18:07 jacob314

@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?

hugomurillomtz avatar Aug 26 '25 17:08 hugomurillomtz

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.

jacob314 avatar Aug 26 '25 20:08 jacob314

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.

hugomurillomtz avatar Aug 26 '25 21:08 hugomurillomtz

The name cache seems reasonable to me. I would suggest renaming temp to logs to make its intent clearer as well.

jacob314 avatar Aug 26 '25 21:08 jacob314

I just realized someone already worked on this last week :/ : https://github.com/google-gemini/gemini-cli/pull/4078

hugomurillomtz avatar Aug 28 '25 15:08 hugomurillomtz

@y-okt can you try using /assign to assign yourself to this issue?

jacob314 avatar Aug 28 '25 18:08 jacob314

@hugomurillomtz Hi, it seems that I didn't correctly link my PR and this issue, and this issue wasn't closed. Apologies🙇

y-okt avatar Aug 29 '25 01:08 y-okt

/assign

y-okt avatar Aug 29 '25 01:08 y-okt

👋 @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.

gemini-cli[bot] avatar Aug 29 '25 01:08 gemini-cli[bot]

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

y-okt avatar Aug 29 '25 01:08 y-okt

Fixed by https://github.com/google-gemini/gemini-cli/pull/4078

jacob314 avatar Sep 16 '25 16:09 jacob314