30 Commits

Author SHA1 Message Date
v4n 9bfa8923fe chore: deprecate 2025-09-29 21:19:38 +03:00
v4n 87ec07b10a docs: improve (#95)
* docs: rewrite help commands

* docs: rewrite README.md

* docs: remove you language

* refactor: started parse refactor
2025-09-29 21:18:54 +03:00
v4n 687bdf6709 fix: modpack command works 2025-09-29 09:32:45 +03:00
v4n 3bf4a5e542 fix: modpack commands are separate (#93) 2025-09-21 07:20:58 +03:00
v4n c72ceb899e fix: nexus downloaded file http encoding 2025-09-16 22:49:21 +03:00
v4n 7c9544f419 fix: pick variant wrong labels 2025-09-16 17:10:50 +03:00
v4n 9627ee199f fix: pick variant wrong labels 2025-09-16 15:39:28 +03:00
v4n 53d9f8a093 fix: pick variant wrong labels 2025-09-16 15:35:54 +03:00
v4n 96163fc7d9 fix: remove SteamOS prompt in favor of automatic detection (#87) 2025-09-16 15:05:08 +03:00
v4n 84cbc80eb2 fix: pick variant empty folder 2025-09-16 14:53:31 +03:00
v4n 423ea1280d fix: pick variant exclusion 2025-09-16 14:45:06 +03:00
v4n 05548ca460 docs: add changelogs link 2025-09-16 14:17:55 +03:00
v4n 30649e0312 feat: enhance variant picker (#86)
* fix: variant display is more clear

* fix: unable to install all variants

* feat: select variants with ranges and exclusions
2025-09-16 14:13:51 +03:00
v4n c3d76c625c fix: help command stops displaying an error (#84) 2025-08-28 20:40:47 +03:00
v4n a9a17a7617 fix: /tmp no longer clogged by random leftover mods (#82) 2025-08-28 20:35:23 +03:00
v4n 711d416e49 fix: order command changing indexes wrong (#79) 2025-08-01 16:17:20 +03:00
v4n a9e11211f4 fix: wrong mod name when using Nexus integration 2025-07-21 15:52:13 +03:00
v4n 1d35ac00d7 fix: remove nexus-update from help (#75)
* fix: remove nexus-update from help

* bump: version
2025-07-18 15:31:23 +03:00
v4n 5b10fbf364 fix: error when updating on steam deck (#72) 2025-07-12 12:36:12 +03:00
v4n 1f2a34dc5b fix: additional help 2025-07-09 20:50:57 +03:00
v4n 159dd47851 fix: help messages/docs 2025-07-09 20:39:32 +03:00
v4n 73cd330ab0 fix: docs 2025-06-30 22:31:51 +03:00
v4n 2efed53b4c fix: enable command no longer changes order (#70) 2025-06-30 13:17:31 +03:00
v4n b501f642c9 fix: no sudo if path writable (#68) 2025-06-28 16:43:29 +03:00
v4n 28684be2de fix: disable command reaching file char limit (#66) 2025-06-23 09:44:20 +03:00
v4n 397b50bc19 code: database headers are universal 2025-06-21 12:41:09 +03:00
v4n 61a15ef816 fix: order command works again 2025-06-21 11:55:49 +03:00
v4n d435bb35ac fix: color 2025-06-21 11:47:18 +03:00
v4n a75d92252e fix: list verbose mode not crashing 2025-06-21 11:46:11 +03:00
v4n 2c51e2bfd3 fix: version number url 2025-06-20 15:18:18 +03:00
4 changed files with 771 additions and 506 deletions
+42 -88
View File
@@ -1,122 +1,76 @@
# Helldivers 2 Mod Manager CLI
Helldivers 2 Mod Manager CLI is a command line interface for managing Helldivers 2 mods. Since there is no Linux mod manager available and I like being a nerd by using CLI tools instead of GUIs, this project was born.
## Deprecation notice
This mod manager is complete, the version will always [remain at 0.x.x](https://0ver.org/). Version 0.6.x will be the last version of this mod manager.
> [!Caution]
> This project is deprecated as of 30/09/2025 in favor of [Arsenal](https://www.nexusmods.com/helldivers2/mods/4664)'s 0.30.0 release, a GUI mod manager that supports every feature of Helldivers 2 Mod Manager CLI and more, on Linux.
**Thank you for the support up until now and make sure to check out Arsenal!**
## Overview
Helldivers 2 Mod Manager CLI is a command line interface for managing Helldivers 2 mods. Since there is no Linux mod manager available and I like being a nerd by using CLI tools instead of GUIs, this project was born.
## Installation
Pre-requisites:
- You must have the `unzip` package installed for zip archives;
- You might want to have the `unarchiver` package installed for rar archives.
- The `unzip` package must be installed for ZIP archives.
- The `unarchiver` package is recommended for RAR and 7Z archives.
To install Helldivers 2 Mod Manager CLI run the following command in your terminal:
To install Helldivers 2 Mod Manager CLI run the following command in the terminal:
```bash
bash -c "$(curl -fsSL https://raw.githubusercontent.com/v4n00/h2mm-cli/refs/heads/master/install.sh)"
```
> [!CAUTION]
> Running this script will require sudo permissions. **DO NOT TRUST** random scripts from the internet. If you want to review the script before running it, check out the repository for yourself.
## Usage
The script gets added to `/usr/local/bin/h2mm` (or `$HOME/.local/bin` on Steam Deck) and can be used by running `h2mm` in your shell, which will show the help message explaining how to use the script.
The script gets added to `/usr/local/bin/h2mm` (or `$HOME/.local/bin` on Steam Deck) and can be used by running `h2mm` in the shell, which will print the help message along with all available commands.
```bash
h2mm
h2mm --help
```
### Available commands
To find out how to use a command, run `h2mm COMMAND --help`. This is the most up-to-date source of information about the commands.
- `install` or `i` - Install a mod by the file provided (directory, zip, patch);
- `uninstall` or `u` - Uninstall a mod;
- `list` or `l` - List all installed mods;
- `enable` or `e` - Enable a mod;
- `disable` or `d` - Disable a mod;
- `rename` or `r` - Rename a mod;
- `order` or `o` - Change load order for a mod;
- `export` or `ex` - Export installed mods to a zip file;
- `import` or `im` - Import mods from a zip file;
- `modpack-create` or `mc` - Create a modpack from the currently installed mods;
- `modpack-switch` or `ms` - Switch to a modpack;
- `modpack-list` or `ml` - List all installed modpacks;
- `modpack-delete` or `md` - Delete a modpack;
- `modpack-overwrite` or `mo` - Overwrite a modpack;
- `modpack-reset` or `mr` - Reset all installed modpacks;
- `nexus-setup` or `ns` - Setup Nexus Mods integration;
- `update` or `up` - Update h2mm to latest version;
- `reset` or `rs` - Reset all installed mods;
- `help` or `h` - Display this help message.
## Available commands
### Examples
- `install` or `i` - Install a mod by the file provided (directory, zip, patch)
- `uninstall` or `u` - Uninstall a mod
- `list` or `l` - List all installed mods
- `enable` or `e` - Enable a mod
- `disable` or `d` - Disable a mod
- `rename` or `r` - Rename a mod
- `order` or `o` - Change load order for a mod
- `export` or `ex` - Export installed mods to a zip file
- `import` or `im` - Import mods from a zip file
- `modpack` or `m` - Manage modpacks (collections of mods)
- `nexus-setup` or `ns` - Setup Nexus Mods integration
- `update` or `up` - Update h2mm to latest version
- `reset` or `rs` - Reset all installed mods
- `help` or `h` - Display this help message
To find out how to use a command, you can run `h2mm <COMMAND> --help`.
#### Install mod(s)
```bash
h2mm install mod.zip
h2mm install /path/to/mod/directory/
h2mm install /path/to/mod.zip /path/to/mod2.zip /path/to/mod/files # mix and match hoewever you want
h2mm install -n "Example mod" mod.patch_0 mod.patch_0.stream # -n is mandatory when using files
```
> It's better to be in the directory where the mod files are located, so you don't have to specify the full path. For mod downloads, you can do `cd ~/Downloads` and then run the command.
>
> Also, use the Tab key to autocomplete the file names, as it will help you escape special characters likes spaces or quotes.
#### List installed mods
## Examples
```bash
h2mm install --help
h2mm install ~/Downloads/mod.zip
h2mm install ~/Downloads/mod\ files/
h2mm install a0b1c2d3.patch_0 a0b1c2d3.patch_0.stream -n "Example mod"
h2mm list
h2mm list -v # verbose mode
h2mm uninstall --index 3
h2mm modpack create "Example modpack"
h2mm modpack switch "Example modpack"
```
#### Uninstall a mod
```bash
h2mm uninstall -n "Example mod"
h2mm uninstall -i 3 # get the index from the list command
```
#### Enable/disable mods
```bash
h2mm enable -n "Example mod"
h2mm enable -i 3
h2mm disable -n "Example mod"
h2mm disable -i 3
```
#### Updating the script
```bash
h2mm update
```
> When installing, it is recommended to be in the directory where mod archives are, or to use absolute paths. Use `cd ~/Downloads` to go to the Downloads folder, and run `ls -la` to find the archives to install. Use the Tab key to auto-complete file and folder names, this helps escape spaces and special characters.
>
> Use the `--index` flag with commands that normally require a mod name to specify a mod by its index. The index can be obtained with `h2mm list`.
## Nexus Mods integration
Nexus Mods integration allows you to use the 1-click install feature of Nexus Mods (with the "Vortex" or "Mod manager download" buttons). You can set up Nexus Mods integration by running the following command:
```bash
h2mm nexus-setup
```
You will be walked through the setup process, which will ask you for your Nexus Mods API key and your preferred terminal.
## Compatibility
The script is developed and tested on Arch Linux, but it should work on other Linux distributions as well. If you encounter any issues, please open an issue on the repository.
Status of platforms:
- Linux :white_check_mark:
- Steam Deck :white_check_mark:
- Windows - WSL :white_check_mark:
> The script works on WSL, but you need to specify the path to the Helldivers 2 mods directory manually, to find your Windows partition head to `/mnt/` and from there go to your Helldivers 2 data directory, on a typical install it should be on `/mnt/c/Program\ Files\ \(x86\)/Steam/steamapps/common/Helldivers\ 2/data`. You also need to have `unzip` installed, which can be done by running `sudo apt install unzip`. Nexus Mods integration is not supported on WSL.
Nexus Mods integration allows the use the 1-click install feature of Nexus Mods (with the "Vortex" or "Mod manager download" buttons). Set up Nexus Mods integration by running `h2mm nexus-setup`. Setup includes providing the Nexus Mods API key and selecting the preferred terminal.
## Contributing
+683 -385
View File
File diff suppressed because it is too large Load Diff
+39 -26
View File
@@ -27,17 +27,7 @@ function log() {
# --- Main ---
# warning
log INFO "${RED}!!! WARNING !!!${NC}"
cat << EOF
This script will install Helldivers 2 Mod Manager CLI for Linux to $DESTINATION_PATH/h2mm.
Running this script will require sudo permissions. DO NOT TRUST random scripts from the internet.
If you want to review the script before running it, check out the repository for yourself:
https://github.com/v4n00/h2mm-cli
EOF
log INFO "${RED}!!! WARNING !!!${NC}"
log INFO ""
log INFO "Running h2mm CLI Installer (https://github.com/v4n00/h2mm-cli)"
# breaking changes hash table
breaking_changes_patches=(
@@ -71,22 +61,29 @@ if [[ -x "$(command -v h2mm)" ]]; then
fi
fi
# if steam deck, set destination path to ~/.local/bin
log PROMPT "Are you installing on a Steam Deck? (y/N): "
IFS= read -e response_sd
# if steam os, set destination path to ~/.local/bin
steamos=false
if [[ "$response_sd" == "y" || "$response_sd" == "Y" ]]; then
# steam deck
if [[ -f "/etc/os-release" ]]; then
if grep -q "ID=steamos" /etc/os-release; then
steamos=true
fi
fi
if [[ $steamos == true ]]; then
# steam os
DESTINATION_PATH="$HOME/.local/bin"
log INFO "Detected SteamOS, setting installation path to ${ORANGE}$DESTINATION_PATH${NC}."
mkdir -p "$DESTINATION_PATH"
# check if ~/.local/bin is in PATH
if [[ ":$PATH:" != *":$HOME/.local/bin:"* ]]; then
# add ~/.local/bin to PATH
log INFO "Installing the script on a Steam Deck means adding $DESTINATION_PATH to your \$PATH."
log INFO "Installing the script on SteamOS means adding ${ORANGE}$DESTINATION_PATH${NC} to your \$PATH."
log INFO "If you're using a different shell than bash (the default), you may need to add it manually."
log PROMPT "Do you want to add $DESTINATION_PATH to your \$PATH in ~/.bashrc? (Y/n): "
log PROMPT "Do you want to automatically add ${ORANGE}$DESTINATION_PATH${NC} to your \$PATH in ~/.bashrc? (Y/n): "
IFS= read -e response
if [[ "$response" == "y" || "$response" = "Y" || -z "$response" ]]; then
echo "export PATH=\"\$HOME/.local/bin:\$PATH\"" >> "$HOME/.bashrc"
@@ -95,13 +92,13 @@ if [[ "$response_sd" == "y" || "$response_sd" == "Y" ]]; then
source "$HOME/.bashrc"
export PATH="$HOME/.local/bin:$PATH" # fallback kinda in case sourcing fails
log INFO "Added $DESTINATION_PATH to your \$PATH in ~/.bashrc."
log INFO "Added ${ORANGE}$DESTINATION_PATH${NC} to your \$PATH in ~/.bashrc."
fi
fi
else
# not steam deck
# not steam os
# set another path if needed
log PROMPT "Install the script to $DESTINATION_PATH or specify another path (must be included in \$PATH)? (Y/path): "
log PROMPT "Install the script to ${ORANGE}$DESTINATION_PATH${NC} or specify another path (must be included in \$PATH)? (Y/path): "
IFS= read -e response
if [[ "$response" != "y" && "$response" != "Y" && -n "$response" ]]; then
@@ -180,9 +177,17 @@ if [[ $latest_major -gt $installed_major ]]; then
fi
# install
log INFO "Installing h2mm to $DESTINATION_PATH."
sudo curl "$REPO_URL"/h2mm --output "$DESTINATION_PATH/h2mm"
sudo chmod +x "$DESTINATION_PATH/h2mm"
log INFO "Installing h2mm to ${ORANGE}$DESTINATION_PATH${NC}."
# check if we need sudo based on destination path
SUDO_CMD=""
if [[ ! -w "$DESTINATION_PATH" || ( -f "$DESTINATION_PATH/h2mm" && ! -w "$DESTINATION_PATH/h2mm" ) ]]; then
SUDO_CMD="sudo"
log INFO "Destination path ${RED}requires${NC} elevated permissions, using sudo."
fi
$SUDO_CMD curl "$REPO_URL"/h2mm --output "$DESTINATION_PATH/h2mm"
$SUDO_CMD chmod +x "$DESTINATION_PATH/h2mm"
log INFO ""
[[ ! -x "$(command -v h2mm)" ]] && { log ERROR "Installation failed. Mod manager was not found in \$PATH." ; exit 1; }
@@ -194,5 +199,13 @@ log INFO " -> \"unarchiver\" package for .rar archives"
log INFO "If you do not know how to install these packages, please search for your linux distro on how to install packages."
log INFO ""
log INFO "Use the mod manager by running 'h2mm' in your terminal."
log INFO "Check out the Nexus Mods integration by running 'h2mm nexus-setup'."
log INFO "Made with love <3 by v4n and contributors."
log INFO "View the changelogs: https://github.com/v4n00/h2mm-cli/releases/latest"
log INFO "Check out the ${ORANGE}Nexus Mods integration${NC} by running 'h2mm nexus-setup'."
log INFO "Made with <3 by v4n and contributors."
log INFO ""
log INFO "${RED}Special announcement:${NC}"
log INFO "The Helldivers 2 Mod Manager CLI is now deprecated in favor of the Arsenal Mod Manager."
log INFO "Check it out here: https://www.nexusmods.com/helldivers2/mods/4664"
log INFO "The Arsenal Mod Manager has a GUI and is more user friendly,"
log INFO "making it the preferred choice for most users, especially since it now works on Linux!"
log INFO "Thank you for using the Helldivers 2 Mod Manager CLI, and we hope to see you on the Arsenal Mod Manager!"
+1 -1
View File
@@ -1 +1 @@
0.6.0
0.7.0