Skip to content

Change default install location to ~/.local/bin (XDG compliance) with automatic migration#73

Draft
Copilot wants to merge 4 commits intomainfrom
copilot/update-install-path-defaults
Draft

Change default install location to ~/.local/bin (XDG compliance) with automatic migration#73
Copilot wants to merge 4 commits intomainfrom
copilot/update-install-path-defaults

Conversation

Copy link
Contributor

Copilot AI commented Jan 6, 2026

Updates the default installation location from ~/.tally/bin to ~/.local/bin to comply with the XDG Base Directory Specification for modern Linux distributions. Includes automatic migration for users with existing installations.

Changes Made

Install Scripts (install.sh, install-pr.sh)

  • Changed default INSTALL_DIR from $HOME/.tally/bin to $HOME/.local/bin
  • Updated PATH export statements for all shells (bash, zsh, fish, POSIX) to reference ~/.local/bin
  • Added automatic migration logic that:
    • Detects existing installations at ~/.tally/bin/tally
    • Removes old binary and empty directories
    • Cleans up old PATH entries from shell config files (.bashrc, .zshrc, .profile, fish/config.fish)
    • Creates backups of modified config files before making changes

tally update Command (_version.py)

  • Updated get_install_path() to check for installations at both old and new locations
  • Enhanced perform_update() to automatically migrate from ~/.tally/bin to ~/.local/bin during updates
  • Cleans up old installation files and directories after successful migration
  • Provides user feedback about migration and PATH update requirements

Test Infrastructure

  • Updated test workflow to verify installations at ~/.local/bin instead of ~/.tally/bin

Migration Experience

Users with existing installations will be automatically migrated when they:

  • Re-run the install script
  • Run tally update command

The migration is automatic, creates backups of shell config files, and provides clear feedback during the process. Users can still override the installation location via the INSTALL_DIR environment variable.

Original prompt

This section details on the original issue you should resolve

<issue_title>Install location default to ~/.local/bin</issue_title>
<issue_description>The default install PATH should ideally follow ~/.local/bin, the recommended by the XDG Base Directory Specification for modern Linux distributions.

https://xdgbasedirectoryspecification.com/

https://github.com/davidfowl/tally/blob/b48dfa81b9729785c23fdee1c76acd8ae7211487/docs/install.sh#L9C1-L9C47</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Closes #XX

Co-authored-by: davidfowl <95136+davidfowl@users.noreply.github.com>
Copilot AI changed the title [WIP] Update install location to default to ~/.local/bin Change default install location to ~/.local/bin (XDG compliance) Jan 6, 2026
Copilot AI requested a review from davidfowl January 6, 2026 08:04
@github-actions
Copy link

github-actions bot commented Jan 6, 2026

PR Build Available

Version: 0.0.73-4e94f38

Install from this PR

Linux / macOS:

curl -fsSL https://raw.githubusercontent.com/davidfowl/tally/main/docs/install-pr.sh | bash -s -- 73

Windows PowerShell:

iex "& { $(irm https://raw.githubusercontent.com/davidfowl/tally/main/docs/install-pr.ps1) } 73"

Manual download: View workflow run and download artifacts.

Requirements
  • GitHub CLI (gh) must be installed and authenticated
  • Run gh auth login if not already authenticated

@davidfowl
Copy link
Owner

@copilot the test install script workflow is failing

Co-authored-by: davidfowl <95136+davidfowl@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 6, 2026

@copilot the test install script workflow is failing

Fixed in dd44051. The test workflow was checking for tally in ~/.tally/bin/ but the install script now installs to ~/.local/bin/.

@CJHarmath
Copy link

sweet - thanks!

@davidfowl
Copy link
Owner

@copilot Users have installed previous versions, what should we do for migration

- Install scripts now detect and migrate from old location
- Clean up old PATH entries from shell config files
- tally update command migrates to ~/.local/bin automatically
- Provides user feedback during migration process

Co-authored-by: davidfowl <95136+davidfowl@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 6, 2026

@copilot Users have installed previous versions, what should we do for migration

Added migration logic in 4e94f38:

Install scripts (install.sh, install-pr.sh):

  • Detect existing installations at ~/.tally/bin/tally
  • Automatically remove old binary and directories
  • Clean up old PATH entries from shell config files (.bashrc, .zshrc, .profile, etc.)
  • Create backups of modified config files

tally update command (_version.py):

  • Detects if running from old location
  • Automatically migrates to ~/.local/bin during update
  • Cleans up old installation after successful migration
  • Notifies user to update their PATH if needed

Users with existing installations will be seamlessly migrated when they either:

  1. Run the install script again
  2. Run tally update

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/davidfowl/tally/releases/latest
    • Triggering command: /usr/bin/curl curl -fsSL REDACTED (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title Change default install location to ~/.local/bin (XDG compliance) Change default install location to ~/.local/bin (XDG compliance) with automatic migration Jan 6, 2026
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.

Install location default to ~/.local/bin

3 participants