From 9b41e09d460dd46571870afbb5332c362cdfb942 Mon Sep 17 00:00:00 2001 From: emma Date: Sun, 4 Sep 2022 19:21:36 -0400 Subject: [PATCH 1/5] updated README --- README.md | 240 +++++++++++++++++++++++++++++++++++------------------- 1 file changed, 155 insertions(+), 85 deletions(-) diff --git a/README.md b/README.md index 40ddf58..9a21daa 100644 --- a/README.md +++ b/README.md @@ -19,119 +19,189 @@ # Hopper -A Minecraft mod manager for the terminal. +A Minecraft package manager for the terminal. -Hopper can automatically search, download, and update Minecraft mods from 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 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. +Hopper can automatically search, download, and update Minecraft mods from +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 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. -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. It's written in Rust and released under the AGPLv3. +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. +It's written in Rust and released under the AGPLv3. -We're looking for people to help contribute code, design the terminal interface, write documentation, and design a logo. 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-based apps like Hopper, your input is especially appreciated. +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. -Inspired by CLI apps like: -- [paru](https://github.com/morganamilo/paru): Feature packed AUR helper -- [topgrade](https://github.com/r-darwish/topgrade): Upgrade everything +Inspired by applications like [paru](https://github.com/morganamilo/paru), a +feature-packed AUR helper and [topgrade](https://github.com/r-darwish/topgrade). +a tool to upgrade everything -### Donate +# Donate - + # High-level Goals -Continuous: -- small binary size -- minimal compile times +## Continuous +- Small binary size +- Minimal compile times -Features: -- modrinth mod searching -- modrinth mod installation -- curseforge api too? -- per-instance mod management -- mod updating -- fish autocomplete -- bash autocomplete -- zsh autocomplete -- nushell autocomplete -- manpage -- configurable mod search result display like [Starship](https://starship.rs) -- `display` command or something that displays (cached?) mod info -- parallel mod downloading +## Features -Long-term/host-dependent: -- conflict resolution -- dependency resolution -- shaderpack and resource pack management -- integrate into multimc or theseus -- graphical frontend (w/ notifications?) +### High Priority: +- Modrinth package searching +- Modrinth package installation +- Parallel package downloading +- Per-instance package management +- Package updating +- Listing installed packages -[Modrinth REST API docs](https://github.com/modrinth/labrinth/wiki/API-Documentation) +### Medium Priority +- CurseForge package searching +- CurseForge package installation +- A `man(1)` entry + +### Low Priority: +- `fish(1)` autocomplete +- `bash(1)` autocomplete +- `zsh(1)` autocomplete +- [Nushell](https://www.nushell.sh/) autocomplete +- Configurable search result display like [Starship](https://starship.rs) + +## External-Dependent: +- Conflict resolution +- Dependency resolution +- Integration into [PolyMC](https://polymc.org/) and/or +[theseus](https://github.com/modrinth/theseus) +- Integration into `togprade(1)` +- Graphical frontend with notifications + +[Modrinth REST API +docs](https://docs.modrinth.com/api-spec/) # File Architecture -```bash -- .config/hopper/config.toml # Main config file -- .local/share/multimc/instances/*/.minecraft/Hopfile.toml # Multimc -- .minecraft/Hopfile.toml # Official launcher -- .var/app/com.mojang.Minecraft/.minecraft/Hopfile.toml # Flatpak version -- .cache/hopper/ # Mod cache -| - hopper.lock # Lock file -| - mod1.jar # Mods -| - mod2.jar -+------------- - ... +``` +~/.hopper/ +├── hopper.conf +├── cache/ +│ ├── 1.19.1/ +│ │ └── fabric +│ └── 1.18.2/ +│ ├── forge +│ └── plugin +└── templates/ + └── arbitrary.hop -> ~/.minecraft/mods/arbitrary.hop ``` -# Usage (Planned) +# Hopfile Structure -Create `Hopfile.toml` in your instance directory: -``` -hopper init -``` - -Add mods: -``` -hopper add iris -hopper add sodium -hopper add phosphor -``` - -Check for mod updates: -``` -hopper update -``` - -# Docs (Planned) - -## `hopper init` +Hopfiles will contain a Minecraft version number, a list of packages, the name +of the type of package it uses, and any references to other templates it's based +on. If a template is based on other templates, it inherits the packages from +those templates. A template does not inherit the package or Minecraft version +from another template. ``` -hopper init < --dir=./path/to/instance > +template = abitrary + +mc-version = 1.19.2 + +type = fabric + +[packages] +sodium ``` -Inits in current directory if `dir` is left out, otherwise inits in given dir. +# Hopper Configuration File Structure -## `hopper update` +Hopper will maintain a list of all hopfiles known to hopper. Its config 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. ``` -hopper update < --mc-version=1.17 > +[hopfiles] +file = ~/.minecraft/mods/1.19.1.hop + +# Mod Hosts + +[Modrinth] +api = https://api.modrinth.com/ + +[CurseForge] +api = https://api.curseforge.com/ + +# Git Repositories + +[Iris Shaders] +source = git+https://github.com/IrisShaders/Iris.git ``` -Updates all installed mods of a specific version, or a version set in the config. +# Docs -## `hopper add` +## Usage -``` -$ hopper add sodium --mc-version 1.17 -4 Indium 1.0.0+mc1.17.1 [1.17.1] (21557 downloads) - Sodium addon providing support for the Fabric Rendering API, based on Indigo -3 Reese's Sodium Options 1.2.1 [1.16.5] (548 downloads) - Alternative Options Menu for Sodium -2 Sodium Extra mc1.17.1-0.3.6 [1.17.1] (16387 downloads) - Features that shouldn't be in Sodium. -1 Sodium mc1.17.1-0.3.2 [1.17.1] (962361 downloads) - Modern rendering engine and client-side optimization mod for Minecraft -:: Select a mod -:: ... -``` +`hopper [SUBCOMMAND] [OPTIONS]` -## `hopper get` +## Common OPTIONS: -Just like `hopper add` but simply downloads a mod jar to the current directory. +`-d`, `--dir[=FILE]` + Specifies the path for the hopfile being utilized + +`-f`, `--filename=[FILE]` + Saves to a specific file name. + +`-m`, `--mc-version[=VERSION]` + Specifies for what VERSION of Minecraft PACKAGES are being managed + +`-t`, `--type[=TYPE]` + Specifies what TYPE of PACKAGEs is being referenced + +`-v`, `--verbose` + Includes debug information in the output of `hopper` commands. + +## SUBCOMMANDs + +`get [OPTIONS] PACKAGE` + Searches for a PACKAGE, displays the results, and downloads any selected + PACKAGES to the local cache. + +OPTIONS + `-n`, `--no-confirm` + Does not display search results and downloads exact matches to the + cache. Requires `--mc-version` and `--type` be specified. + +`init [OPTIONS] [--mc-version=VERSION] [--type=TYPE] TEMPLATE` + Creates a hopfile in the current directory and adds it to the global known + hopfiles list in the configuration file. If a TEMPLATE is passed as an + argument, the hopfile is added as a new template. A name is generated using + the VERSION and TYPE specified unless `--filename` is used. + +OPTIONS + `--template[=TEMPLATE1,TEMPLATE2...]` + Specifies TEMPLATE hopfiles' names upon which to base the new hopfile. + +`install [OPTIONS] PACKAGE` + Adds a PACKAGE to the current hopfile and runs `hopper update`. If the + PACKAGE cannot be found in the package cache, it runs `hopper get` first. + +OPTIONS + `--template[=TEMPLATE1,TEMPLATE2...]` + Specifies a template hopfile to which to install mods + +`list [OPTIONS]` + Lists all installed packages. + +`update [OPTIONS] PACKAGE` + Updates installed PACKAGEs and adds mods if they're missing to directories + with known hopfiles. If a PACKAGE is passed, `--type` must be specified so + that hopper `update`s the correct package. \ No newline at end of file From cf2c8df86b4d48b84e7e2f9ebf737756b573a9a2 Mon Sep 17 00:00:00 2001 From: emma Date: Sun, 4 Sep 2022 19:28:13 -0400 Subject: [PATCH 2/5] fixed indents --- README.md | 60 +++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 9a21daa..75f9037 100644 --- a/README.md +++ b/README.md @@ -155,53 +155,69 @@ source = git+https://github.com/IrisShaders/Iris.git ## Common OPTIONS: `-d`, `--dir[=FILE]` - Specifies the path for the hopfile being utilized + + Specifies the path for the hopfile being utilized `-f`, `--filename=[FILE]` - Saves to a specific file name. + + Saves to a specific file name. `-m`, `--mc-version[=VERSION]` - Specifies for what VERSION of Minecraft PACKAGES are being managed + + Specifies for what VERSION of Minecraft PACKAGES are being managed `-t`, `--type[=TYPE]` - Specifies what TYPE of PACKAGEs is being referenced + + Specifies what TYPE of PACKAGEs is being referenced `-v`, `--verbose` - Includes debug information in the output of `hopper` commands. + + Includes debug information in the output of `hopper` commands. ## SUBCOMMANDs `get [OPTIONS] PACKAGE` - Searches for a PACKAGE, displays the results, and downloads any selected - PACKAGES to the local cache. + + Searches for a PACKAGE, displays the results, and downloads any selected + PACKAGES to the local cache. OPTIONS + `-n`, `--no-confirm` - Does not display search results and downloads exact matches to the - cache. Requires `--mc-version` and `--type` be specified. + + &emspDoes not display search results and downloads exact matches to the +  cache. Requires `--mc-version` and `--type` be specified. `init [OPTIONS] [--mc-version=VERSION] [--type=TYPE] TEMPLATE` - Creates a hopfile in the current directory and adds it to the global known - hopfiles list in the configuration file. If a TEMPLATE is passed as an - argument, the hopfile is added as a new template. A name is generated using - the VERSION and TYPE specified unless `--filename` is used. + + Creates a hopfile in the current directory and adds it to the global known + hopfiles list in the configuration file. If a TEMPLATE is passed as an + argument, the hopfile is added as a new template. A name is generated using + the VERSION and TYPE specified unless `--filename` is used. OPTIONS + `--template[=TEMPLATE1,TEMPLATE2...]` - Specifies TEMPLATE hopfiles' names upon which to base the new hopfile. + +  Specifies TEMPLATE hopfiles' names upon which to base the new hopfile. `install [OPTIONS] PACKAGE` - Adds a PACKAGE to the current hopfile and runs `hopper update`. If the - PACKAGE cannot be found in the package cache, it runs `hopper get` first. + + Adds a PACKAGE to the current hopfile and runs `hopper update`. If the + PACKAGE cannot be found in the package cache, it runs `hopper get` first. OPTIONS - `--template[=TEMPLATE1,TEMPLATE2...]` - Specifies a template hopfile to which to install mods + + `--template[=TEMPLATE1,TEMPLATE2...]` + +  Specifies a template hopfile to which to install mods `list [OPTIONS]` - Lists all installed packages. + + Lists all installed packages. `update [OPTIONS] PACKAGE` - Updates installed PACKAGEs and adds mods if they're missing to directories - with known hopfiles. If a PACKAGE is passed, `--type` must be specified so - that hopper `update`s the correct package. \ No newline at end of file + + Updates installed PACKAGEs and adds mods if they're missing to directories + with known hopfiles. If a PACKAGE is passed, `--type` must be specified so + that hopper `update`s the correct package. \ No newline at end of file From 75d3db9f50f93d3770690c6505a70595d8709960 Mon Sep 17 00:00:00 2001 From: emma Date: Sun, 4 Sep 2022 19:30:25 -0400 Subject: [PATCH 3/5] fixed indents pt. 2 --- README.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 75f9037..557f83e 100644 --- a/README.md +++ b/README.md @@ -183,23 +183,24 @@ source = git+https://github.com/IrisShaders/Iris.git OPTIONS - `-n`, `--no-confirm` + `-n`, `--no-confirm` - &emspDoes not display search results and downloads exact matches to the +  Does not display search results and downloads exact matches to the   cache. Requires `--mc-version` and `--type` be specified. `init [OPTIONS] [--mc-version=VERSION] [--type=TYPE] TEMPLATE`  Creates a hopfile in the current directory and adds it to the global known  hopfiles list in the configuration file. If a TEMPLATE is passed as an - argument, the hopfile is added as a new template. A name is generated using - the VERSION and TYPE specified unless `--filename` is used. + argument, the hopfile is added as a new template. A name is generated + using the VERSION and TYPE specified unless `--filename` is used. OPTIONS - `--template[=TEMPLATE1,TEMPLATE2...]` + `--template[=TEMPLATE1,TEMPLATE2...]` -  Specifies TEMPLATE hopfiles' names upon which to base the new hopfile. +  Specifies TEMPLATE hopfiles' names upon which to base the new +  hopfile. `install [OPTIONS] PACKAGE` From e2ae0ee88fbdbf637569259713139a5931d0daba Mon Sep 17 00:00:00 2001 From: emma Date: Sun, 4 Sep 2022 19:33:37 -0400 Subject: [PATCH 4/5] fixed indents pt. 3 for i am a fool --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 557f83e..a2b16aa 100644 --- a/README.md +++ b/README.md @@ -179,33 +179,33 @@ source = git+https://github.com/IrisShaders/Iris.git `get [OPTIONS] PACKAGE`  Searches for a PACKAGE, displays the results, and downloads any selected - PACKAGES to the local cache. +PACKAGES to the local cache. OPTIONS  `-n`, `--no-confirm`   Does not display search results and downloads exact matches to the -  cache. Requires `--mc-version` and `--type` be specified. +cache. Requires `--mc-version` and `--type` be specified. `init [OPTIONS] [--mc-version=VERSION] [--type=TYPE] TEMPLATE`  Creates a hopfile in the current directory and adds it to the global known - hopfiles list in the configuration file. If a TEMPLATE is passed as an - argument, the hopfile is added as a new template. A name is generated - using the VERSION and TYPE specified unless `--filename` is used. +hopfiles list in the configuration file. If a TEMPLATE is passed as an +argument, the hopfile is added as a new template. A name is generated +using the VERSION and TYPE specified unless `--filename` is used. OPTIONS  `--template[=TEMPLATE1,TEMPLATE2...]`   Specifies TEMPLATE hopfiles' names upon which to base the new -  hopfile. +hopfile. `install [OPTIONS] PACKAGE`  Adds a PACKAGE to the current hopfile and runs `hopper update`. If the - PACKAGE cannot be found in the package cache, it runs `hopper get` first. +PACKAGE cannot be found in the package cache, it runs `hopper get` first. OPTIONS @@ -220,5 +220,5 @@ OPTIONS `update [OPTIONS] PACKAGE`  Updates installed PACKAGEs and adds mods if they're missing to directories - with known hopfiles. If a PACKAGE is passed, `--type` must be specified so - that hopper `update`s the correct package. \ No newline at end of file +with known hopfiles. If a PACKAGE is passed, `--type` must be specified so that +hopper `update`s the correct package. \ No newline at end of file From 48e034984836467b305fa1df2e5f0ef5d3ee825f Mon Sep 17 00:00:00 2001 From: emma Date: Mon, 5 Sep 2022 04:25:09 -0400 Subject: [PATCH 5/5] grammar and formatting --- README.md | 70 +++++++++++++++++++++++++++---------------------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/README.md b/README.md index a2b16aa..6d821bb 100644 --- a/README.md +++ b/README.md @@ -21,16 +21,18 @@ A Minecraft package manager for the terminal. -Hopper can automatically search, download, and update Minecraft mods from -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 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. +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. 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. -It's written in Rust and released under the AGPLv3. +It's written in [Rust](https://www.rust-lang.org/) and released under the +[AGPLv3](LICENSE). 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 @@ -38,14 +40,11 @@ you're interested in helping out. If you have a taste in CLI apps like Hopper, your input is especially appreciated. Inspired by applications like [paru](https://github.com/morganamilo/paru), a -feature-packed AUR helper and [topgrade](https://github.com/r-darwish/topgrade). +feature-packed AUR helper and [topgrade](https://github.com/r-darwish/topgrade), a tool to upgrade everything -# Donate - - +[![Donate using +Liberapay](https://liberapay.com/assets/widgets/donate.svg)](https://liberapay.com/tebibytemedia/donate) # High-level Goals @@ -74,13 +73,14 @@ Liberapay" src="https://liberapay.com/assets/widgets/donate.svg"> - `zsh(1)` autocomplete - [Nushell](https://www.nushell.sh/) autocomplete - Configurable search result display like [Starship](https://starship.rs) +- Versioning system repository package management & compilation ## External-Dependent: - Conflict resolution - Dependency resolution - Integration into [PolyMC](https://polymc.org/) and/or [theseus](https://github.com/modrinth/theseus) -- Integration into `togprade(1)` +- Integration into `topgrade(1)` - Graphical frontend with notifications [Modrinth REST API @@ -93,24 +93,24 @@ docs](https://docs.modrinth.com/api-spec/) ├── hopper.conf ├── cache/ │ ├── 1.19.1/ -│ │ └── fabric +│ │ └── fabric/ │ └── 1.18.2/ -│ ├── forge -│ └── plugin +│ ├── forge/ +│ └── plugin/ └── templates/ - └── arbitrary.hop -> ~/.minecraft/mods/arbitrary.hop + └── example-template.hop -> ~/.minecraft/mods/example-template.hop ``` # Hopfile Structure Hopfiles will contain a Minecraft version number, a list of packages, the name -of the type of package it uses, and any references to other templates it's based -on. If a template is based on other templates, it inherits the packages from -those templates. A template does not inherit the package or Minecraft version -from another template. +of the type of package it uses, and any references to other hopfiles it's based +on, 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. ``` -template = abitrary +template = example-template mc-version = 1.19.2 @@ -122,11 +122,11 @@ sodium # Hopper Configuration File Structure -Hopper will maintain a list of all hopfiles known to hopper. Its config 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. +Hopper's configuration will be maintained with a list of all hopfiles known to +hopper. Its config 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. ``` [hopfiles] @@ -154,19 +154,19 @@ source = git+https://github.com/IrisShaders/Iris.git ## Common OPTIONS: -`-d`, `--dir[=FILE]` +`-d`, `--dir [FILE]`  Specifies the path for the hopfile being utilized -`-f`, `--filename=[FILE]` +`-f`, `--filename [FILE]`  Saves to a specific file name. -`-m`, `--mc-version[=VERSION]` +`-m`, `--mc-version [VERSION]`  Specifies for what VERSION of Minecraft PACKAGES are being managed -`-t`, `--type[=TYPE]` +`-t`, `--type [TYPE]`  Specifies what TYPE of PACKAGEs is being referenced @@ -188,7 +188,7 @@ OPTIONS   Does not display search results and downloads exact matches to the cache. Requires `--mc-version` and `--type` be specified. -`init [OPTIONS] [--mc-version=VERSION] [--type=TYPE] TEMPLATE` +`init [OPTIONS] --mc-version VERSION --type TYPE TEMPLATE`  Creates a hopfile in the current directory and adds it to the global known hopfiles list in the configuration file. If a TEMPLATE is passed as an @@ -197,7 +197,7 @@ using the VERSION and TYPE specified unless `--filename` is used. OPTIONS - `--template[=TEMPLATE1,TEMPLATE2...]` + `--template [TEMPLATE1,TEMPLATE2...]`   Specifies TEMPLATE hopfiles' names upon which to base the new hopfile. @@ -209,7 +209,7 @@ PACKAGE cannot be found in the package cache, it runs `hopper get` first. OPTIONS - `--template[=TEMPLATE1,TEMPLATE2...]` + `--template [TEMPLATE1,TEMPLATE2...]`   Specifies a template hopfile to which to install mods