= modderbaas(1)
Daniel Schadt <modderbaas@kingdread.de>
:doctype manpage:
:toc:

== Name

modderbaas - a mod manager for headless Minetest installations

== Synopsis

:progname: modderbaas
`{progname} _[globopts]_ install _[moreopts]_ *mods*...` (see <<installing>>)

`{progname} _[globopts]_ enable *mods*...` (see <<enabling>>)

For a list of valid global options (_globopts_), see <<global_options>>.

== Description

ModderBaas is a program that allows you to manage installed Minetest mods.
It is useful on systems where the built-in ContentDB-manager cannot be used, e.g. on headless
server installations.
It was made with Debian's `minetest-server` in mind, but works well on other platforms too.

CAUTION: When meddling with the installed mods or the world configurations, make sure that the
server daemon is stopped!
Otherwise, data corruption may occur.

[#mod_sources]
== Mod Sources

ModderBaas can install mods from various sources. A *modsource* can be given in one of the
following forms:

modid::
A simple mod id (e.g. "charcoal") will search the ContentDB for a package providing the requested
mod.
If there are multiple choices available, ModderBaas will ask you which one too choose.

author/package::
You can specify the user- and packagename (separated by a slash, e.g. "X17/charcoal") to refer to a
specific package from the ContentDB.
ModderBaas will automatically fetch the correct download URL then.

HTTP URL::
You can specify an HTTP or HTTPS URL to a mod.
ModderBaas expects to find a ZIP archive at the URL, containing the mod.

Git::
You can specify a Git repository by using the "git+https://..." syntax.
ModderBaas will fetch the repository for you.
You can specify the branch to use by appending an URL fragment (such as `#develop`), otherwise the
`HEAD` of the remote will be used.

[#global_options]
== Global Options

The following options can be used in front of the subcommand:

`-w *world*`, `--world *world*`::
Select the world to operate on.
This is useful if multiple worlds are found - if there is only one world, ModderBaas will
automatically choose this one.

[#installing]
== Installing Mods

The `install` subcommand can install mods.
It will automatically resolve dependencies and install them as well.
After the installation, the mods will be enabled in the given world.

The general syntax looks like the following:

 modderbaas [globopts] install [-o] [-n] [-t target] modsources...

The modsources can be given in any of the syntaxes described above.
More than one source can be given for an invokation of `install`.
Furthermore, the following options are supported:

`-o`, `--chown`::
Change file ownership after copying. +
+
If this option is given, ModderBaas will change the file ownership of the newly copied files to
that of the parent directory.
This is useful if you run ModderBaas as root, as usually the mod files are owned by a different
user (such as `Debian-minetest:games`).

`-n`, `--dry-run`::
Don't do any actual work, just pretend. +
+
This will download the mods and do dependency resolution, but it won't actually install them or
change any world settings.

`-t *target*`, `--target-dir *target*`::
Choose the directory to which the mods will be installed. +
+
By default, the mods will be installed to the current directory.

[#enabling]
== Enabling Mods

The `enable` subcommand can enable mods that are already present on the system.
This can for example be used to activate mods installed through the system's
package manager, or mods installed to a different world.

The `enable` subcommand takes the mod IDs as argument.
You can *not* use the full mod source specification syntax from above, and
`enable` will never install mods from external sources.
It does however to dependency resolution to ensure that the mod's dependencies
are also enabled.

Should a requested mod or one of its dependencies not exist, the operation will
be cancelled and an error returned.

== Source Code

`modderbaas` itself is free software licensed under the GPL-3.0.
You can find its source code and bug tracker on
https://gitlab.com/dunj3/modderbaas or a source mirror on
https://git.kingdread.de/cgit.cgi/modderbaas/.

Bugs or patches can also be sent by email to modderbaas@kingdread.de.

== Copyright

This work is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/4.0/ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
