hopper/README.md

278 lines
7.3 KiB
Markdown
Raw Permalink Normal View History

2022-01-24 05:41:03 +00:00
```
___---___
___--- | ---___
--- ___---___ ---
|---___--- ---___---|
| ---___ ___--- |
---___ | ___---
|---___|___---|
--__ - __--
|-_-|
-_-
__ __
/ / / /___ ____ ____ ___ _____
/ /_/ / __ \/ __ \/ __ \/ _ \/ ___/
/ __ / /_/ / /_/ / /_/ / __/ /
/_/ /_/\____/ .___/ .___/\___/_/
/_/ /_/
```
2021-11-29 01:06:23 +00:00
# Hopper
2022-09-04 23:21:36 +00:00
A Minecraft package manager for the terminal.
2021-11-29 01:07:11 +00:00
2022-09-05 08:25:09 +00:00
Hopper can automatically search, download, and update Minecraft mods, modpacks,
resource packs, and plugins from [Modrinth](https://modrinth.com/) so that
keeping your mods up-to-date and compatible with each other is easy. With
Hopper, you won't have to manually visit [CurseForge](https://curseforge.com/)
and download each mod one-by-one every time you set up a new instance, or deal
with the hassle of swapping out different mod versions for hours while trying to
get Minecraft to accept them all at once.
2021-11-30 23:19:18 +00:00
2022-09-04 23:21:36 +00:00
Hopper is still very early in development, but important features are coming
along smoothly, and we'll have lots of progress to show off in the coming weeks.
2022-09-05 08:25:09 +00:00
It's written in [Rust](https://www.rust-lang.org/) and released under the
[AGPLv3](LICENSE).
2021-11-30 23:19:18 +00:00
2022-09-04 23:21:36 +00:00
We're looking for people to help contribute code and write documentation. Please
reach out to us in [our Discord "server"](https://discord.gg/jJutHQjsh9) if
you're interested in helping out. If you have a taste in CLI apps like Hopper,
your input is especially appreciated.
2021-11-30 23:19:18 +00:00
2022-09-04 23:21:36 +00:00
Inspired by applications like [paru](https://github.com/morganamilo/paru), a
2022-09-05 08:25:09 +00:00
feature-packed AUR helper and [topgrade](https://github.com/r-darwish/topgrade),
2022-09-04 23:21:36 +00:00
a tool to upgrade everything
2021-11-30 23:19:18 +00:00
2022-09-05 08:25:09 +00:00
[![Donate using
Liberapay](https://liberapay.com/assets/widgets/donate.svg)](https://liberapay.com/tebibytemedia/donate)
2021-11-29 01:00:46 +00:00
2021-11-21 00:42:50 +00:00
# High-level Goals
2022-09-04 23:21:36 +00:00
## Continuous
- Small binary size
- Minimal compile times
## Features
### High Priority:
- Modrinth package searching
- Modrinth package installation
- Parallel package downloading
- Per-instance package management
- Package updating
- Listing installed packages
### Medium Priority
- CurseForge package searching
- CurseForge package installation
- A `man(1)` entry
### Low Priority:
- Shell autocomplete
2022-09-04 23:21:36 +00:00
- Configurable search result display like [Starship](https://starship.rs)
- Version-control system repository package management & compilation
2022-09-04 23:21:36 +00:00
### External-Dependent:
2022-09-04 23:21:36 +00:00
- Conflict resolution
- Dependency resolution
- Integration into [Prism Launcher](https://prismlauncher.org/) and/or
2022-09-04 23:21:36 +00:00
[theseus](https://github.com/modrinth/theseus)
2022-09-05 08:25:09 +00:00
- Integration into `topgrade(1)`
2022-09-04 23:21:36 +00:00
- Graphical frontend with notifications
[Modrinth REST API
docs](https://docs.modrinth.com/api-spec/)
2021-11-21 00:42:50 +00:00
# File Structure
2021-11-21 00:42:50 +00:00
2022-09-04 23:21:36 +00:00
```
├── "$XDG_CONFIG_HOME"/hopper.toml
├── "$XDG_CACHE_HOME"/hopper/
2022-09-04 23:21:36 +00:00
│ ├── 1.19.1/
2022-09-05 08:25:09 +00:00
│ │ └── fabric/
2022-09-04 23:21:36 +00:00
│ └── 1.18.2/
2022-09-05 08:25:09 +00:00
│ ├── forge/
│ └── plugin/
└── "XDG_DATA_HOME"/templates/
2022-09-05 08:25:09 +00:00
└── example-template.hop -> ~/.minecraft/mods/example-template.hop
2021-11-21 00:42:50 +00:00
```
2022-09-04 23:21:36 +00:00
# Hopfile Structure
2021-11-21 00:42:50 +00:00
Hopfiles will contain a Minecraft version number, a list of packages, and any
references to other hopfiles on which it's based, or "templates". If a hopfile
is based on other template hopfiles, it inherits the packages from them. A
hopfile does not inherit the package or Minecraft version from a template.
2021-11-21 00:42:50 +00:00
```
template = "example-template"
mc-version = "1.19.2"
2022-09-04 23:21:36 +00:00
[packages]
fabric-mod = [ "sodium", "lithium" ]
resource = "alacrity"
2021-11-21 00:42:50 +00:00
```
2022-09-04 23:21:36 +00:00
# Hopper Configuration File Structure
2021-11-21 00:42:50 +00:00
2022-09-05 08:25:09 +00:00
Hopper's configuration will be maintained with a list of all hopfiles known to
hopper. Its config file will also contain a list of mod hosting sites like
Modrinth and CurseForge and a list of (remote or local) version-control
repositories from which to compile mods. The latter will use a (potentially
custom) build file format to be defined at a later date.
2021-11-21 00:42:50 +00:00
```
hopfiles = [
"~/.minecraft/mods/template.hop",
"~/.minecraft/1.91.1/mods/1.19.1.hop"
]
[sources]
modrinth = "https://api.modrinth.com/"
curseforge = "https://api.curseforge.com/"
git = [
"git+https://github.com/IrisShaders/Iris.git"
"git+https://github.com/CaffeineMC/sodium-fabric.git"
]
```
2021-11-21 00:42:50 +00:00
# Docs
2021-11-21 00:42:50 +00:00
## Types
There are multiple types of packages hopper can manage.
### Mods
- `fabric-mod`
- `forge-mod`
- `quilt-mod`
### Plugins
- `bukkit-plugin`
- `paper-plugin`
2022-11-17 20:36:03 +00:00
- `purpur-plugin`
- `spigot-plugin`
2022-11-17 20:36:03 +00:00
- `sponge-plugin`
### Other
- `data-pack`
- `fabric-pack`
- `forge-pack`
- `resource-pack`
- `quilt-pack`
These types are specified in various hopper subcommands and in its configuration.
## Usage
2021-11-21 00:42:50 +00:00
`hopper [options...] [subcommand...]`
2022-09-04 23:21:36 +00:00
## OPTIONS
2022-09-04 23:21:36 +00:00
`-v`, `--verbose`
2021-11-21 00:42:50 +00:00
 Includes debug information in the output of `hopper` subcommands.
2021-11-21 00:42:50 +00:00
## SUBCOMMANDS
2021-11-21 00:42:50 +00:00
`get [options...] [targets...]`
2022-09-04 23:21:36 +00:00
 Searches for packages, displays the results, and downloads any selected
packages to the local cache. If multiple targets are specified, results are
displayed in order of specification.
2022-09-04 23:21:36 +00:00
OPTIONS
2022-09-04 23:28:13 +00:00
 `-d`, `--dir [directory...]`
2022-09-04 23:21:36 +00:00
2022-12-08 20:03:00 +00:00
  Specifies the directory to download to (default is
"$XDG_CACHE_HOME"/hopper/).
2022-09-04 23:28:13 +00:00
 `-m`, `--mc-version [version...]`
2022-09-04 23:21:36 +00:00
2022-12-08 20:03:00 +00:00
  Specifies for what version of Minecraft packages are being
retrieved.
2022-09-04 23:28:13 +00:00
 `-n`, `--no-confirm`
2022-09-04 23:21:36 +00:00
  Does not display search results and downloads exact matches to the
cache. Requires `--mc-version` and `--type` be specified.
2022-09-04 23:28:13 +00:00
 `-t`, `--type [types...]`
2022-09-06 23:00:08 +00:00
  Specifies what types of packages are being queried.
2022-09-04 23:21:36 +00:00
`init [options...]`
2022-09-04 23:28:13 +00:00
 Creates a hopfile in the current directory and adds it to the global known
hopfiles list.
2022-09-04 23:21:36 +00:00
OPTIONS
2022-09-04 23:21:36 +00:00
 `-d`, `--dir [directory...]`
2022-09-04 23:28:13 +00:00
  Specifies the directory in which the hopfile is being created.
2022-09-04 23:21:36 +00:00
 `-f`, `--hopfile [hopfiles...]`
2022-09-04 23:28:13 +00:00
2022-12-08 20:03:00 +00:00
  Specifies templates upon which to base the new hopfile.
2022-09-04 23:28:13 +00:00
 `-m`, `--mc-version [version]`
2022-09-04 23:21:36 +00:00
  Specifies for what version of Minecraft packages are being managed.
2022-09-04 23:28:13 +00:00
 `-t`, `--type [type...]`
2022-09-04 23:21:36 +00:00
  Specifies what type of packages will be listed in this hopfile.
2022-09-04 23:28:13 +00:00
`install [options...] [packages...]`
2022-09-04 23:28:13 +00:00
 Adds packages to the current hopfile, symlinking them to its directory. If
the package cannot be found in the package cache, `hopper get` is run first.
2022-09-04 23:21:36 +00:00
OPTIONS
2022-09-04 23:28:13 +00:00
  `-f`, `--hopfile [hopfiles...]`
2022-09-04 23:21:36 +00:00
2022-12-08 20:06:35 +00:00
  Specifies hopfiles to which mods will be added.
2022-09-04 23:28:13 +00:00
`list [options...]`
2022-09-04 23:28:13 +00:00
 Lists all installed packages.
2021-11-21 00:42:50 +00:00
OPTIONS
2022-09-04 23:28:13 +00:00
  `-f` `--hopfile [hopfiles...]`
  Lists packages installed in a specified hopfile.
 `-m`, `--mc-version [version]`
  Specifies for what version of Minecraft packages are being managed.
 `-t`, `--type [types...]`
  List all packages of a specified type.
`update [options...]`
 Updates installed packages and adds mods if they're missing to directories
with known hopfiles.
OPTIONS
 `-f`, `--hopfile [hopfiles...]`
  Updates only packages in the specified hopfile. Note that this
option creates a new file and symlink as it does not update the packages for
other hopfiles.
 `-m`, `--mc-version [version]`
2021-11-21 00:42:50 +00:00
  Specifies for what version of Minecraft packages are being updated.
2022-09-04 23:28:13 +00:00
2022-11-17 20:20:48 +00:00
 `-t`, `--type [types...] [packages...]`
  Updates only packages of a specified type. Optionally takes a list
of packages as an argument.