{
  "id": "dtop",
  "name": "dtop",
  "homepage": "https://github.com/amir20/dtop",
  "description": "A terminal-based Docker container monitoring tool with real-time CPU and memory metrics.",
  "executables": [
    "dtop"
  ],
  "dotfiles": {
    "paths": [
      "~/.config/dtop/config.yaml",
      "~/.config/dtop/config.yml",
      "~/.dtop.yaml",
      "~/.dtop.yml"
    ],
    "secret": []
  },
  "commands": {
    "format": 1,
    "label": "Monitor containers",
    "description": "Start dtop against one or more Docker hosts. Subcommands (update) and TLS certificate setup are not covered.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "source": [
      {
        "id": "help",
        "kind": "help",
        "url": "https://github.com/amir20/dtop",
        "revision": "dtop --help (README)",
        "evidence": "Usage: dtop [OPTIONS] [COMMAND]\n  -c, --config <PATH>\n          Path to a config file to use instead of the default locations\n  -H, --host <HOST>\n          Docker host(s) to connect to. Can be specified multiple times.\n            --host local                    (Connect to local Docker daemon / active Docker context)\n            --host unix:///path/docker.sock (Connect to a specific Unix socket)\n            --host ssh://user@host          (Connect via SSH)\n            --host tcp://host:2375          (Connect via TCP to remote Docker daemon)\n            --host tls://host:2376          (Connect via TLS)\n  -i, --icons <ICONS>\n            auto     - Nerd Font icons on terminals that ship them built in\n            unicode  - Standard Unicode icons (works everywhere)\n            nerd     - Nerd Font icons (requires Nerd Font installed)\n  -f, --filter <FILTER>\n          Filter containers (can be specified multiple times)\n            --filter status=running\n            --filter name=nginx\n  -a, --all\n          Show all containers (default shows only running containers)\n  -s, --sort <SORT>\n            uptime  - Sort by container uptime/creation time (default, newest first)\n            name    - Sort by container name (alphabetically)\n            cpu     - Sort by CPU usage (highest first)\n            memory  - Sort by memory usage (highest first)\n"
      }
    ],
    "field": [
      {
        "id": "host",
        "label": "Docker host",
        "description": "Repeat for several hosts. Defaults to the config file or local.",
        "type": "string",
        "option": [
          "--host",
          "-H"
        ],
        "multiple": true,
        "suggestions": [
          {
            "value": "local",
            "label": "Local Docker daemon"
          },
          {
            "value": "ssh://user@host",
            "label": "SSH"
          },
          {
            "value": "tcp://host:2375",
            "label": "TCP"
          },
          {
            "value": "tls://host:2376",
            "label": "TLS"
          }
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "all",
        "label": "Show all containers",
        "description": "Include stopped, exited and paused containers.",
        "type": "boolean",
        "option": [
          "--all",
          "-a"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "filter",
        "label": "Filter",
        "description": "name=value, e.g. status=running or name=nginx. Repeatable.",
        "type": "string",
        "option": [
          "--filter",
          "-f"
        ],
        "multiple": true,
        "suggestions": [
          {
            "value": "status=running",
            "label": "Running"
          },
          {
            "value": "name=nginx",
            "label": "Name"
          }
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "sort",
        "label": "Sort by",
        "type": "enum",
        "option": [
          "--sort",
          "-s"
        ],
        "choices": [
          {
            "value": "uptime",
            "label": "Uptime"
          },
          {
            "value": "name",
            "label": "Name"
          },
          {
            "value": "cpu",
            "label": "CPU"
          },
          {
            "value": "memory",
            "label": "Memory"
          }
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "icons",
        "label": "Icon style",
        "type": "enum",
        "option": [
          "--icons",
          "-i"
        ],
        "choices": [
          {
            "value": "auto",
            "label": "Auto"
          },
          {
            "value": "unicode",
            "label": "Unicode"
          },
          {
            "value": "nerd",
            "label": "Nerd Font"
          }
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "config",
        "label": "Config file",
        "type": "path",
        "option": [
          "--config",
          "-c"
        ],
        "path": {
          "kind": "file",
          "role": "input",
          "must_exist": true
        },
        "sources": [
          "help"
        ]
      }
    ],
    "task": [
      {
        "id": "local",
        "label": "Local containers",
        "fields": [
          "all",
          "filter",
          "sort",
          "icons"
        ],
        "required": []
      },
      {
        "id": "remote",
        "label": "Remote host",
        "fields": [
          "host",
          "all",
          "filter",
          "sort"
        ],
        "required": [
          "host"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "host",
          "all",
          "filter",
          "sort"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "icons",
          "config"
        ]
      }
    ]
  }
}
