MineGui
MineGui is a lightweight wrapper around `imgui-java`, designed to simplify the creation of modern GUIs in Minecraft mods built with Fabric.
Install / Use
/learn @trethore/MineGuiREADME
MineGui
MineGui is a Fabric client library that embeds Dear ImGui into Minecraft 1.21.4, giving mod developers an immediate-mode toolset for in-game overlays, inspectors, and interactive editors without leaving the client.

Philosophy & Goals
- Immediate-first runtime that stays thin so you can script raw ImGui every frame.
- Utility-driven helpers for cursor policies, constraint math, textures, and fonts without dictating component hierarchies.
- Stable, lightweight lifecycle that prioritizes predictable hooks and minimal overhead in production builds.
Developer Docs
You can find the developer documentation HERE.
Supported Features
MineGui bundles the full imgui-java runtime and layers tooling around it so you can stay inside Dear ImGui while building Fabric mods:
- Full Dear ImGui API — Views implement
renderView()and call native widgets every frame while MineGui drives the render loop. - View lifecycle & persistence —
ViewSaveManagertracks visibility, persists window state, and lets you plug in custom adapters per namespace. - Themes, fonts & styles —
StyleManager,MGStyleDescriptor, andMGFontLibrarymanage transient style deltas, named themes, and registered font atlases. - Layouts & sizing helpers —
MineGuiContext.layout()offers stack/grid builders whileVStack/HStackkeep constraint math and spacing utilities immediate-mode friendly. - Textures & drawing utilities —
ImGuiImageUtilsstreams Minecraft textures into ImGui draw lists, handles UV transforms, and keeps caches in sync with the client renderer. - Namespaces, config & commands —
MineGuiInitializationOptionswires global config, cursor policies, and persistence per namespace, while commands like/minegui reloadrefresh live styles during development.
Supported Minecraft Versions
- Fabric Loader 1.21.4 with Yarn mappings
1.21.4+build.8
Installation & Initialization
Set minegui_version=0.0.3-0.119.4+1.21.4+build.8 in your gradle.properties, then follow the steps below. Check GitHub Packages for the latest published versions.
- Add the GitHub Packages repository
In your rootbuild.gradle(orsettings.gradleif you centralize repositories), include:
repositories {
maven {
url = uri("https://maven.pkg.github.com/trethore/MineGui")
credentials {
username = findProperty("gpr.user") ?: System.getenv("GITHUB_ACTOR")
password = findProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN")
}
}
}
Recommended: store credentials in ~/.gradle/gradle.properties.
gpr.user=YOUR_GITHUB_USERNAME
gpr.key=YOUR_PERSONAL_ACCESS_TOKEN
Generate a personal access token with read:packages scope.
- Add the dependency
Declare MineGui as a mod dependency alongside Fabric loader and Fabric API:
dependencies {
modImplementation include("tytoo.minegui:minegui:${project.minegui_version}")
sourceDeps "tytoo.minegui:minegui:${project.minegui_version}:sources@jar"
}
Alternatively, add MineGui through Maven:
<dependency>
<groupId>tytoo.minegui</groupId>
<artifactId>minegui</artifactId>
<version>0.0.3-0.119.4+1.21.4+build.8</version>
</dependency>
- Initialize MineGui in your client entrypoint
MineGui does not auto-register a runtime initializer. CallMineGuiCore.init(...)before you register any views:
import net.fabricmc.api.ClientModInitializer;
import tytoo.minegui.MineGuiCore;
import tytoo.minegui.MineGuiInitializationOptions;
import tytoo.minegui.runtime.MineGuiContext;
public final class MyModClient implements ClientModInitializer {
private MineGuiContext mineGui;
@Override
public void onInitializeClient() {
mineGui = MineGuiCore.init(MineGuiInitializationOptions.defaults("your_namespace"));
// mineGui.layout() exposes the new layout DSL; mineGui.ui() returns the namespace UI manager.
}
}
- Run in development
Use the bundled Gradle tasks while building MineGui or integrating it into another mod:
./gradlew build # assemble artifacts and run checks
./gradlew runDebugClient # develop MineGui with debug overlays and commands enabled
# or, when testing MineGui as a dependency in another mod:
./gradlew runClient
In-game debug commands such as /minegui reload and /minegui export style force are available only in debug runs.
Contributing
Contributions are welcome!
-
Report bugs or request features in the issue tracker.
-
Submit improvements and fixes as pull requests.
-
Before contributing, make sure you can build and test the project locally:
./gradlew build # assemble and run checks ./gradlew runDebugClient # develop MineGui with debug commands enabled # or, when testing MineGui as a dependency in another mod: ./gradlew runClient
Please follow best practices (clean code, descriptive commits, small PRs).
License
MineGui is released under the MIT License.
Related Skills
diffs
341.8kUse the diffs tool to produce real, shareable diffs (viewer URL, file artifact, or both) instead of manual edit summaries.
clearshot
Structured screenshot analysis for UI implementation and critique. Analyzes every UI screenshot with a 5×5 spatial grid, full element inventory, and design system extraction — facts and taste together, every time. Escalates to full implementation blueprint when building. Trigger on any digital interface image file (png, jpg, gif, webp — websites, apps, dashboards, mockups, wireframes) or commands like 'analyse this screenshot,' 'rebuild this,' 'match this design,' 'clone this.' Skip for non-UI images (photos, memes, charts) unless the user explicitly wants to build a UI from them. Does NOT trigger on HTML source code, CSS, SVGs, or any code pasted as text.
openpencil
1.9kThe world's first open-source AI-native vector design tool and the first to feature concurrent Agent Teams. Design-as-Code. Turn prompts into UI directly on the live canvas. A modern alternative to Pencil.
ui-ux-designer
Use this agent when you need to design, implement, or improve user interface components and user experience flows. Examples include: creating new pages or components, improving existing UI layouts, implementing responsive designs, optimizing user interactions, building forms or dashboards, analyzing existing UI through browser snapshots, or when you need to ensure UI components follow design system standards and shadcn/ui best practices.\n\n<example>\nContext: User needs to create a new dashboard page for team management.\nuser: "I need to create a team management dashboard where users can view team members, invite new members, and manage roles"\nassistant: "I'll use the ui-ux-designer agent to design and implement this dashboard with proper UX considerations, using shadcn/ui components and our design system tokens."\n</example>\n\n<example>\nContext: User wants to improve the user experience of an existing form.\nuser: "The signup form feels clunky and users are dropping off. Can you improve it?"\nassistant: "Let me use the ui-ux-designer agent to analyze the current form UX and implement improvements using our design system and shadcn/ui components."\n</example>\n\n<example>\nContext: User wants to evaluate and improve existing UI.\nuser: "Can you take a look at our pricing page and see how we can make it more appealing and user-friendly?"\nassistant: "I'll use the ui-ux-designer agent to take a snapshot of the current pricing page, analyze the UX against Notion-inspired design principles, and implement improvements using our design tokens."\n</example>
