Skip to content

Install project files to a stable XDG location#6

Open
tranch wants to merge 2 commits into
mindmuxai:mainfrom
tranch:feat/setup-install
Open

Install project files to a stable XDG location#6
tranch wants to merge 2 commits into
mindmuxai:mainfrom
tranch:feat/setup-install

Conversation

@tranch

@tranch tranch commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

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.

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.
Copilot AI review requested due to automatic review settings June 28, 2026 15:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.md and exec from 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 thread setup
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 thread setup
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"
Comment thread uninstall Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants