Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/atomicptr/gitpkg
A git powered package manager built on top of submodules.
https://github.com/atomicptr/gitpkg
git package-manager
Last synced: 1 day ago
JSON representation
A git powered package manager built on top of submodules.
- Host: GitHub
- URL: https://github.com/atomicptr/gitpkg
- Owner: atomicptr
- License: gpl-3.0
- Created: 2023-11-06T11:24:12.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-04-03T13:01:06.000Z (10 months ago)
- Last Synced: 2025-01-15T01:22:50.102Z (8 days ago)
- Topics: git, package-manager
- Language: Python
- Homepage:
- Size: 106 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gitpkg
A git powered package manager built on top of submodules.
## Install
The recommended way to install git-pkg is via [pipx](https://pypa.github.io/pipx/):
```bash
$ pipx install gitpkg
```## Usage
The first thing you need to do to make your project work with git pkg is add a
destination. A destination is a place where your packages will be installed into,
you can have multiple of these.Install a destination by using:
```bash
$ git pkg dest add addons
```The directory does not have to exist, it will be automatically generated.
Next we need to install packages lets do so by:
```bash
$ git pkg add https://github.com/coppolaemilio/dialogic
```But wait! While we now have an addons/dialogic directory, the thing we actually
wanted there is now at addons/dialogic/addons/dialogicMany projects, in this case Godot projects have the thing that is important to us
in a subdirectory, to have this subdirectory in the desired location we have
to define it as the package root by:```bash
# You can just re-run this it will reconfigurate the package
$ git pkg add https://github.com/coppolaemilio/dialogic --package-root addons/dialogic
# OR: short hand
$ git pkg add https://github.com/coppolaemilio/dialogic -r addons/dialogic
```Nice! But what do I do if the repository name and the directory I want is different?
Lets look at the next example:
```bash
$ git pkg add https://github.com/viniciusgerevini/godot-aseprite-wizard.git -r addons/AsepriteWizard
```While this again will add addons/godot-aseprite-wizard we want the directory name to be
AsepriteWizard we can do this by:```bash
$ git pkg add https://github.com/viniciusgerevini/godot-aseprite-wizard.git -r addons/AsepriteWizard --name AsepriteWizard
# OR:
$ git pkg add https://github.com/viniciusgerevini/godot-aseprite-wizard.git --package-root-with-name addons/AsepriteWizard
# OR: actual shorthand
$ git pkg add https://github.com/viniciusgerevini/godot-aseprite-wizard.git -rn addons/AsepriteWizard
```Oh no! Now we have addons/godot-aseprite-wizard and addons/AsepriteWizard... why?
Names are essential for identifying projects so this can not be updated, we just have to remove
the unwanted package now:```bash
$ git pkg remove godot-aseprite-wizard
```Nice! Now we can finally get back to work!
A few days later...
It looks like the packages received some updates! To update all installed packages simply run:
```bash
$ git pkg update
# You can also update singular packages by providing their names
$ git pkg update dialogic AsepriteWizard
```Since this is powered by git submodules, you have to commit the update.
## Motivation
Managing other git repositories as dependencies is essentially a very good idea
but git submodules are a pain to work with so there came the idea of having a
simpler approach that feels more like using something like npm, composer etc.I mostly wrote this to use this in Godot projects to manage the addons I install
but quickly realized this can be used for a lot of programming languages where
package managers are not an option.This is essentially just an opinionated wrapper around git and git submodules.
## License
GNU General Public License v3
![](https://www.gnu.org/graphics/gplv3-127x51.png)