
Building Custom Minecraft Launchers with CmlLib.Core
".NET Minecraft Launcher Library. All Version, Auth, Forge, Java, Crossplatform"
CmlLib/CmlLib.Core · github.com
Want to create your own Minecraft launcher instead of relying on the official one? CmlLib.Core is a.NET library that handles all the complicated stuff: authentication, version management, mod loading. So you can focus on building a launcher that works the way you want.
What This Project Does
CmlLib.Core is a.NET library designed for developers who want to build custom Minecraft launchers. If you've ever wondered how communities distribute modded versions of the game or how some servers manage custom client setups, this library is what powers a lot of that infrastructure. It's not a mod, not a client patch, and not something you run directly. It's a toolkit that handles the messy backend work: downloading game files, managing authentication with Microsoft accounts, launching the game with custom parameters, and supporting modloaders like Forge and Fabric.
The project sits at 274 stars on GitHub and is written in C#, which means you'll need at least basic comfort with.NET development. And honestly, that's the audience here: devs building launchers, not players looking for an easier way to play.
When You'd Build a Custom Launcher
Here's the thing about custom launchers: most players don't need one. The official launcher works fine for vanilla Minecraft. But there are real cases where a custom launcher makes sense.
Maybe you're running a community server and want to distribute a pre-configured client with your custom mods and resource pack already baked in. New players join, download your launcher, hit play, and everything's ready. No "which mods do I install?" threads, no broken configs. Getting your server featured on our Minecraft Server List is one thing; making sure players can actually connect without friction is another.
Or you're building a modpack distribution platform and need tight control over version management and mod updates. Maybe you're working on a specialized launcher for a specific region or game mode. Those are the scenarios where CmlLib.Core stops being overkill and becomes genuinely useful.
Getting Started: Install and First Steps
Installing CmlLib.Core means pulling it into a.NET project via NuGet. If you've worked with NuGet packages before, this is familiar territory.
dotnet add package CmlLib.CoreOnce it's installed, you can start writing launcher code. The README shows a basic example: fetch all available versions, then launch the game. Here's what that looks like:
using CmlLib.Core;
var launcher = new MinecraftLauncher();
var versions = await launcher.GetAllVersionsAsync();
foreach (var version in versions)
{
Console.WriteLine($"{version.Type} {version.Name}");
}This alone is powerful. You're querying Minecraft's version manifest and getting back everything available: vanilla releases, snapshots, older builds. The library handles connecting to Microsoft's servers, parsing the manifest, and presenting it as clean C# objects.
Next step is actually launching the game. Here's the thing, so this where things get real.
using CmlLib.Core;
using CmlLib.Core.ProcessBuilder;
var launcher = new MinecraftLauncher();
var process = await launcher.InstallAndBuildProcessAsync("1.21", new MLaunchOption());
process.Start();That one call handles downloading the game files for version 1.21, validating them, and building a Windows process ready to execute. The library even manages your Java runtime if you need it to.
Core Features Worth Understanding
Authentication. Modern Minecraft requires Microsoft account authentication (RIP Mojang accounts, rest in peace). CmlLib.Core handles the full OAuth flow, token refresh, and session management. You don't need to understand the gory details of how Microsoft's auth system works. Actually, I'd recommend not trying to understand that yourself unless you enjoy reading dense API documentation.
Version Management. Vanilla versions, snapshots, modded versions, old builds - the library queries everything and presents it consistently. You can ask for all versions and filter down to what you want. Or you can target specific versions like 1.21 and let the library handle finding the right one.
Mod Support. Forge, Fabric, LiteLoader - CmlLib.Core understands these modloaders. You can build a process that launches a modded version the same way you'd launch vanilla. The library handles downloading the modloader installer and the game files separately, then stitches them together correctly.
Cross-Platform. Windows, Linux, macOS - the library abstracts away platform differences. You write once, and it runs everywhere. That's huge if you're distributing a launcher to a diverse player base.
Progress Tracking. Downloaded 50MB of 2GB? The library fires events as files download and verify. That means your launcher can show players a real progress bar instead of a spinning circle of despair. The README shows this with file progress and byte progress callbacks, which is genuinely thoughtful API design.
Building Something Real (The Harder Part)
Creating a basic launcher that downloads and launches the game is the easy part. Real complexity comes when you add custom features: a GUI, custom settings, integration with community mods, automatic updates to your launcher itself.

CmlLib.Core gives you the foundation. It's not a complete launcher framework like the official launcher. You're responsible for the UI, the UX, the branding, everything that makes your launcher feel like a real product. But the hard work - communicating with Mojang's servers, managing game files, handling authentication - that's already solved.
The project includes links to a sample launcher on GitHub, which helps. Seeing real code running real features is way more useful than documentation alone.
Things That Trip People Up
Java Runtime Complexity. Minecraft needs Java, and Java version compatibility is... finicky. CmlLib.Core can help install Java, but understanding which versions of Java work with which Minecraft versions is still on you. The library abstracts it, but it doesn't magically make Java simple.
File Paths and Directories. By default, the library uses your OS's standard game directory. Windows uses AppData/Roaming/.minecraft, Linux uses ~/.minecraft, macOS uses ~/Library/Application Support/minecraft. You can customize this, but getting it wrong means your launcher installs files in weird places. Check the official documentation if you're seeing games fail to launch.
Auth Token Expiry. Microsoft tokens don't last forever. If you're building a launcher that stays open for days, you need to handle token refresh. The library provides this, but you have to actually use it. Ignore it and users will randomly get logged out mid-session. Not fun.
Comparing to Other Approaches
You could write your own launcher from scratch, talking directly to Mojang's servers. Don't. CmlLib.Core handles API changes, edge cases, and protocol nuances that you'll only discover after investing weeks. Life's too short for that.
You could also use the official launcher as a starting point and modify it, but that's fragile and legally gray. Building on top of CmlLib.Core is cleaner and more maintainable.
On Modrinth and similar platforms, you'll find other launcher tools, often specialized for modpacks. If you're building a one-off launcher for your community server or a specific modpack, those might be faster. But if you want full control and the ability to add custom features down the line, CmlLib.Core gives you that foundation.
Before You Start Coding
CmlLib.Core is actively maintained and getting updates. The latest release is v4.0.4, which addressed API host changes and added Quilt modloader testing. That project's at a sweet spot: stable enough for production, but still getting improvements.
You'll want to read the official wiki, available in both English and Korean. It's full - way better than trying to guess how to use the library from examples alone. Spend 30 minutes reading the docs before you code. Seriously.
And if you get stuck, the project has a Discord community. Real humans who've already solved your problem usually show up fast.
Building a custom launcher isn't trivial. But if you need one, CmlLib.Core removes the biggest pain point: managing the Minecraft client itself. Everything else is just software engineering, which is what you signed up for anyway.
Lead writer at minecraft.how. Long-time Minecraft player running a small SMP server, testing every build, mod, and seed before writing about it.


