rustworkshop / gitopolis

Manage multiple git repositories
GNU Affero General Public License v3.0
24 stars 2 forks source link

Separate `.gitopolis.toml` location from current working directory to allow running from anywhere #135

Open peteringram0 opened 1 month ago

peteringram0 commented 1 month ago

The .gitopolis file is currently generated relative to the binary location. This setup works for users who download the application, place it alongside their Git repositories, and manually update it. However, most developers prefer installing tools via package managers for ease of installation and updates—Homebrew on macOS, winget on Windows, and various package managers like apt or yum on Linux.

The main obstacle preventing Gitopolis from being installed via these package managers is the config file location, which is currently referenced from a non-managed directory. Since Gitopolis should be accessible from anywhere within the PATH, it requires a standardized config file location across all supported systems.

Therefore, I propose standardizing the config file location across the supported platforms. For Windows, I would need some suggestions as I am not very familiar with it:

System Location
MacOS ~/.config/gitopolis.toml
Linux ~/.config/gitopolis.toml
Windows %LOCALAPPDATA%\gitopolis.toml

This change would prepare Gitopolis for inclusion in package managers.

timabell commented 1 month ago

Oh, that's odd. It puts it in the current working directory for me (linux) rather than where the binary is. That was the intention rather than some central location

peteringram0 commented 1 month ago

Oh, that's odd. It puts it in the current working directory for me (linux) rather than where the binary is. That was the intention rather than some central location

If the application is in PATH you need to then remember the dir that you last ran in to get your current list etc?

timabell commented 1 month ago

If the application is in PATH you need to then remember the dir that you last ran in to get your current list etc?

I always run it from the parent directory of all my repos, it had never occurred to me to run it from anywhere else.

peteringram0 commented 4 weeks ago

If the application is in PATH you need to then remember the dir that you last ran in to get your current list etc?

I always run it from the parent directory of all my repos, it had never occurred to me to run it from anywhere else.

I think its worth considering.

Personally i spend my life in the terminal and I can be at any path. Additionally many people backup their dot files (me included) so having a config that can move across machines with me is a big benifit.

timabell commented 2 weeks ago

Yeah it's a good point, I'll give it some thought. Feel free to remind me IRL too