Install project files to a stable XDG location#6
Open
tranch wants to merge 2 commits into
Open
Conversation
Copy project files to $XDG_DATA_HOME/brain.md (or ~/.local/share/brain.md) on first run, then re-exec from there so agent symlinks always point to a fixed path. On re-runs the copy updates in-place. Teach uninstall to optionally remove the stable install directory.
There was a problem hiding this comment.
Pull request overview
This PR aims to make brain.md installs resilient to repo relocation by copying the project into a stable XDG data directory on first run and re-executing from there, and extends uninstall to optionally remove that stable install directory.
Changes:
setup: copy the repo into${XDG_DATA_HOME:-$HOME/.local/share}/brain.mdandexecfrom the stable location.uninstall: prompt to remove the stable install directory after unlinking skills and handling the manifest.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| setup | Adds stable-install copy + re-exec behavior to keep runtime symlinks pointing at a fixed path. |
| uninstall | Adds optional cleanup of the stable install directory. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+77
to
+78
| # Install to a stable location so symlinks don't break when the original clone | ||
| # is moved or deleted. On re-runs (e.g. after git pull), this updates in-place. |
Comment on lines
+79
to
+83
| INSTALL_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/brain.md" | ||
|
|
||
| if [ "$SCRIPT_DIR" != "$INSTALL_DIR" ]; then | ||
| echo "setup: installing project to $INSTALL_DIR ..." | ||
| mkdir -p "$INSTALL_DIR" |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Copy the project files to
$XDG_DATA_HOME/brain.md(or~/.local/share/brain.md) on first run, then re-exec from there so that the agent symlinks always point to a fixed path. On reruns, the copy updates in place.Teach uninstall to optionally remove the stable install directory.