Skip to content

Magma is a CLI tool for Arma 3 server mod managment that works both on Windows and Linux.

License

Notifications You must be signed in to change notification settings

CreepPork/Magma

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Magma

Magma is a CLI tool for Arma 3 server mod managment that works both on Windows and Linux.

oclif Version Codecov Downloads/week License

Features

  • Downloads mods from Steam Workshop, moves to directories, installs keys, updates config files
  • Windows and Linux server support
  • Server mod support (-serverMod=...)
  • Client-side mod support (only installs keys)
  • Fully supports non-interactive shells
  • Support for a cron job (or task scheduler on Windows) that checks for mod updates and if found notifies Discord
  • Ability to update and remove mods
  • Supports mod activation and deactivation (doesn't remove them from disk)
  • Supports Steam Guard
  • Local mod support

Requirements

  • Node >= v10

Windows

npm install --global --production windows-build-tools

The following is also required:

  • Windows SDK - only the "Desktop C++ Apps" components are needed to be installed

Linux

To build Magma on Linux, make, python and build-essential is required.

sudo apt install -y make python build-essential

Usage

$ npm install -g @creeppork/magma
$ magma COMMAND
running command...
$ magma (-v|--version|version)
@creeppork/magma/3.0.0-beta.9 linux-x64 node-v16.13.0
$ magma --help [COMMAND]
USAGE
  $ magma COMMAND
...

Commands

magma activate [ID]

Activates mods by adding their symlinks and keys back.

USAGE
  $ magma activate [ID]

ARGUMENTS
  ID  Steam Workshop item IDs.

OPTIONS
  -n, --nonInteractive  Do not prompt for any input.

EXAMPLES
  magma activate
  magma activate 723217262
  magma activate 450814997 723217262 713709341

See code: src/commands/activate.ts

magma add IDS

Adds Steam Workshop items to the configuration files (does not download them).

USAGE
  $ magma add IDS

ARGUMENTS
  IDS  Steam Workshop item IDs.

OPTIONS
  -n, --nonInteractive          Do not prompt for any input.
  -t, --type=all|client|server  [default: all]

EXAMPLES
  magma add 723217262 --type client
  magma add 450814997 723217262 713709341 --type all client server

See code: src/commands/add/index.ts

magma add:local PATHS

Adds local mods to the configuration files.

USAGE
  $ magma add:local PATHS

ARGUMENTS
  PATHS  File paths.

OPTIONS
  -n, --nonInteractive          Do not prompt for any input.
  -t, --type=all|client|server  [default: all]

EXAMPLES
  magma add:local /home/arma/@client --type client
  magma add:local /home/arma/@all /home/arma/@client /home/arma/@server --type all client server

See code: src/commands/add/local.ts

magma configure

Allows to modify the existing configuration file. In interactive mode all flags will be ignored (except Steam Guard).

USAGE
  $ magma configure

OPTIONS
  -b, --batchScript=batchScript                        Absolute path to the Batch script starting your server, where it
                                                       has your mods (only supported on Windows)

  -c, --steamCmd=steamCmd                              Absolute path to the SteamCMD executable (including the file
                                                       itself).

  -g, --steamGuard=steamGuard                          Steam Guard code to use when authenticating.

  -l, --linuxGsmInstanceConfig=linuxGsmInstanceConfig  Absolute path to the LinuxGSM instance configuration file (where
                                                       it handles mods/servermods) (only supported on Linux)

  -n, --nonInteractive                                 Do not prompt for any input.

  -p, --password=password                              Steam user password.

  -s, --server=server                                  Absolute path to the directory where the server is (where the
                                                       server executable is).

  -u, --username=username                              Steam username.

  -w, --webhookUrl=webhookUrl                          Webhook URL to which the magma cron command will respond to.

ALIASES
  $ magma config

EXAMPLES
  magma configure
  magma configure --steamCmd "/var/steamcmd"
  magma configure -n -u UserName

See code: src/commands/configure.ts

magma cron

A command designed to be run in a time-based job scheduler to notify on social platforms for mod updates. Each time it is run, it will query the Steam Web API. Do not run this command too frequently so not to get rate-limited.

USAGE
  $ magma cron

OPTIONS
  -t, --test  Enabling will send a simple test message to your specified webhook.

EXAMPLE
  magma cron

See code: src/commands/cron.ts

magma deactivate [ID]

Deactivates mods by removing their symlinks and keys.

USAGE
  $ magma deactivate [ID]

ARGUMENTS
  ID  Steam Workshop item IDs.

OPTIONS
  -n, --nonInteractive  Do not prompt for any input.

EXAMPLES
  magma deactivate
  magma deactivate 723217262
  magma deactivate 450814997 723217262 713709341

See code: src/commands/deactivate.ts

magma help [COMMAND]

display help for magma

USAGE
  $ magma help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI

See code: @oclif/plugin-help

magma initialize

Initializes the configuration data required for Magma to operate.

USAGE
  $ magma initialize

OPTIONS
  -b, --batchScript=batchScript                        Absolute path to the Batch script starting your server, where it
                                                       has your mods (only supported on Windows)

  -c, --steamCmd=steamCmd                              Absolute path to the SteamCMD executable (including the file
                                                       itself).

  -f, --force                                          Skip the check for the magma.json file. If it exists, it will be
                                                       overwritten.

  -g, --steamGuard=steamGuard                          Steam Guard code to use when authenticating.

  -l, --linuxGsmInstanceConfig=linuxGsmInstanceConfig  Absolute path to the LinuxGSM instance configuration file (where
                                                       it handles mods/servermods) (only supported on Linux)

  -n, --nonInteractive                                 Do not prompt for any input.

  -p, --password=password                              Steam user password.

  -s, --server=server                                  Absolute path to the directory where the server is (where the
                                                       server executable is).

  -u, --username=username                              Steam username.

  -v, --verbose                                        Output additional information for debugging purposes.

  -w, --webhookUrl=webhookUrl                          Webhook URL to which the magma cron command will respond to.

ALIASES
  $ magma init

See code: src/commands/initialize.ts

magma install

Downloads and installs mods that have not been previously installed.

USAGE
  $ magma install

See code: src/commands/install.ts

magma list

Lists all mods that have been added or installed by Magma.

USAGE
  $ magma list

See code: src/commands/list.ts

magma login

Helps to fix any Steam issues when it fails to log you in.

USAGE
  $ magma login

OPTIONS
  -g, --steamGuard=steamGuard  Steam Guard code to use when authenticating.
  -n, --nonInteractive         Do not prompt for any input.
  -p, --password=password      Steam user password.
  -u, --username=username      Steam username.
  -v, --verbose                Output additional information for debugging purposes.

EXAMPLES
  magma login
  magma login username password

See code: src/commands/login.ts

magma remove [ID]

Removes mod files from disk.

USAGE
  $ magma remove [ID]

ARGUMENTS
  ID  Item IDs.

OPTIONS
  -n, --nonInteractive  Do not prompt for any input.

ALIASES
  $ magma uninstall

EXAMPLES
  magma remove
  magma remove 1
  magma remove 14 3 9

See code: src/commands/remove.ts

magma update

Updates currently downloaded mods from Steam Workshop.

USAGE
  $ magma update

See code: src/commands/update.ts

magma upgrade

Upgrades Magma configuration file to match the newest version.

USAGE
  $ magma upgrade

See code: src/commands/upgrade.ts

Testing

npm test

Contributing

Please see CONTRIBUTING.md for details.

Security

If you discover any security-related issues, please e-mail [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see the License file for more information.