It is possible to host a package registry on a local file system. This is accomplished by adding a new registry scope to your configuration using the command:
gpm config set <scope>:registry folder://<file path>
For example, if you wanted to create a file system registry for the scope "internal-package" at the location
C:\internal-registry the command would be:
gpm config set @internal-package:registry folder://C:/internal-registry
Note: Make sure to use forward slashes in the URL.
Using the registry
Once the configuration has been setup, you can use the registry using the normal GPM commands. This means to install a package or publish a package, just use the commands:
gpm install <package> and
When the package is download or published, GPM will check the scope first. If the scope matches one of the configured registries, it will use that URL. If not, the default registry will be used.
Be a contributor!
Consider publishing your packages to the central GPM registry before publish to a private file system registry. The strength GPM is based on the community sharing code. Please only use file system registries for protecting IP. All other code should be shared publicly.
The search algorithm is different when searching on the file system. This means search strings that work on the web may not find packages on the file system.
GPM will manage the file system automatically, but it is fundamentally just files on the file system. This means that users can add, delete and modify items outside of the context of GPM.
Additionally GPM does not make any promises with file synchronization. Use caution when using file systems on network drives or mapped to a 3rd party cloud synchronization tool.