Skip to content

Commit

Permalink
update docs and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAlan404 committed Aug 4, 2023
1 parent 48b0098 commit 7f594a2
Show file tree
Hide file tree
Showing 17 changed files with 212 additions and 109 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# rust
target/
# developer testing
test/
# mkdocs output
site/

# mcman: Exclude mcman build outputs
**/server
Expand Down
3 changes: 3 additions & 0 deletions DOCS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<!-- markdownlint-disable MD033 -->
# `mcman` Documentation

> Warning:
> Outdated, see [this website](https://paradigmmc.github.io/mcman/) for more up-to-date docs
You might be looking for [tutorial.md](./TUTORIAL.md)

Index:
Expand Down
26 changes: 11 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,20 @@
[![builds](https://img.shields.io/github/actions/workflow/status/ParadigmMC/mcman/build.yml?logo=github)](https://github.com/ParadigmMC/mcman/actions/workflows/build.yml)
[![docker publish](https://img.shields.io/github/actions/workflow/status/ParadigmMC/mcman/publish.yml?logo=github&label=docker%20publish)](https://github.com/ParadigmMC/mcman/actions/workflows/publish.yml)
![GitHub Repo stars](https://img.shields.io/github/stars/ParadigmMC/mcman?logo=github)
[![quiltmc featured](https://img.shields.io/badge/quiltmc-featured-8A2BE2)](https://tech.lgbt/@quiltmc/110690787441497920)

Powerful Minecraft Server Manager CLI. Easily install jars (server, plugins & mods) and write config files. Docker and git support included.

<!-- todo: a (terminal) screenshot here -->
## Getting Started

![mcman init](https://cdn.discordapp.com/attachments/1109215116060266567/1134187743300296815/render1690481729604.gif)

| 🚀 [Installation](https://paradigmmc.github.io/mcman/installation/) |[Getting Started](https://paradigmmc.github.io/mcman/tutorials/getting-started/) | 📜 [Documentation](https://paradigmmc.github.io/mcman/) |
| ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- | ------------------------------------------------------ |

- 📋 Want an example? Here's [iptfreedom](https://github.com/IPTFreedom/iptfreedom)

Submit a PR or open an issue if you have a mcman-server repository that we can add here!

## Features

Expand All @@ -32,20 +42,6 @@ Powerful Minecraft Server Manager CLI. Easily install jars (server, plugins & mo
- 📦 Import from or export to [mrpack](./DOCS.md#mcman-import-mrpack-src)s!
- 📦 Import from or export to [packwiz](./DOCS.md#mcman-import-mrpack-src) packs!

## Getting Started

![mcman init](https://cdn.discordapp.com/attachments/1109215116060266567/1134187743300296815/render1690481729604.gif)

- 🚀 [Installation instructions](./TUTORIAL.md#installation)

-[Recommended Usage](./TUTORIAL.md#recommended-usage)

- 📜 View the [**Documentation**](./DOCS.md) here.

- 📋 Want an example? Here's [iptfreedom](https://github.com/IPTFreedom/iptfreedom)

Submit a PR or open an issue if you have a mcman-server repository that we can add here!

## Changelog

### `0.3.0` (unreleased)
Expand Down
2 changes: 1 addition & 1 deletion docs/commands/env.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ Adds some ignore items in your repository's `.gitignore`

`git` should be installed and you should be in a repository for this to work

## `mcman env gitignore`
## `mcman env docker`

Write the default Dockerfile and .dockerignore
5 changes: 1 addition & 4 deletions docs/commands/index.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# CLI Commands

This section shows the commands of mcman. You can type `mcman` or `mcman --help` for a basic list of it.

!!! warning
These docs are incomplete.
This section shows the commands of mcman. You can type `mcman`, `mcman help` or `mcman --help` for a basic list of it.

## Cheatsheet

Expand Down
6 changes: 4 additions & 2 deletions docs/commands/init.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@

Initializes a new server in the current directory.

> **Full Command:** `mcman init [--name <name>] [--mrpack <source> | --packwiz <source>]`
This command is interactive. Just run `mcman init`!

See the [getting started](../tutorials/getting-started.md) tutorial for what to do next

> **Full Command:** `mcman init [--name <name>] [--mrpack <source> | --packwiz <source>]`
??? "📦 Importing from a mrpack (modrinth modpack)"
You can use the `--mrpack` flag on `mcman init` to import from an mrpack while initializing a server.

Expand Down
8 changes: 8 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

mcman is a command line tool that makes it easier to create and manage minecraft servers. Instead of manually downloading jars from the internet and doing intricate replace operations and whatnot on your plugin configuration files, mcman downloads everything you need from one configuration file (`server.toml`) and handles your config files with one very useful feature - variables.

## Quick Start

- [Installation](./installation.md)
- [Getting Started](./tutorials/getting-started.md)
- [Explaining how building works](./tutorials/building.md)
- [Commands](./commands)
- [Reference](./reference/server.toml.md)

## Features

- Downloads or sets up server software (server.jar)
Expand Down
26 changes: 20 additions & 6 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,33 @@

# Installation

You can use the links below to get the mcman executable. We suggest you to add it to your `PATH` so you can run it from anywhere!
=== "Github Releases"
You can use the links below to get the mcman executable.

[:fontawesome-brands-windows: Windows][latest-win]{ .md-button } [:fontawesome-brands-linux: OSX/Linux][latest-linux]{ .md-button }
[:fontawesome-brands-windows: Windows][latest-win]{ .md-button } [:fontawesome-brands-linux: OSX/Linux][latest-linux]{ .md-button }

!!! info "Windows: Install via Scoop"
[Scoop](https://scoop.sh/) is a command-line installer for Windows. You can use 2 commands in powershell to install it.
[:simple-github: Github Releases Page](https://github.com/ParadigmMC/mcman/releases){ .md-button } [:simple-github: Build Action (nightly)](https://github.com/ParadigmMC/mcman/actions/workflows/build.yml){ .md-button }

We suggest you to add it to your `PATH` so you can run it from anywhere! (windows)

=== "Windows: scoop"
Add the [minecraft](https://github.com/The-Simples/scoop-minecraft) bucket and install mcman:

```powershell
scoop bucket add minecraft https://github.com/The-Simples/scoop-minecraft
scoop install mcman
```

* [Github Releases Page](https://github.com/ParadigmMC/mcman/releases)
* [build action](https://github.com/ParadigmMC/mcman/actions/workflows/build.yml) (requires github account)
[Scoop](https://scoop.sh/) is a command-line installer for Windows. You can use 2 commands in powershell to install it. (4 commands in total to install mcman!)

=== "Linux: wget"
wget

```sh title="Install mcman"
wget https://github.com/ParadigmMC/mcman/releases/latest/download/mcman
sudo mv ./mcman /usr/bin/
sudo chmod +x /usr/bin/mcman
```

bottom text

12 changes: 1 addition & 11 deletions docs/reference/downloadable/index.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
# Downloadable

A `Downloadable` is some project, entity etc. from a source.

## Server Software

- [Vanilla](../servertype/vanilla.md)
- [Fabric](../servertype/fabric.md) - `modded`
- [Quilt](../servertype/quilt.md) - `modded`
- [PaperMC](../servertype/papermc.md) (paper, velocity and waterfall) - `bukkit`/`proxy`
- [Purpur](./purpurmc.md) - `bukkit`
- [BungeeCord](./bungeecord.md) - `proxy`
- [BuildTools](./buildtools.md) (spigot and craftbukkit) - `bukkit`
A `Downloadable` is a plugin, mod, datapack or any other thing that is, downloadable.

## Sources

Expand Down
4 changes: 2 additions & 2 deletions docs/reference/server.toml.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ This section is for the `server.toml` configuration file.

Each `server.toml` defines a differient server.

To generate one, you can use the [`mcman init`](../commands/init.md) command ([Tutorial](../tutorials/getting-started.md))

!!! note
You shouldn't nest `server.toml` files in sub-folders.

If you are in your server's sub-directories, mcman will be able to find the `server.toml` file recursively.

??? example
Expand Down
26 changes: 22 additions & 4 deletions docs/tutorials/building.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,29 @@
# Building (How it works)
# Understanding Building

`mcman build` is basically the most important command it has. It, of couse, builds your server.
Building is the process of... basically building the entire server.

Here are the steps/stages of how it does it:
Before everything else, building requires a [server.toml](../reference/server.toml.md). Check out the [getting started](./getting-started.md) tutorial if you dont have one.

Before everything, mcman will create a `server/` directory to download everything into if it doesnt exist.

## 1. Server Jar

To run a minecraft server, you need the server itself! In this stage, mcman basically downloads the `jar` property on the [`server.toml`](../reference/server.toml.md)
First, mcman will download the server jar. And if neccesary (quilt and buildtools) will run the installer.

## 2. Plugins/Mods

In this stage, mcman downloads every mod and plugin defined in the `server.toml`.

## 3. Datapacks

Like plugins and mods, if there are any, mcman will download every datapack for every world that exists

## 4. Configurations (Bootstrapping)

In this stage, mcman will 'bootstrap' your configuration files - which is a fancy synonim for "copy, paste, find and replace"

You can check the [variables](./variables.md) section for more info

## 5. Scripts

Finally, mcman generates `start.bat` and `start.sh` scripts. These can be disabled and configured further under `server.toml` [(docs here)](../reference/server-launcher.md)
21 changes: 11 additions & 10 deletions docs/tutorials/folder-structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,14 @@ These are all can be found under [this section](../reference/server.toml.md) in

Your server's configuration files which you have overridden (edited) should all be here.

When building, mcman uses this folder to

- **config/** folder: This is the folder your server config files should go. `mcman` will process everything into the output.
- The path is converted as follows:
`config/server.properties` => `server/server.properties`
And every config file (.properties, .toml, .yaml, .yml etc) will be processed with [variables](#variables)
- **server/** folder: This folder is where `mcman` will build the server files into, aka the output. This folder is gitignored by default (because why would you do that?)
- According to the `server.toml`, mcman can generate launcher scripts at `server/start.sh` and `server/start.bat`
- **`.gitignore` and `.dockerignore`**: Ignore files for git and docker
- **Dockerfile**: If you enabled docker, this is the dockerfile
When [building](./building.md), mcman uses this folder to create the server's configuration files while also using the server's [variables](./variables.md)

## server/ Directory

This is the 'output' file. It will contain all of the server files including the server jar file after every build.

## Other

- **`client-config/`** folder can be used like `config/` to add client-side config overrides. This folder is processed while exporting to `.mrpack` or `packwiz` - it does nothing while building.
- **`.gitignore`** is the default gitignore file generated by mcman. if you need it and dont have it, you can use [`mcman env gitignore`](../commands/env.md#mcman-env-gitignore)
- **`.dockerignore` & `Dockerfile`** are the default docker files. like gitignore you can use [`mcman env docker`](../commands/env.md#mcman-env-docker)
56 changes: 56 additions & 0 deletions docs/tutorials/getting-started.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,58 @@
# Getting Started

Let's create a simple server as an example.

## Initial Setup

Since mcman is git-compatible, you can create a new Github Repository to put your server configuration files in. This is optional but recommended.

Create a new folder (or clone your repository) for your server and `cd` into it.

Then inside your server folder, run [`mcman init`](../commands/init.md)

![mcman init](https://cdn.discordapp.com/attachments/1109215116060266567/1134187743300296815/render1690481729604.gif)

It will interactively allow you to set up a basic **`server.toml`** file.

!!! question "Whats a `server.toml` file????"
When using mcman, a `server.toml` file is some kind of metadata file containing neccesary information about it. For example, it contains the server name, version, plugins/mods and more.

!!! tip "Want to import from a modpack?"
mcman supports importing from some modpack formats (`mrpack` and `packwiz`)

See [this section](./importing-modpacks.md) to see how

## Building

Now, lets 'build' and run the server!

- If you want to run it yourself, use [`mcman build`](../commands/build.md) `&& cd server` and run the `start.{bat,sh}` script.
- Orrr you can just do [`mcman run`](../commands/run.md) which does both for you.

## Bootstrapping

If you open the newly generated `config/server.properties` file, you'll see something like this:

```properties title="config/server.properties"
server-port=${PORT:25565}
motd=${SERVER_NAME:A Minecraft Server}
```

If you run `mcman build`, you should see a `server.properties` file inside the `server/` folder too.

If you open *that* file, inside `server/`, you'll see that it contains these two lines:

```properties title="server/server.properties"
server-port=25565
motd=mcman-example-quilt
```

As you can guess, when running `mcman build`, mcman will process configuration files inside `config/` and copy them over to `server/` alongside downloading the server jar/plugins/mods and such.

For more information, check out the [Variables](./variables.md) section :3

## Adding Plugins or Mods

For now, you can use the [`mcman import url <URL>`](../commands/import.md#mcman-import-url-url) command to import mods or plugins from URLs.

Or alternatively write and edit the [`server.toml`](../reference/server.toml.md) yourself to add it. You can check out the [reference](../reference/downloadable/index.md) for the Downloadable type which is basically a mod/plugin source.
16 changes: 10 additions & 6 deletions docs/tutorials/importing-modpacks.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

`mcman` can import from the [mrpack](https://modrinth.com/modpacks) format (modrinth modpacks) or [packwiz](https://packwiz.infra.link/) packs.

??? question "Can I import after initializing?"
Yes you can!

- For mrpacks: `mcman import mrpack <source>`
- For packwiz packs: `mcman import packwiz <source>`

The source arguments are the same

## mrpack

You can import mrpacks with the `--mrpack` flag while initializing:
Expand Down Expand Up @@ -30,10 +38,6 @@ The `source` argument can be
* An URL with `http`/`https` scheme
* Path to a local `pack.toml` file

??? question "Can I import after initializing?"
Yes you can!
## Whats next?

- For mrpacks: `mcman import mrpack <source>`
- For packwiz packs: `mcman import packwiz <source>`

The source arguments are the same
Tutorial -> Getting Started -> [Building](./getting-started.md#building)
6 changes: 0 additions & 6 deletions docs/tutorials/index.md

This file was deleted.

Loading

0 comments on commit 7f594a2

Please sign in to comment.