Giter Site home page Giter Site logo

packwiz / packwiz Goto Github PK

View Code? Open in Web Editor NEW
555.0 11.0 64.0 434 KB

A command line tool for editing and distributing Minecraft modpacks, using a git-friendly TOML format. Supports CurseForge and Modrinth mods with automated updates!

Home Page: https://packwiz.infra.link/

License: MIT License

Go 98.03% Nix 1.37% HTML 0.60%
minecraft packwiz

packwiz's Introduction

packwiz

packwiz is a command line tool for creating Minecraft modpacks. Instead of managing JAR files directly, packwiz creates TOML metadata files which can be easily version-controlled and shared with git (see an example pack here). You can then export it to a CurseForge or Modrinth modpack, or use packwiz-installer for an auto-updating MultiMC instance.

packwiz is great for...

  • Distributing private modpacks for servers
  • Creating modpacks for CurseForge and Modrinth

packwiz is not so great for...

Join my Discord server if you need help here!

Features

  • Git-friendly TOML-based metadata format
  • MultiMC pack installer/updater, with support for optional mods and fast automatic updates - perfect for servers!
  • Pack distribution with HTTP servers, with a built in local server for testing
  • Easy installation and updating of multiple mods at once from CurseForge and Modrinth
  • Exporting to CurseForge and Modrinth packs
  • Importing from CurseForge packs
  • Server-only and Client-only mod handling
  • Creation of remote file metadata from JAR files for CurseForge mods

Installation

Prebuilt binaries are available from GitHub Actions - the UI is a bit terrible, but essentially select the top build, then download the artifact ZIP for your system at the bottom of the page.

Another option is to use nightly.link. Just go to the page, and download the artifact for your system.

To run the executable, first extract it, then add the folder where you extracted it to your PATH environment variable (see tutorial for Windows here) or move it to where you want to use it.

In future I will have a lot more installation options, but you can also compile from source:

  1. Install Go (1.19 or newer) from https://golang.org/dl/
  2. Run go install github.com/packwiz/packwiz@latest. Be patient, it has to download and compile dependencies as well!

Documentation

See https://packwiz.infra.link/ for the full packwiz documentation!

packwiz's People

Contributors

aharabedian avatar austreelis avatar brawaru avatar comp500 avatar draylar avatar falxie avatar fredster33 avatar jaegyudev avatar jamierocks avatar joeyak avatar kaioru avatar maks1ms avatar mja00 avatar noahreinalter avatar omay238 avatar scotsguy avatar theepicblock avatar theta-dev avatar tricked-dev avatar triphora avatar whovian9369 avatar yoshirulz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

packwiz's Issues

Command to add an arbitrary URL

It should download the file, calculate the hash and an appropriate name, and make a .toml file in the mods folder accordingly. Bonus points if it can extract Forge/Fabric metadata and assign clientside/serverside accordingly!

Curseforge pack export recursion

packwiz cf export makes an export.zip that if you index, will be recursively included in itself!

I should make it not do that. For now, if you encounter this issue, make a .packwizignore with export.zip in it.

Reorder install search results to make Cancel input consistent

Currently, install can search for mods on either host, but currently it lists results as such:

0) First Result
1) Second Result
...
X) Cancel

This means that the input to select the first result is always consistently 1, but the input to cancel changes depending on the search.

As an alternative, search results could be listed as

0) Cancel
1) First Result
2) Second Result
X) Xth Result

Which would both keep the keypresses consistent, and on a QWERTY number row, have the "cancel" operation be located farthest from the first result.

Install mods from GH releases

Could even be extended to use a specific commit if GH actions are used; would be a bit complicated with having to download artifacts, then unzip and stuff, but that would be amazing

Segmentation violation when using curseforge detect

`$ ../packwiz/packwiz curseforge detect
Loading modpack...
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x8908bb]

goroutine 1 [running]:
github.com/comp500/packwiz/curseforge.glob..func1.1(0x9815bc, 0x4, 0x0, 0x0, 0xa26c00, 0xc0001690e0, 0x6, 0x6)
/home/username/tmp/packwiz/curseforge/detect.go:38 +0x3b
path/filepath.Walk(0x9815bc, 0x4, 0xc0001ef818, 0x2, 0xc00017f408)
/usr/local/go/src/path/filepath/path.go:499 +0x7e
github.com/comp500/packwiz/curseforge.glob..func1(0xcc6c40, 0xcfffa0, 0x0, 0x0)
/home/username/tmp/packwiz/curseforge/detect.go:37 +0x3be
github.com/spf13/cobra.(*Command).execute(0xcc6c40, 0xcfffa0, 0x0, 0x0, 0xcc6c40, 0xcfffa0)
/home/username/go/pkg/mod/github.com/spf13/[email protected]/command.go:830 +0x2c2
github.com/spf13/cobra.(*Command).ExecuteC(0xcc6240, 0xc000000180, 0x200000003, 0xc000000180)
/home/username/go/pkg/mod/github.com/spf13/[email protected]/command.go:914 +0x30b
github.com/spf13/cobra.(*Command).Execute(...)
/home/username/go/pkg/mod/github.com/spf13/[email protected]/command.go:864
github.com/comp500/packwiz/cmd.Execute()
/home/username/tmp/packwiz/cmd/root.go:24 +0x31
main.main()
/home/username/tmp/packwiz/main.go:12 +0x25`

Totally new to packwiz.
go version go1.16.3 linux/amd64
MX Linux

Command to Upgrade(/Downgrade) Minecraft Version

It would be great to be able to provide a new minecraft version (and array of other acceptable versions) and have all mods attempt to upgrade to that version.

Here's some sample output:

1.15 pack> packwiz upgrade minecraft 1.16.5 --a "[1.16.2, 1.16.3, 1.16.4]"
---
2 Mods have an available upgrade
appleskin: AppleSkin-mc1.15.2-forge-1.0.14.jar -> AppleSkin-mc1.16.2-forge-1.0.14.jar 
quark: Quark-r2.1-245.jar -> Quark-r2.4-312.jar
---
Upgrade mods? (y/n)> y
Upgrade Complete.
1 Mods with upgrade sources have no update for this version:
---
astral-sorcery: AstralSorcery-1.15.2-1.12.14.jar / AstralSorcery-1.15.2-1.12.14.jar (latest)
---
Remove these mods? (y/n)> y
Removed.
Note: 1 mods without upgrade sources
---
optifine: OptiFine_1.15.2_HD_U_G6
---
1.16 pack>

packwiz deleted all the jar files in mod directory and replaced with toml files?

So, after resolving my prior issue, decided to try it on an install. Well, it seemed to work and even seemed to update some mods, but when I launched the game, no mods loaded. So, looked in the mods folder only to find nothing but toml files and no jar files anymore. I presume this is not intended.

EDIT: On a whim I tried cf install Abnormals Core (one of the mods in the pack) to see if it changed anything, but no. Still no mod jars anywhere to be found.

Add option to install curseforge mod by curseforge link

Some mods are cursed with the flaws of CF's mod search and don't show up in the first 10 results, no matter how you word your search. I think it would be a good idea if you can have a CF link to the mod's page like packwiz curseforge install https://www.curseforge.com/minecraft/mc-mods/not-enough-crashes.

Updating a mod will overwrite custom path in "filename" setting

How to reproduce:

  • Change the "filename" setting of any metadata file so it has a custom path -- e.g. filename = "example/mods.jar".
  • Do "packwiz update --all".
  • Check metadata file .
  • "example/" is gone.

Suggestion:
Add a setting for a custom path/directory where the mod will be downloaded in.

i don't know if this is a bug or something that is just not implemented

Use Jumploader when exporting Fabric modpacks for Twitch

Description of bug

When exporting a pack using packwiz cf export and trying to import the export.zip in Twitch it gives the error shown below.

Reproduction steps

  1. Create new pack with packwiz init
  2. Select fabric as modloader and use latest version.
  3. Add any mod (haven't tried it without mods)
  4. Run packwiz cf export and import the zip in Twitch.

Images

image

Assumption

I don't know anything about the format that Twitch uses for exporting modpacks but I guess it maybe because in the export.zip/manifest.json file the minecraft.modLoaders property is an empty array.

Feature Request: better error messages for misconfigured `pack.toml`

It'd be great if there was better feedback when you've configured your pack.toml incorrectly!

With

name = "Pengolod's Base Modpack"
author = "Pengolod"
version = "1.0.0"

[index]
file = "index.toml"
hash-format = "sha256"
hash = "6b0dad5550b8fc6a9f06ff26b9584f02857bcec62582ed97315eaf0477b22278"

[versions]
fabric = "0.11.7"
minecraft = "1.17.1"
acceptable-game-versions = ["1.17"]

I got the output

โœ—  packwiz refresh
Loading modpack...
toml: cannot load TOML value of type []interface {} into a Go string

which I slowly figured out meant that I had put the acceptable-game-versions in the wrong object, but it'd be great to get clear feedback :D

preferably: "acceptable-game-versions is not a valid config value for [versions], perhaps you meant

[options]
acceptable-game-versions = ["1.17"]

?"

thanks for making this great tool btw!

Add GUI

I suggest considering a simple GUI. Perhaps using the most primitive webview/webview. It would be a set of HTML partials and a couple Go files to launch the webview, declare JS bindings and compile HTML partials

Mod/Client-related Configuration Files (and *packs)

Hey there!

Thanks for your great work! I'm not sure if I missed some part of the documentation or if my assumptions are flawed, but... how do I configure the installed mods for the modpack? Can I change client settings (options.txt)? Right now, I make these changes in a MultiMC instance (that I call "Staging") as well as setup the pre-run command to use the packwiz installer.

Is there a way to update configuration files through the packwiz method? What about resourcepacks, shaderpacks, etc.?

Thanks!

EDIT: My gut feeling told me that I should be able to just drop the .minecraft/config folder in my packwiz modpack, and refresh indices to sync those to my clients as well -- I missed the documentation for that, so I simply haven't tried that yet. Would that work?

Command/Argument to read File/Patchnotes while Upgrading

Currently, packwiz upgrade is able to list out the mods that have available updates using their friendly name, and the file replacements that will occur on upgrade.
image
(Ignore the unrelated CF versioning issues)

CF, MR, and Github Releases provide space for mod authors to include notes on each version, so it would be useful to be able to include these with the output with some kind of --verbose argument, and/or allow the user to view a specific one during the [y/n] prompt by specifying an index.

Example output:

Modpack_Folder> packwiz upgrade --all
Loading modpack...
Reading mod files...
Checking for updates...
Updates found:
1 - AppleSkin: appleskin-mc1.16-fabric-1.0.11.jar -> AppleSkin-mc1.16.2-forge-1.0.14.jar
2 - CleanCut: cleancut-mc1.16-2.1-fabric.jar -> cleancut-mc1.16-2.2-forge.jar
Do you want to update? [y/n]  (enter # for more info): 1
AppleSkin-mc1.16.2-forge-1.0.14.jar Changelog:
---
Updated to 1.16.2 (thanks @sagesse-cn)
---
URL: https://www.curseforge.com/minecraft/mc-mods/appleskin/files/3035787
# Releases since your version: unknown (your version was not found on the update source)
Do you want to update? [y/n/#]: 
Modpack_Folder> packwiz upgrade --all --verbose
Loading modpack...
Reading mod files...
Checking for updates...
Updates found:
1 - AppleSkin: appleskin-mc1.16-fabric-1.0.11.jar -> AppleSkin-mc1.16.2-forge-1.0.14.jar
      ---
      Updated to 1.16.2 (thanks @sagesse-cn)
      ---
2 - CleanCut: cleancut-mc1.16-2.1-fabric.jar -> cleancut-mc1.16-2.2-forge.jar
      ---
      No changelog provided
      ---
Do you want to update? [y/n/#]:

"Access is denied." error

When doing the command packwiz init --author Micalobia --fabric-latest --latest --name TestModpack --version 1.0 --modloader fabric, it prints an Access is denied. error for open AppData\Local\ElevatedDiagnostics. When running it with admin privileges, it shows open LogFiles\WMI\RtBackup instead.

Install a JAR from URL

Something like packwiz install https://example.com/mod.jar that would automatically calculate the hash and make the toml file.

Multiple source mod deduplication

The name of this issue is a bit confusing, so let me elaborate on what this means.

  • Modpack maker installs Fabric API from Modrinth
  • Modpack maker installs a mod from CurseForge that lists Fabric API as a dependency
  • It asks the modpack maker to install Fabric API as a dependency.
    This is a relatively minor thing, but considering I have to select n every time I update Xaero's, it's a bit of an annoyance.
    The solution here that I see is to check the slug of the dependency (Fabric API on CF and MR use the same slug) rather than to check whether it shares the same project ID.

packwiz curseforge export to specified path

This is probably related to #7 to some degree.

When using the packwiz curseforge export command, it'd be nice to be able to specify a path for it to export to after export. E.g. packwiz curseforge export <path-to-export>. Perhaps also have a default location, thus it could be added to the .packwizignore when using packwiz init.

This is probably relevant for the modrinth export command as well, now that I think about it, though I don't make use of this personally.

Suggest installing new dependencies when updating mods

packwiz does not recheck dependencies when doing updates. Example, Expanded Storage now requires a dependency, but when I updated, it did not install it. So I installed it again, and then it grabbed the library mod as well.

Flag to confirm prompts

packwiz update --all will prompt for confirmation if updates are found, it would be nice to have a flag (like -y, --yes) to set a default answer.

Dependency support for Modrinth

Failed installing mod: json: cannot unmarshal object into Go struct field Version.dependencies of type string

  • Trying to install modmanager (packwiz modrinth install modmanager)
  • https://modrinth.com/mod/modmanager
  • MR api for the specific version (curl -i -s 'https://api.modrinth.com/api/v1/version/CdhVgHal'):
    "dependencies":[{"version_id":"E4QBMVtO","dependency_type":"required"}]

Per-file mod loader filtering on CurseForge

The same happens to Music Disks Galore.
Steps to reproduce:

  1. create a Fabric pack containing Xaeros' Minimap (does not matter if outdated or not)
  2. use packwiz update --all
  3. see that Xaeros' Minimap has been replaced with the Forge version

packwiz completion installed incorrectly

When using the command: packwiz utils completion bash. The completion.sh file gets placed correctly however when looking in the .bashrc file, the path to the file uses a windows formatted path not a bash one. i.e C:\Users\username\AppData\Roaming\packwiz\completion.sh instead of /c/Users/username/AppData/Roaming/packwiz/completion.sh.

May just be my configuration, I use git bash for windows. Easy enough fix for myself.

When the pack-root option is set in pack.toml, export should treat it as overrides instead of a subdirectory of overrides

Currently, if you have pack-root set in pack.toml, e.g. packdata in this case, and then run something like packwiz curseforge export, packdata is added as a subdirectory of overrides instead of having the contents of the directory packdata be directly in overrides.

Here's an example of what the pack-root directory structure looks like, in case I'm being unclear:

packdata (pack-root)
โ””โ”€ test.txt

Current behavior makes the zip file generated when using packwiz curseforge export contain:

<modpack-name>-<version>.zip
โ””โ”€ overrides
|  โ””โ”€ packdata
|     โ””โ”€ test.txt
โ””โ”€ manifest.json
โ””โ”€ modlist.html

Preferable output would be:

<modpack-name>-<version>.zip
โ””โ”€ overrides
|  โ””โ”€ test.txt
โ””โ”€ manifest.json
โ””โ”€ modlist.html

This will let you dump most of the actual modpack related stuff in the pack-root specified directory, and have it properly included during export and help organize things a little :)

(optional, but related): A way to have index.toml in the pack-root specified directory without getting open index.toml: The system cannot find the file specified. when trying to run packwiz commands. E.g. by having an [option] that specifies the location of it, cuz then you could add that to the pack-root directory too.

Slow to update to new curseforge releases

It seems to be quite difficult to grab brand new releases for mods from curse forge, specifically mods that have been updated within about the past 2 days.

Tried with: https://www.curseforge.com/minecraft/mc-mods/gift-it/files, https://www.curseforge.com/minecraft/mc-mods/knowyourknot-enderporter and https://www.curseforge.com/minecraft/mc-mods/bits-and-chisels all of which wouldn't return the latest files

Tried using the --addon-id, --file-id approach but got the same results

[Enhancement Proposal] Multilingual GUI & CMD

I think it's nice to have this app in more languages. Some modpack users may don't know english very well or at all. Also english GUI elements doesn't look very well with mod descriptions in other language.

Curseforge mod search is broken in recent versions.

In the latest version, searching for mods will just result in the 10 most popular mods of all time being displayed regardless of the search terms.

Example:

$ packwiz cf install automatic
Searching CurseForge...
0) Cancel
1) *Just Enough Items (JEI)
2) Mouse Tweaks
3) AutoRegLib
4) JourneyMap
5) AppleSkin
6) Baubles
7) Biomes O' Plenty
8) Iron Chests
9) Bookshelf
10) Storage Drawers

I even tried giving the url to the curseforge page, but that also produced the same result.
Rolled back to a version from a few days ago, and the issue is no longer there.

Property to allow optional mods to be grouped

Add an additional property to optional named group that accepts a string, mods with the same group name are grouped on the optional mods screen.

This is useful when a set of mods are dependent on eachother, such as when allowing users to swap between sodium and dependents, or canvas and dependents.

Allow importing a list of mods from a text file

They would be seperated with newlines. It would autodetect CF/Modrinth based on URL, but if it found an unknown url you could specify which platform it was (self hosted modrith??)

The autodetect might also be used in general, to make adding mods easier.

(minor bug) "unknown command" shows twice

emma ~/repos/waffle.coffee/packwiz/ (1.18) $ packwiz servw
Error: unknown command "servw" for "packwiz"

Did you mean this?
        serve

Run 'packwiz --help' for usage.
unknown command "servw" for "packwiz"

Did you mean this?
        serve

emma ~/repos/waffle.coffee/packwiz/ (1.18) $ 

Occurs with and without bash completion. Found on both latest commit (db586b6) and 92ba8ef.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.