4 |
Generic Package Manager
5 |
6 | Directly install applications from their GitHub repository with out-of-the-box support for updates
using gpm, the package manager with the superpowers of a cross platform build tool.
7 |
8 |

9 |
10 |
11 | ## Getting Started
12 |
13 | Hi! there, follow this guide to install `gpm` cli on your system.
14 | At the end of this guide, you will find additional resources related to cli usage.
15 |
16 | **Let's start**.
17 | ## Platform Compatibility
18 | Here are the platforms currently supported by gpm:
19 | - 🔥👌 Windows OS
20 | - 🔥👌 Linux (Any)
21 | - 🪵🚫 Mac OS (Not Supported, yet)
22 |
23 | ## Installation Methods
24 | There are many ways to install `gpm`.
25 |
26 | Choose the one which suits you the best:
27 | - (1) Install directly from terminal
28 | - (2) Install from releases
29 | - (3) Install gpm using gpm (yeah, it's possible)
30 | - (4) Build gpm using gpm
31 |
32 | ### (1) ⚡ Install directly from terminal
33 | To use this method, make sure you have the requirements installed as per your os:
34 |
35 | **For Windows**
36 |
37 | **Requirements**:
38 | *pwsh (PowerShell)* on Windows OS
39 | ```shell
40 | . { iwr -useb https://raw.githubusercontent.com/generic-package-manager/gpm/main/pyro/windows/install.ps1 } | iex
41 | ```
42 |
43 | **For Linux**
44 |
45 | **Requirements**: *curl* on Linux
46 | ```shell
47 | curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/generic-package-manager/gpm/main/pyro/linux/install.sh | bash
48 | ```
49 |
50 | ### (2) ⚡ Install from releases
51 | This method is pretty easy but its not recommended as you won't recieve any update on `gpm cli` and you need to manually update your installation, in this method all you need to do is head over to [releases](https://github.com/generic-package-manager/gpm/releases/latest), and download the binary for your operating system.
52 |
53 | Direct download links are provided below:
54 |
55 | **For Windows**: Click to get [`gpm.exe`](https://github.com/generic-package-manager/gpm/releases/latest/download/gpm.exe) and [`gpm-binary-replacer.exe`](https://github.com/generic-package-manager/gpm/releases/latest/download/gpm-binary-replacer.exe)
56 |
57 | **For Linux** : Click to get [`gpm.AppImage`](https://github.com/generic-package-manager/gpm/releases/latest/download/gpm.AppImage)
58 |
59 | (**Important:** Rename **`gpm.AppImage`** to **`gpm`**)
60 |
61 | After downloading the binary(s), place them at a location like **`~/tools/gpm`** and add the location to your system environment path variable.
62 |
63 | ### (3) ⚡ Install gpm using gpm
64 | You can install gpm using gpm itself:
65 |
66 | Step 1: Download the gpm binary for your operating system by following the steps in (2) method of installation.
67 |
68 | Step 2: Run the downloaded binary as:
69 |
70 | **For Windows**
71 |
72 | ```shell
73 | ./gpm.exe --build generic-package-manager/gpm --yes
74 | ```
75 |
76 | **For Linux**
77 |
78 | ```shell
79 | ./gpm --build generic-package-manager/gpm --yes
80 | ```
81 |
82 | ### (4) ⚡ Build gpm using gpm
83 | `gpm` is written in dart, thus, it compiles to native code for the best performance.
84 |
85 | For compiling gpm, You will require dart version **3.2.6** or above.
86 |
87 | Additionally on Windows, you need to have pwsh (PowerShell) version **7.4.0**.
88 |
89 | There are two ways to build gpm:
90 |
91 | **Traditional**:
92 |
93 | ```shell
94 | git clone https://github.com/generic-package-manager/gpm.git
95 | cd gpm
96 | # for windows
97 | dart compile exe -o gpm.exe --target-os windows bin\gpm.dart
98 | dart compile exe -o gpm-binary-replacer.exe --target-os windows bin\gpm_binary_replacer.dart
99 | # for linux
100 | dart compile exe -o gpm --target-os linux bin/gpm.dart
101 | ```
102 |
103 | after completing the above steps, you will get the compiled `gpm` binary.
104 |
105 | **Self Build and Install**:
106 |
107 | You can even use gpm to build itself locally.
108 | ```shell
109 | git clone https://github.com/generic-package-manager/gpm.git
110 | cd gpm
111 | ./gpm-dev --build-locally generic-package-manager/gpm
112 | ```
113 |
114 | > if you are encountering any issues in installing gpm, please create an issue [here](https://github.com/generic-package-manager/gpm/issues/new).
115 |
116 | ## Features
117 |
118 | GPM brings the following:
119 |
120 | - Any open source repository on GitHub is available to install as a package.
121 |
122 | - As soon as you publish your repository on GitHub, its available for installing with gpm-cli.
123 |
124 | - You can rollback the installed updates on any package.
125 | - `gpm --rollback obs-studio`
126 |
127 | - You can even install a specific tag/version of any repository.
128 | - `gpm --install rufus --tag v4.0`
129 |
130 | - You can control which apps should receive updates
131 | - `gpm --lock app-fleet` // lock updates
132 |
133 | - `gpm --unlock app-fleet` // unlock updates
134 |
135 | - You can update any package individually or update all of them at once.
136 | - `gpm --update gpm` or `gpm --upgrade`
137 |
138 | - You can even build a repository from source.
139 | - `gpm --build generic-package-manager/gpm` for more information on this see [building from source with gpm](/docs/BUILD_FROM_SOURCE.md).
140 |
141 | - You can even install a specific commit.
142 | - `gpm --build generic-package-manager/gpm --commit XXXXXXX`, where XXXXXXX is at least a 7 char commit hash.
143 |
144 | - You can even build a cloned repository locally.
145 | - `gpm --build-locally generic-package-manager/gpm`
146 |
147 |
148 | ## Usage
149 |
150 | To install a repository run
151 |
152 | ```shell
153 | gpm --install username/repo
154 | ```
155 |
156 | Want a specific version installed?
157 |
158 | ```shell
159 | gpm --install username/repo --tag