{
  "id": "mihomo",
  "name": "Mihomo",
  "homepage": "https://github.com/MetaCubeX/mihomo",
  "description": "Another rule-based tunnel in Go, formerly known as ClashMeta.",
  "executables": [
    "mihomo"
  ],
  "dotfiles": {
    "paths": [],
    "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
    },
    "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):\nflag.StringVar(&homeDir, \"d\", os.Getenv(\"CLASH_HOME_DIR\"), \"set configuration directory\")\nflag.StringVar(&configFile, \"f\", os.Getenv(\"CLASH_CONFIG_FILE\"), \"specify configuration file\")\nflag.StringVar(&configString, \"config\", os.Getenv(\"CLASH_CONFIG_STRING\"), \"specify base64-encoded configuration string\")\nflag.StringVar(&externalUI, \"ext-ui\", os.Getenv(\"CLASH_OVERRIDE_EXTERNAL_UI_DIR\"), \"override external ui directory\")\nflag.StringVar(&externalController, \"ext-ctl\", os.Getenv(\"CLASH_OVERRIDE_EXTERNAL_CONTROLLER\"), \"override external controller address\")\nflag.StringVar(&secret, \"secret\", os.Getenv(\"CLASH_OVERRIDE_SECRET\"), \"override secret for RESTful API\")\nflag.BoolVar(&version, \"v\", false, \"show current version of mihomo\")\nflag.BoolVar(&testConfig, \"t\", false, \"test configuration and exit\")"
      }
    ],
    "field": [
      {
        "id": "home_dir",
        "label": "Configuration directory",
        "type": "path",
        "path": {
          "kind": "directory",
          "role": "input"
        },
        "option": [
          "-d"
        ],
        "sources": [
          "main"
        ]
      },
      {
        "id": "config_file",
        "label": "Configuration file",
        "type": "path",
        "path": {
          "kind": "file",
          "role": "input"
        },
        "option": [
          "-f"
        ],
        "sources": [
          "main"
        ]
      },
      {
        "id": "ext_ui",
        "label": "External UI directory",
        "type": "path",
        "path": {
          "kind": "directory",
          "role": "input"
        },
        "option": [
          "-ext-ui"
        ],
        "sources": [
          "main"
        ]
      },
      {
        "id": "ext_ctl",
        "label": "External controller address",
        "type": "string",
        "option": [
          "-ext-ctl"
        ],
        "sources": [
          "main"
        ]
      },
      {
        "id": "test_config",
        "label": "Test configuration and exit",
        "type": "boolean",
        "option": [
          "-t"
        ],
        "sources": [
          "main"
        ]
      },
      {
        "id": "version",
        "label": "Show version",
        "type": "boolean",
        "option": [
          "-v"
        ],
        "sources": [
          "main"
        ]
      }
    ],
    "task": [
      {
        "id": "run",
        "label": "Run with a config file",
        "fields": [
          "config_file",
          "home_dir"
        ],
        "required": [
          "config_file"
        ]
      },
      {
        "id": "test",
        "label": "Test a config file",
        "fields": [
          "config_file",
          "home_dir",
          "test_config"
        ],
        "required": [
          "config_file",
          "test_config"
        ],
        "set": {
          "test_config": [
            true
          ]
        }
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "config_file",
          "home_dir",
          "test_config",
          "version"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "ext_ui",
          "ext_ctl"
        ]
      }
    ]
  }
}
