Files

25 lines
618 B
Python
Raw Permalink Normal View History

import os
import sys
import socket
# Prevent unbounded socket hangs across Cloudflare WARP / remote API calls
socket.setdefaulttimeout(15.0)
node = sys.argv[1]
conf_dir = os.path.expanduser(f"~/.config/muse-cli/{node}")
os.environ["MUSE_CONFIG_DIR"] = conf_dir
sys.path.insert(0, os.path.expanduser("~/.local/lib/python3.14/site-packages"))
import muse_cli.cli as cli
cli.CONFIG_DIR = conf_dir
cli.CONFIG_FILE = os.path.join(conf_dir, "config.json")
cli.COOKIES_FILE = os.path.join(conf_dir, "cookies.txt")
sys.argv = [sys.argv[0]] + sys.argv[2:]
try:
cli.main()
except SystemExit as e:
sys.exit(e.code)