id = "mihomo" name = "Mihomo" homepage = "https://github.com/MetaCubeX/mihomo" description = "Another rule-based tunnel in Go, formerly known as ClashMeta." executables = ["mihomo"] [dotfiles] # Description wording follows Homebrew's official formula metadata. # https://formulae.brew.sh/formula/mihomo # The upstream source hard-codes $HOME/.config/mihomo on Unix (and the same # .config path below the Windows user profile), using config.yaml by default. # XDG_CONFIG_HOME is only consulted as a fallback when that directory is # absent, so this remains a literal home-relative path rather than [configHome]. # https://raw.githubusercontent.com/MetaCubeX/mihomo/Meta/constant/path.go # https://raw.githubusercontent.com/MetaCubeX/mihomo/Meta/main.go paths = [] # A Mihomo YAML config can carry proxy credentials and the controller secret; # classify the whole file conservatively. The source exposes --secret for the # controller and reads the same config file for normal operation. secret = ["~/.config/mihomo/config.yaml"] [commands] format = 1 label = "Run Mihomo" description = "Start the proxy core or test a configuration. Controller overrides, age keys and hook scripts are left out." quality = "ai-draft" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = false, short_bundles = false } [[commands.source]] id = "main" kind = "help" url = "https://raw.githubusercontent.com/MetaCubeX/mihomo/Meta/main.go" revision = "Meta branch 2026-10" evidence = """Go flag names as registered (usage: -d, -f, -ext-ui, -ext-ctl, -t, -v): flag.StringVar(&homeDir, "d", os.Getenv("CLASH_HOME_DIR"), "set configuration directory") flag.StringVar(&configFile, "f", os.Getenv("CLASH_CONFIG_FILE"), "specify configuration file") flag.StringVar(&configString, "config", os.Getenv("CLASH_CONFIG_STRING"), "specify base64-encoded configuration string") flag.StringVar(&externalUI, "ext-ui", os.Getenv("CLASH_OVERRIDE_EXTERNAL_UI_DIR"), "override external ui directory") flag.StringVar(&externalController, "ext-ctl", os.Getenv("CLASH_OVERRIDE_EXTERNAL_CONTROLLER"), "override external controller address") flag.StringVar(&secret, "secret", os.Getenv("CLASH_OVERRIDE_SECRET"), "override secret for RESTful API") flag.BoolVar(&version, "v", false, "show current version of mihomo") flag.BoolVar(&testConfig, "t", false, "test configuration and exit")""" [[commands.field]] id = "home_dir" label = "Configuration directory" type = "path" path = { kind = "directory", role = "input" } option = ["-d"] sources = ["main"] [[commands.field]] id = "config_file" label = "Configuration file" type = "path" path = { kind = "file", role = "input" } option = ["-f"] sources = ["main"] [[commands.field]] id = "ext_ui" label = "External UI directory" type = "path" path = { kind = "directory", role = "input" } option = ["-ext-ui"] sources = ["main"] [[commands.field]] id = "ext_ctl" label = "External controller address" type = "string" option = ["-ext-ctl"] sources = ["main"] [[commands.field]] id = "test_config" label = "Test configuration and exit" type = "boolean" option = ["-t"] sources = ["main"] [[commands.field]] id = "version" label = "Show version" type = "boolean" option = ["-v"] sources = ["main"] [[commands.task]] id = "run" label = "Run with a config file" fields = ["config_file", "home_dir"] required = ["config_file"] [[commands.task]] id = "test" label = "Test a config file" fields = ["config_file", "home_dir", "test_config"] required = ["config_file", "test_config"] set = { test_config = [true] } [[commands.group]] id = "basic" label = "Basic" fields = ["config_file", "home_dir", "test_config", "version"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["ext_ui", "ext_ctl"]