A high-performance Steam game wrapper written in Zig, hoping to replace the original SteamTinkerLaunch.
The original SteamTinkerLaunch has (at the time of writing) has been inactive for over 6 months, and the orginal maintainer does not have the access that they used to
There are also several critical bugs that make certain things/games unplayable. The one that got me and pushed me to fork was this one:
# The Bug: Wine interprets "/" as command switches!
# What STL sends to Vortex:
nxm://stardewvalley/collections/tckf0m/revisions/100
# What Vortex actually receives (TRUNCATED!):
nxm://stardewvalley/collections/tckf0m
# Error: "Invalid URL: invalid nxm url"STL-Next fixes this with proper URL encoding:
$ ./stl-next nxm "nxm://stardewvalley/collections/tckf0m/revisions/100"
Parsed: Collection: stardewvalley/collections/tckf0m/revisions/100
Wine-safe: nxm://stardewvalley%2Fcollections%2Ftckf0m%2Frevisions%2F100
# /revisions/100 PRESERVED! โ
See: STL_URL_TRUNCATION_BUG_REPORT.md
Additionally, if you look at the code for the orginal STL (and this is not shade, hate, or anything at the original dev or any maintainers, love yall <3), its a brittle, terrifing, 30,000 plus lines of bash. and thats after they did a modular rewrite from a 21,000 line monolit bash script. Bash is great, but not here, where all that overhead is causing it to take a while to start up, or complete actions. Again, this is not shade to past development, I am greatful for the projects very existence, as it has given me a create conceptual base to work from.
While it is def overkill, I have decided to do this rewrite in Zig, to get as small as possible as a binary, as well as if there is any c interop issues with the edge cases like vr, dos games, cross platform stuff, mod managers, winetricks, etc etc.
| Phase | Status | Description |
|---|---|---|
| Phase 1 | โ Complete | Core CLI, VDF text parsing, Steam discovery |
| Phase 2 | โ Complete | Binary VDF streaming, fast AppID seeking |
| Phase 3 | โ Complete | Tinker modules (MangoHud, Gamescope, GameMode) |
| Phase 3.5 | โ Complete | Launch Options, JSON parsing, exec(), tests |
| Phase 4 | โ Complete | IPC Daemon, Wait Requester, NXM Handler, TUI |
| Phase 4.5 | โ Complete | Winetricks, Custom Commands, Non-Steam Games, SteamGridDB |
| Phase 5 | โ Complete | Nix Flake Packaging, NixOS/Home Manager Modules |
| Phase 5.5 | โ Complete | Raylib GUI - Modern Wait Requester |
| Phase 5.6 | โ Complete | Vortex Integration - Auto-discovery, NXM forwarding |
| Phase 5.7 | โ Complete | Nexus Mods API - Full v1 client, tracking, Premium downloads |
| Phase 6 | โ Complete | 14 Tinkers: ReShade, vkBasalt, SpecialK, LatencyFleX, MultiApp, Boxtron, OBS, DLSS, OptiScaler |
| Phase 7 | โ Complete | Stardrop Integration + Nexus Collections Import (KILLER FEATURE!) |
| Phase 8 | โ Complete | D-Bus Integration (Multi-GPU!), GPU Selection, Session Management |
| Phase 8.5 | โ Complete | Launch Profiles - Per-game GPU/Monitor presets, Steam Shortcuts |
| Phase 9 | ๐ Planned | Full MO2 USVFS, VR support, Steam Deck mode |
STL-Next is built with Zig 0.15.2 (latest stable). The Raylib GUI is next in the roadmap.
No more remembering launch options! Save per-game GPU/monitor configurations:
# Create a profile for your Arc GPU on main monitor
stl-next profile-create 413150 "Arc-Main" --gpu arc --monitor DP-1 --resolution 2560x1440@144
# Create a profile for NVIDIA on secondary monitor
stl-next profile-create 413150 "RTX-4K" --gpu nvidia --monitor HDMI-1 --resolution 3840x2160@60# Launch with a specific profile
stl-next run 413150 --profile "Arc-Main"
# Set default profile (used when no --profile specified)
stl-next profile-set 413150 "Arc-Main"
# List all profiles for a game
stl-next profile-list 413150# Create a Steam shortcut for a profile
# Appears as "Stardew Valley [Arc-Main]" in your library!
stl-next profile-shortcut 413150 "Arc-Main"# List detected GPUs
stl-next gpu-list
# Test GPU selection
stl-next gpu-test nvidia # Test NVIDIA env vars
stl-next gpu-test arc # Test Intel Arc env vars
stl-next gpu-test 0 # Test specific GPU indexโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ STL-NEXT BENCHMARK โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Steam Discovery: 0.14 ms
Game Lookup (413150): 0.35 ms (with launch options!)
List All Games: 12.25 ms (42 games)
List Protons: 0.07 ms (6 versions)
All operations < 100ms โ
Add to your flake inputs:
inputs.stl-next.url = "github:e421/stl-next";
# Or local: inputs.stl-next.url = "path:/path/to/stl-next";NixOS Module:
{ stl-next, ... }: {
imports = [ stl-next.nixosModules.default ];
programs.stl-next = {
enable = true;
registerNxmHandler = true;
};
}Home Manager Module:
{ stl-next, ... }: {
imports = [ stl-next.homeManagerModules.default ];
programs.stl-next = {
enable = true;
countdownSeconds = 10;
defaultTinkers.gamemode = true;
};
}git clone https://github.com/e421/stl-next
cd stl-next
nix develop
zig build -Doptimize=ReleaseFast
# Usage
./zig-out/bin/stl-next help
./zig-out/bin/stl-next 413150 # Launch Stardew Valley
./zig-out/bin/stl-next info 413150 # Get game info (JSON)
./zig-out/bin/stl-next wait 413150 # Start wait requester
./zig-out/bin/stl-next tui 413150 # Connect TUI client
./zig-out/bin/stl-next nxm "nxm://..." # Handle NXM linksrc/
โโโ main.zig # CLI entry point
โโโ core/
โ โโโ config.zig # JSON configs (std.json)
โ โโโ launcher.zig # Launch pipeline (real exec!)
โโโ engine/
โ โโโ steam.zig # Steam discovery + launch options
โ โโโ vdf.zig # VDF parsing
โ โโโ appinfo.zig # Binary VDF streaming
โ โโโ leveldb.zig # Collections (best-effort)
โโโ tinkers/
โ โโโ interface.zig # Tinker trait (no global state!)
โ โโโ mangohud.zig # MangoHud overlay
โ โโโ gamescope.zig # Compositor wrapper
โ โโโ gamemode.zig # System optimizations
โโโ ipc/ # Phase 4: NEW
โ โโโ protocol.zig # JSON over Unix sockets
โ โโโ server.zig # Daemon side
โ โโโ client.zig # Client side
โโโ ui/ # Phase 4: NEW
โ โโโ daemon.zig # Wait requester daemon
โ โโโ tui.zig # Terminal UI client
โโโ modding/ # Phase 4+: Mod Manager Integration
โโโ manager.zig # MO2/Vortex coordinator + NXM handler
โโโ vortex.zig # Vortex auto-discovery + NXM forwarding
| Command | Description |
|---|---|
wait <AppID> |
Start wait requester daemon with countdown |
tui <AppID> |
Connect TUI client to running daemon |
nxm <url> |
Handle NXM protocol link from browser |
# Setup (get key from nexusmods.com/users/myaccount?tab=api%20access)
stl-next nexus-login YOUR_API_KEY # Save API key
stl-next nexus-whoami # Verify key + show user info
# Mod information
stl-next nexus-mod stardewvalley 21297 # Get mod details
stl-next nexus-files stardewvalley 21297 # List downloadable files
# Downloads (Premium Nexus members only)
stl-next nexus-download stardewvalley 21297 12345 # Get download link
# Update tracking
stl-next nexus-track stardewvalley 21297 # Track mod for updates
stl-next nexus-tracked # List all tracked modsSee: NEXUS_API_SECRETS.md for NixOS secret management.
| Variable | Description |
|---|---|
STL_SKIP_WAIT |
Skip wait requester (instant launch) |
STL_COUNTDOWN |
Countdown seconds (default: 10) |
STL_CONFIG_DIR |
Config directory |
STL_NEXUS_API_KEY |
Nexus Mods API key (get from nexusmods.com) |
STEAMGRIDDB_API_KEY |
SteamGridDB API key (free at steamgriddb.com) |
Unlike the original Bash script, STL-Next has comprehensive error handling:
| Category | Hardening |
|---|---|
| NXM URLs | Validates scheme, domain, IDs; URL-encodes for Wine |
| IPC | Retry logic, timeouts, connection recovery |
| Config | JSON validation, size limits, graceful defaults |
| VDF | Handles malformed files, missing fields |
| Memory | Test allocator catches all leaks |
Edge case tests in src/tests/edge_cases.zig:
- Collection URL revision preservation (THE BUG FIX)
- Special characters in mod names
- Boundary conditions (max AppID, etc.)
- Memory safety (allocation/deallocation loops)
| Feature | Status | Notes |
|---|---|---|
| Raylib GUI | โ Phase 5 | TUI available now |
| MO2 USVFS | ๐ถ Basic | DLL override detection |
| VR Support | โ Phase 5+ | UEVR integration planned |
- Raylib-based graphical Wait-Requester
- Vortex auto-discovery and NXM forwarding
- Full MO2 USVFS injection
- Vortex download queue integration
- ReShade with hash-based updates
- Steam Deck gamepad support
| Document | Description |
|---|---|
| IPC Protocol | Full specification of the daemon/client protocol |
| Architecture | Code structure and component overview |
| Feature Roadmap | Comparison with original STL + future plans |
| NXM Handling | NXM protocol parsing and the bug fix |
| Document | Description |
|---|---|
| Bug Verification Matrix | All original STL bugs and their status in STL-Next |
| Game Testing Guide | Test procedures for target games (Stardew, Skyrim, FO4, CP77) |
| Document | Description |
|---|---|
| NixOS Installation | Dedicated guide for NixOS users |
| Stardrop Integration | Stardrop mod manager research and plan |
| Document | Description |
|---|---|
| Winetricks Guide | Windows components & DLL installation |
| Custom Commands | Pre/post launch shell commands |
| Non-Steam Games | Adding GOG, Epic, and other games |
| SteamGridDB Guide | Game artwork integration |
| Nexus API Secrets | API key management (sops-nix, agenix) |
# Enter development shell
nix develop
# Build debug
zig build
# Build release
zig build -Doptimize=ReleaseFast
# Run tests
zig build test
# Run specific test
zig build test -- "nxm: collection url"We welcome contributions! Priority areas:
- Tinker modules - Add tools like ReShade, vkBasalt
- Tests - Edge cases in
src/tests/edge_cases.zig - Documentation - Usage guides and examples
- Bug reports - Especially for mod manager issues
See ARCHITECTURE.md for code structure.
MIT
Why STL-Next? Because bugs like the NXM URL truncation shouldn't sit unfixed for 6+ months.