Git Services Package Manager (GitHub supported only for now).
Support installing from releases with custom script.
- Get asset from repository releases.
- Run custom script to install, uncompress, move, etc.
- Save repository/package info for future installs.
- Interactive mode.
- Multi-platform: Windows, Linux, MacOS.
- Public and Private repositories
curl -sL https://dub.sh/gspm | bash
Download manually from releases.
Use gspm
to update itself:
- MacOS/Linux
gspm update eduhds/gspm -s 'sudo tar -C /usr/local/bin -xzf {{ASSET}} gspm && rm {{ASSET}}'
Usage: gspm [--configdir CONFIGDIR] [--githubtoken GITHUBTOKEN] [--script SCRIPT] [COMMAND [REPOS [REPOS ...]]]
Positional arguments:
COMMAND Command to run. Must be add, remove, update, install, edit, info or list.
REPOS Repos from Git Services (GitHub supported only for now). Format: username/repository
Options:
--configdir CONFIGDIR [env: GSPM_CONFIG_DIR]
--githubtoken GITHUBTOKEN [env: GSPM_GITHUB_TOKEN]
--script SCRIPT, -s SCRIPT
Script to run after download a asset. Use {{ASSET}} to reference the asset path.
--help, -h display this help and exit
--version display version and exit
# Add
gspm add username/repository
gspm add username/repository@tag
gspm add username/repository@latest
# Info, Edit or Update
gspm info username/repository
gspm edit username/repository
gspm update username/repository
# Using inline Script
gspm <add|update|edit> username/repository -s 'your script here'
# Remove (only from ~/.config/gspm.json)
gspm remove username/repository
# Remove (from ~/.config/gspm.json and running script to remove from system)
gspm remove username/repository -s 'your script here'
# List
gspm list
# Install (from ~/.config/gspm.json)
gspm install
# Custom config dir path
GSPM_CONFIG_DIR=/path/to/custom/dir gspm <command> ...
# GitHub private repositories
GSPM_GITHUB_TOKEN='your token here' gspm <command> <add|update>
# Run
go run . <command> <arguments>
# Build
task build:release
Contributions are welcome, see Contributions Guide and Code of Conduct.