> For the complete documentation index, see [llms.txt](https://docs.polyfrost.org/oneconfig/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.polyfrost.org/oneconfig/getting-started.md).

# Getting Started

(aka "How the hell do I add OneConfig to my mod?")

If you're unfamiliar with Java, or Minecraft Modding, please read [Modding Basics](/oneconfig/including-oneconfig.md) first. It's a fantastic beginner's guide.

### OneConfig's Example Mod

If you're just starting out or need more advanced features like multiple versions, we highly recommend looking at our updated [example mod](https://github.com/Polyfrost/OneConfigExampleMod/).

## Including OneConfig Yourself

If you want to avoid using our own [mod template](https://github.com/Polyfrost/OneConfigExampleMod/), or wish to include OneConfig in one of your new or existing mods, add this to your `build.gradle(.kts)`

{% tabs %}
{% tab title="Groovy" %}

<pre class="language-groovy"><code class="lang-groovy">loom {
    launchConfigs {
        client {
            // Loads OneConfig in dev env. Replace other tweak classes with this, but keep any other attributes!
            arg("--tweakClass", "cc.polyfrost.oneconfig.loader.stage0.LaunchWrapperTweaker")
        }
    }
}

repositories {
    maven { url 'https://repo.polyfrost.cc/releases' }
}

dependencies {
<strong>    // Basic OneConfig dependencies for legacy versions. See OneConfig example mod for more info
</strong>    compileOnly('cc.polyfrost:oneconfig-1.8.9-forge:0.2.2-alpha+') // Should not be included in jar
    // include should be replaced with a configuration that includes this in the jar
    include('cc.polyfrost:oneconfig-wrapper-launchwrapper:1.0.0-beta+') // Should be included in jar
}

jar { // loads OneConfig at launch. Add these launch attributes but keep your old attributes!
    manifest.attributes(
            "ModSide": "CLIENT",
            "TweakOrder": "0",
            "ForceLoadAsMod": true,
            "TweakClass": "cc.polyfrost.oneconfig.loader.stage0.LaunchWrapperTweaker",
    )
}
</code></pre>

{% endtab %}

{% tab title="Kotlin" %}

<pre class="language-kotlin"><code class="lang-kotlin">loom {
    launchConfigs.named("client") {
         // Loads OneConfig in dev env. Replace other tweak classes with this, but keep any other attributes!
         arg("--tweakClass", "cc.polyfrost.oneconfig.loader.stage0.LaunchWrapperTweaker")
    }
}

repositories {
    maven("https://repo.polyfrost.cc/releases")
}

dependencies {
<strong>    // Basic OneConfig dependencies for legacy versions. See OneConfig example mod for more info
</strong>    compileOnly("cc.polyfrost:oneconfig-1.8.9-forge:0.2.2-alpha+") // Should not be included in jar
    // include should be replaced with a configuration that includes this in the jar
    include("cc.polyfrost:oneconfig-wrapper-launchwrapper:1.0.0-beta+") // Should be included in jar
}

tasks {
    jar { // loads OneConfig at launch. Add these launch attributes but keep your old attributes!
        manifest.attributes += mapOf(
            "ModSide" to "CLIENT",
            "TweakOrder" to 0,
            "ForceLoadAsMod" to true,
            "TweakClass" to "cc.polyfrost.oneconfig.loader.stage0.LaunchWrapperTweaker"
        )
    }
}
</code></pre>

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.polyfrost.org/oneconfig/getting-started.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
