$ show wabbajack-tools/wabbajack
Wabbajack is a mature .NET application for compiling and installing modlists for PC games, primarily Bethesda titles. It automates the entire modlist lifecycle: a compiler indexes a modded game folder, applies a stack of compilation steps (ignore rules, BSA decomposition, texture matching, patching), and produces a .wabbajack file containing only metadata and download instructions. An installer then runs preflight checks, downloads archives from Nexus Mods, Steam depots, Bethesda Creations, HTTP mirrors, and manual sources, verifies hashes, extracts files, and applies binary patches to reproduce the original mod setup without redistributing any assets. This is an application, not a data/research repository; the data-like components (VFS, hashing, caches) serve the application's file integrity and reproducibility needs. Architecturally it is a modular multi-project solution: a WPF desktop client (Wabbajack.App.Wpf), a System.CommandLine-based CLI (Wabbajack.CLI), and an Avalonia launcher. Core libraries provide a custom path abstraction, xxHash64 hashing, a SQLite-backed virtual file system for archive indexing, a rate limiter, a download dispatcher with pluggable downloaders, a preflight check framework, and Bethesda archive (BSA/BA2) readers/writers. Dependency injection is used throughout via per-module ServiceExtensions, and the codebase includes substantial test coverage across installer, compiler, downloader, VFS, and networking projects. External dependencies include the Nexus Mods API (OAuth2), Steam CDN/depot APIs, Bethesda's Creations API, GitHub releases for self-update, and bundled native tools (7-Zip, innoextract, texconv). The codebase is heavily Windows-oriented (WPF, P/Invoke, WMI, registry protocol handler), though some libraries are cross-platform. Maintenance is active with frequent releases, but technical drift is medium: several hardcoded API constants, reverse-engineered Steam/Bethesda endpoints, and legacy WPF UI patterns require ongoing upkeep.
The LLM identified 5 files worth highlighting for reuse:
Type-safe, case-insensitive path handling with custom operators, equality, and extension manipulation. Avoids stringly-typed paths and normalizes platform differences. Self-contained and easily extractable into any .NET project needing robust path value objects.
Generic resource limiter with throughput and concurrency controls, job-based reporting, and percent progress. Reusable for throttling network, disk, or CPU-bound work in any asynchronous pipeline without coupling to Wabbajack-specific logic.
Generic preflight check runner that orders checks by declared dependencies, skips completed checks when dependencies are unchanged, and supports cancellation and progress events. Could be extracted as a validation framework for any multi-step precondition system.
Self-contained DDS/DX10 header generation and pixel format math, adapted from DirectXTex. Useful for any tooling that needs to read or write DDS headers without pulling in the full DirectXTex dependency.
Retry helper with exponential backoff and circuit-breaking for transient failures. Generic, dependency-light, and reusable across network calls, file I/O, or any flaky external operation.