Skip to content

Package Management (Sharpie)

C272 edited this page Jul 3, 2019 · 2 revisions

Algo uses a package management system based off the "Sharpie" package manager (see here).

Below is a quick overview of how the system works, and how you can install and remove packages. This is a modified version of the Sharpie README, for the Algo version of the project.

Sources

Before adding packages, you must first add sources which you can draw packages from. Think of these as massive collections of packages which Sharpie pulls from when looking to install a package. If it finds a matching package in a source, it will attempt to download it. However, without any sources added, there are no packages to draw from.

To add a source, you can use the command algo pkg sources add [link]. You can remove a source by using algo pkg sources remove [sourceName], but please note that this will remove all packages that this source references, even if you have them installed.

If a source has been updated with more packages, you can update a source by using algo pkg sources update [sourceName]. You can also update all sources, by using algo pkg sources update, with no name.

For more information on sources, you can use the command reference held at algo pkg help sources.

Packages

Once one or more sources have been added, you can install and modify packages from those sources. To install a package, use algo pkg add [pkgname]. You can remove an installed package by using algo pkg removed [pkgname], and update by using algo pkg update [pkgname].

You can also globally update all packages by using algo pkg update *. For more information on packages, you can use the command reference held at sharpie help packages.

Creating a Source

To create a source for Sharpie, there is a very simple schema to follow. Below is an outline of a basic source, which you can edit to fit your needs. Any spaces in the source name will be omitted when installing, modifying and removing the source.

SourceName
pkgName | 1 | http://package.link/directlyto.zip

The first line is always just the name of the source. This can't contain spaces.

The first parameter of each line is the package name, the second is the current version of the package (when this is incremented, updates will be detected for everyone with a lower version), and the third is the link to the package .zip. All packages must be in .zip form.