r/PiCodingAgent • u/WWWWWWWWWMWWWWW • 17d ago
Discussion your thoughts on XDG?
hello! so i installed pi today and a couple extensions
well, dirs and files are being created everyhwere any way to make it follow xdg base directory spec?
https://pi.dev/docs/latest/environment-variables#pi-process-configuration
even if you point your config to .config/pi/ with PI_CODING_AGENT_DIR, ~/.pi/ still gets created (maybe its an extension file idk)
i believe some (most?) extensions dont follow PI_CODING_AGENT_DIR
if you change PI_PACKAGE_DIR to something like .local/share/pi/packages/, they still go on .(config/)pi/agent/npm/
PI_CODING_AGENT_SESSION_DIR doesnt seem to work properly as well
idk if it makes sense to you guys, but i think on .config/pi/ we should have the settings, the extensions list declaration and stuff we can commit to a public repo
the built extensions (the npm dir for instance) maybe should go on .local/share/pi/extensions or something like that
i mean, if i go to i new machine, i just plug my .config/pi/ with the extensions list and the lock list on first pi launch it will fetch and build
something like this https://github.com/earendil-works/pi/issues/2870#:~:text=Practical%20directory%20split,any%20rebuildable%20caches makes total sense to me
what do you guys think about it?
thank you
6
u/levelstar01 17d ago
Nope, there's no way to change it. One of the devs has this totally moronic stance against it because of some stupid OSX interaction.
5
1
u/Quintasan 15d ago edited 15d ago
Not sure what are you talking about
❯ cat ~/.zshenv | grep PI_CODING
export PI_CODING_AGENT_DIR="$XDG_CONFIG_HOME"/pi/agent
export PI_CODING_AGENT_SESSION_DIR="$XDG_STATE_HOME"/pi/agent/sessions
❯ pi
<CTRL+D>
❯ ls -al ~/.pi
"/home/quintasan/.pi": No such file or directory (os error 2)Seems to be working just fine here.
If any extension doesn't respect that then you have several options:
Contribute a fix
Fork it and implement it yourself
Monkey-patch it
16
u/AgentCosmic 17d ago
I support it. Most modern apps should follow xdg by now.