How to use the command packwiz (with examples)
Packwiz is a command-line tool that allows users to create, edit, and manage Minecraft modpacks. With Packwiz, users can easily add, remove, and update mods in their modpacks. Additionally, Packwiz provides functionality to export modpacks in both Modrinth (.mrpack) and Curseforge (.zip) formats.
Use case 1: Interactively create a new modpack in the current directory
Code:
packwiz init
Motivation:
This use case is useful when you want to create a new modpack from scratch. By running packwiz init
, Packwiz will guide you through a series of prompts to set up a new modpack in the current directory.
Explanation:
packwiz init
is the command used to initialize a new modpack.- There are no arguments required for this command.
Example Output:
Initializing new modpack.
Please enter the modpack name: My Modpack
Please enter the modpack version: 1.0.0
Please enter the Minecraft version: 1.17.1
Modpack initialized successfully in the current directory.
Use case 2: Add a mod from Modrinth or Curseforge
Code:
packwiz modrinth|curseforge add url|slug|search_term
Motivation: This use case is helpful when you want to add a specific mod to your modpack. You can specify the mod either by providing the URL, slug, or search term to easily find and add the desired mod.
Explanation:
packwiz modrinth add
orpackwiz curseforge add
is used to add a mod from Modrinth or Curseforge, respectively.url|slug|search_term
is the argument that specifies the mod to be added. You can either provide the URL of the mod, the slug of the mod, or a search term to search for the mod.
Example Output:
Added mod: ModName (1.0.0)
Use case 3: List all mods in the modpack
Code:
packwiz list
Motivation: This use case is helpful when you want to view a list of all the mods currently present in your modpack.
Explanation:
packwiz list
is the command used to list all the mods in the modpack.- There are no arguments required for this command.
Example Output:
Mod List:
- ModA (1.0.0)
- ModB (2.0.0)
- ModC (1.5.2)
Use case 4: Update index.toml
after manually editing files
Code:
packwiz refresh
Motivation:
This use case is useful when you manually edit any files in your modpack and want to reflect those changes in the index.toml
file.
Explanation:
packwiz refresh
is the command used to update theindex.toml
file after making manual edits to the modpack files.- There are no arguments required for this command.
Example Output:
The 'index.toml' file has been updated.
Use case 5: Export as a Modrinth (.mrpack
) or Curseforge (.zip
) file
Code:
packwiz modrinth|curseforge export
Motivation: This use case is useful when you want to export your modpack in either Modrinth or Curseforge format to share it with others or publish it.
Explanation:
packwiz modrinth export
orpackwiz curseforge export
is used to export the modpack as a Modrinth or Curseforge file, respectively.- There are no arguments required for this command.
Example Output:
Modpack exported successfully as 'modpack.mrpack'.
Conclusion:
Packwiz is a versatile command-line tool that simplifies the creation, editing, and management of Minecraft modpacks. Whether you’re starting a new modpack, adding mods, updating files, listing mods, or exporting your modpack, Packwiz provides the necessary functionality to streamline the process.