Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
#!/usr/bin/env python3
# SPDX-License-Identifier: AGPL-3.0-only
# Copyright 2026-present the Unsloth AI Inc. team. All rights reserved.
"""Fake wsl.exe for Linux CI: runs guest commands here, logging to FAKE_WSL_LOG."""
import json
import os
import subprocess
import sys
def main(argv):
with open(os.environ["FAKE_WSL_LOG"], "a", encoding = "utf-8") as log:
log.write(
json.dumps(
{
"argv": argv,
"wslenv": os.environ.get("WSLENV", ""),
"shared": {
key.split("/")[0]: os.environ.get(key.split("/")[0])
for key in os.environ.get("WSLENV", "").split(":")
if key
},
}
)
+ "\n"
)
if argv[:1] == ["--status"]:
return int(os.environ.get("FAKE_WSL_STATUS", "0"))
if argv[:1] == ["--list"]:
print(os.environ.get("FAKE_WSL_DISTROS", "").replace(",", "\n"))
return 0
if argv[:1] == ["--unregister"]:
return int(os.environ.get("FAKE_WSL_UNREGISTER", "0"))
if argv[:1] in (["--import"], ["--terminate"]):
return 0
# Only --exec runs argv as given; after a bare -- the real wsl.exe re-parses it in a shell.
if "--exec" not in argv:
return 2
command = argv[argv.index("--exec") + 1 :]
return subprocess.call(command)
if __name__ == "__main__":
sys.exit(main(sys.argv[1:]))