wares is a declarative AppImage/binary package manager!
To install, just grab the binary for your operating system from the Releases section on the right.
Run the following to check that everything is in order:
/path/to/wares doctorIf it tells you that ~/Wares is not in your $PATH, please add it.
Then, create ~/.config/wares and paste the following into ~/.config/wares/config.yaml:
wares:
wares:
name: wares
repo: indium114/wares
asset: "wares_Linux_x86_64"Replace Linux_x86_64 with Darwin_aarch64 if you're on a Mac with Apple Silicon, or Darwin_x86_64 if you're on an Intel Mac.
Then, run /path/to/wares sync to download Wares, and it will now manage itself.
To install a package, add it to the wares section of config.yaml.
For example, here's me installing Helix using wares
wares:
hx:
name: hx # Name of the program
repo: helix-editor/helix # GitHub repo (without github.com)
asset: "*.AppImage" # Pattern which will match the downloaded asset you would like
# For example, using "*Linux-x86_64*" will match with any file containing the substring `Linux-x86_64` in its nameInstalling an Archive (.tar.gz) is the same as installing as installing an AppImage.
In this example, I'll be installing Lazygit, which is packaged in .tar.gz format
wares:
lazygit:
name: lazygit # Name of the executable file inside .tar.gz archive that you want to use
repo: jesseduffield/lazygit # GitHub repo (without github.com)
asset: "lazygit_*_linux_x86_64.tar.gz" # Pattern which will match the downloaded asset you would like
# For example, using "*Linux-x86_64*" will match with any file containing the substring `Linux-x86_64` in its nameSome .tar.gz-archived packages may include a top-level directory, usually named the same things as the archive itself.
To remedy this, you can set removetoplevel: true under a ware.
In this example, I'll be installing the GitHub CLI, which is packaged like this.
wares:
gh:
name: bin/gh
repo: cli/cli
asset: "gh_*_linux_amd64.tar.gz"
removetoplevel: true # This is the important part for this archive.If you want to know if a particular package does this or not, download and extract the archive for yourself.
If your package has multiple files that all need to be symlinked, you can use the multiple attribute.
When using multiple, a new directory named after the package will be created, into which the contents of the archive will be symlinked.
Ensure that
~/Wares/<package name>is in your $PATH for this to work.
In this example, I'll be installing Cubyz, which is packaged in .tar.gz format and requires multiple artifacts.
wares:
Cubyz: # Name of the directory that the artifacts will be symlinked into inside ~/Wares
name: Cubyz # Not very useful for multi-artifact, but can't be empty
repo: pixelguys/cubyz # GitHub repo (without github.com)
multiple: true # Denotes that *all* files in the archive must be symlinked
asset: "Linux-x86_64.tar.gz" # Pattern which will match the downloaded asset you would like
# For example, using "*Linux-x86_64*" will match with any file containing the substring `Linux-x86_64` in its namewares can build and install packages from source through the blueprint system.
In this example, I'll be installing dotkeeper from source.
blueprints:
dotkeeper:
repo: "https://github.com/indium114/dotkeeper" # Full URL to repo
steps: # Steps to build the project in bullet-point form
- "go build"
artifacts: # Path of artifacts relative to the repo's root, in bullet-point form
- "dotkeeper"wares can manage your distro's package manager as well, allowing you to declaratively install packages from apt, pacman, flatpak, etc.
To configure a manager, add it to the settings:managers section of config.yaml.
In this example, I'll configure flatpak.
settings:
managers:
flatpak: # Name of the package manager
install: "flatpak install -y" # Command to install a package
remove: "flatpak uninstall -y" # Command to remove a package
update: "flatpak update -y" # Command to update all installed packagesNow that your manager is configured, let's install a package!
This is done in the managers:<manager_name> section of config.yaml.
In this example, I'll be installing Resources (net.nokyan.Resources) as a flatpak.
managers:
flatpak: # Name of the package manager (set earlier in settings:managers)
- "net.nokyan.Resources" # Package to installTo install a ware or blueprint system-wide, simply add system: true to its definition.
Ensure that wares doctor is run before installing a system-wide ware or blueprint for the first time.
In this example, I'll be installing Cubyz system-wide.
wares:
Cubyz:
name: Cubyz
repo: pixelguys/cubyz
multiple: true
asset: "Linux-x86_64.tar.gz"
system: true # set this to install system-wideYou can install wares from Codeberg or other Forgejo instances that expose the Forgejo API.
You can do this be setting the host: value of the ware definition to the URL to the host, like https://codeberg.org.
In this example, I'll be installing the Forgejo CLI from Codeberg.
wares:
fj:
name: fj
repo: forgejo-contrib/forgejo-cli
asset: "*x86_64-linux.tar.gz"
host: https://codeberg.org # this is the important partTo update packages, run the following command:
wares updateThis will update the version in pallet.lock. Now just sync to install the new version:
wares sync