{
  "id": "mactop",
  "name": "mactop",
  "homepage": "https://github.com/metaspartan/mactop",
  "description": "Apple Silicon Monitor Top written in Go Lang.",
  "executables": [
    "mactop"
  ],
  "platforms": [
    "macos"
  ],
  "dotfiles": {
    "paths": [
      "[configHome]/mactop/config.json",
      "[configHome]/mactop/theme.json",
      "~/.mactop/config.json",
      "~/.mactop/theme.json"
    ],
    "secret": []
  },
  "commands": {
    "format": 1,
    "label": "mactop",
    "description": "Run the monitor TUI or print samples headlessly. Fan control (writes to SMC, needs root) is left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "source": [
      {
        "id": "readme",
        "kind": "help",
        "url": "https://github.com/metaspartan/mactop",
        "evidence": "- `--headless`: Run in headless mode (no TUI, output to stdout).\n- `--format`: Output format for headless mode (json, yaml, xml, toon). Default is json.\n- `--count`: Number of samples to collect in headless mode (0 = infinite).\n- `--pretty`: Pretty print JSON output in headless mode.\n- `--interval` or `-i`: Set the update interval in milliseconds. Default is 1000.\n- `--foreground`: Set the UI foreground color.\n- `--bg` or `--background`: Set the UI background color.\n- `--prometheus` or `-p`: Set and enable the local Prometheus metrics server on the given port.\n- `--unit-network`: Network unit: auto, byte, kb, mb, gb (default: auto)\n- `--unit-disk`: Disk unit: auto, byte, kb, mb, gb (default: auto)\n- `--unit-temp`: Temperature unit: celsius, fahrenheit (default: celsius)\n- `--lang`: Language override (e.g., `en`, `es`, `ja`, `zh`)."
      }
    ],
    "field": [
      {
        "id": "headless",
        "label": "Headless mode",
        "description": "No TUI; print samples to stdout.",
        "type": "boolean",
        "option": [
          "--headless"
        ],
        "sources": [
          "readme"
        ]
      },
      {
        "id": "format",
        "label": "Output format",
        "type": "enum",
        "option": [
          "--format"
        ],
        "choices": [
          {
            "value": "json",
            "label": "JSON"
          },
          {
            "value": "yaml",
            "label": "YAML"
          },
          {
            "value": "xml",
            "label": "XML"
          },
          {
            "value": "toon",
            "label": "TOON"
          }
        ],
        "enabled_when": {
          "field": "headless",
          "op": "equals",
          "value": true
        },
        "sources": [
          "readme"
        ]
      },
      {
        "id": "count",
        "label": "Sample count",
        "description": "0 = infinite.",
        "type": "integer",
        "option": [
          "--count"
        ],
        "enabled_when": {
          "field": "headless",
          "op": "equals",
          "value": true
        },
        "sources": [
          "readme"
        ]
      },
      {
        "id": "pretty",
        "label": "Pretty print",
        "type": "boolean",
        "option": [
          "--pretty"
        ],
        "enabled_when": {
          "field": "headless",
          "op": "equals",
          "value": true
        },
        "sources": [
          "readme"
        ]
      },
      {
        "id": "interval",
        "label": "Update interval (ms)",
        "type": "integer",
        "option": [
          "--interval",
          "-i"
        ],
        "sources": [
          "readme"
        ]
      },
      {
        "id": "foreground",
        "label": "Foreground color",
        "type": "string",
        "option": [
          "--foreground"
        ],
        "suggestions": [
          {
            "value": "green",
            "label": "Green"
          },
          {
            "value": "dracula",
            "label": "Dracula"
          },
          {
            "value": "mocha",
            "label": "Mocha"
          }
        ],
        "sources": [
          "readme"
        ]
      },
      {
        "id": "background",
        "label": "Background color",
        "type": "string",
        "option": [
          "--bg",
          "--background"
        ],
        "suggestions": [
          {
            "value": "dracula-base",
            "label": "Dracula"
          },
          {
            "value": "mocha-base",
            "label": "Mocha"
          }
        ],
        "sources": [
          "readme"
        ]
      },
      {
        "id": "prometheus",
        "label": "Prometheus port",
        "type": "integer",
        "option": [
          "--prometheus",
          "-p"
        ],
        "sources": [
          "readme"
        ]
      },
      {
        "id": "unit_network",
        "label": "Network unit",
        "type": "enum",
        "option": [
          "--unit-network"
        ],
        "choices": [
          {
            "value": "auto",
            "label": "Auto"
          },
          {
            "value": "byte",
            "label": "Byte"
          },
          {
            "value": "kb",
            "label": "KB"
          },
          {
            "value": "mb",
            "label": "MB"
          },
          {
            "value": "gb",
            "label": "GB"
          }
        ],
        "sources": [
          "readme"
        ]
      },
      {
        "id": "unit_disk",
        "label": "Disk unit",
        "type": "enum",
        "option": [
          "--unit-disk"
        ],
        "choices": [
          {
            "value": "auto",
            "label": "Auto"
          },
          {
            "value": "byte",
            "label": "Byte"
          },
          {
            "value": "kb",
            "label": "KB"
          },
          {
            "value": "mb",
            "label": "MB"
          },
          {
            "value": "gb",
            "label": "GB"
          }
        ],
        "sources": [
          "readme"
        ]
      },
      {
        "id": "unit_temp",
        "label": "Temperature unit",
        "type": "enum",
        "option": [
          "--unit-temp"
        ],
        "choices": [
          {
            "value": "celsius",
            "label": "Celsius"
          },
          {
            "value": "fahrenheit",
            "label": "Fahrenheit"
          }
        ],
        "sources": [
          "readme"
        ]
      },
      {
        "id": "lang",
        "label": "Language",
        "type": "string",
        "option": [
          "--lang"
        ],
        "suggestions": [
          {
            "value": "en",
            "label": "English"
          },
          {
            "value": "ja",
            "label": "Japanese"
          },
          {
            "value": "zh",
            "label": "Chinese"
          },
          {
            "value": "es",
            "label": "Spanish"
          }
        ],
        "sources": [
          "readme"
        ]
      }
    ],
    "task": [
      {
        "id": "monitor",
        "label": "Interactive monitor",
        "fields": [
          "interval",
          "foreground",
          "background",
          "unit_network",
          "unit_disk",
          "unit_temp",
          "lang"
        ],
        "required": []
      },
      {
        "id": "snapshot",
        "label": "One JSON snapshot",
        "set": {
          "headless": [
            true
          ],
          "count": [
            1
          ]
        },
        "lock": [
          "headless"
        ],
        "fields": [
          "headless",
          "count",
          "format",
          "pretty"
        ],
        "required": []
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "headless",
          "format",
          "count",
          "pretty",
          "interval"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "foreground",
          "background",
          "prometheus",
          "unit_network",
          "unit_disk",
          "unit_temp",
          "lang"
        ]
      }
    ]
  }
}
