{
  "id": "libvirt",
  "name": "libvirt",
  "homepage": "https://libvirt.org",
  "description": "A toolkit to interact with virtualization capabilities through a common API.",
  "executables": [
    "virsh",
    "virt-admin",
    "virt-host-validate"
  ],
  "dotfiles": {
    "paths": [
      "[configHome]/libvirt/libvirt.conf"
    ],
    "secret": [
      "[configHome]/libvirt/auth.conf"
    ]
  },
  "commands": {
    "format": 1,
    "label": "virsh",
    "description": "Manage libvirt guest domains with virsh: list, start and gracefully shut down. The connect URI is a global option. virt-admin and virt-host-validate are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "source": [
      {
        "id": "man",
        "kind": "manual",
        "url": "https://manpages.debian.org/unstable/libvirt-clients/virsh.1.en.html",
        "revision": "2026-10",
        "evidence": "virsh [OPTION]... COMMAND [ARG]...\n-c, --connect URI\nConnect to the specified URI, as if by the connect command, instead of the default connection.\n-r, --readonly\nMake the initial connection read-only\n-q, --quiet\nAvoid extra informational messages.\n"
      }
    ],
    "field": [
      {
        "id": "connect",
        "label": "Connection URI",
        "description": "For example qemu:///system or qemu:///session.",
        "type": "string",
        "option": [
          "--connect",
          "-c"
        ],
        "suggestions": [
          {
            "value": "qemu:///system",
            "label": "QEMU system"
          },
          {
            "value": "qemu:///session",
            "label": "QEMU session"
          }
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "readonly",
        "label": "Read-only connection",
        "type": "boolean",
        "option": [
          "--readonly",
          "-r"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "quiet",
        "label": "Quiet",
        "type": "boolean",
        "option": [
          "--quiet",
          "-q"
        ],
        "sources": [
          "man"
        ]
      }
    ],
    "task": [
      {
        "id": "readonly_session",
        "label": "Read-only connection",
        "fields": [
          "connect",
          "readonly",
          "quiet"
        ],
        "required": [
          "connect"
        ],
        "set": {
          "readonly": [
            true
          ]
        }
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "connect",
          "readonly",
          "quiet"
        ]
      }
    ],
    "subcommand": [
      {
        "path": [
          "list"
        ],
        "label": "List domains",
        "description": "Print information about domains; running ones by default.",
        "source": [
          {
            "id": "man",
            "kind": "manual",
            "url": "https://manpages.debian.org/unstable/libvirt-clients/virsh.1.en.html",
            "revision": "2026-10",
            "evidence": "list [--inactive | --all]\n[--managed-save] [--title]\n{ [--table] | --name | --id } [--uuid]\n[--autostart] [--no-autostart]\n[--state-running] [--state-paused]\n[--state-shutoff] [--state-other]\nPrints information about existing domains. If no options are specified it prints out information about running domains.\n"
          }
        ],
        "field": [
          {
            "id": "all",
            "label": "All domains",
            "type": "boolean",
            "option": [
              "--all"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "inactive",
            "label": "Inactive only",
            "type": "boolean",
            "option": [
              "--inactive"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "name",
            "label": "Names only",
            "type": "boolean",
            "option": [
              "--name"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "uuid",
            "label": "Show UUIDs",
            "type": "boolean",
            "option": [
              "--uuid"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "title",
            "label": "Show titles",
            "type": "boolean",
            "option": [
              "--title"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "autostart",
            "label": "Autostart only",
            "type": "boolean",
            "option": [
              "--autostart"
            ],
            "sources": [
              "man"
            ]
          }
        ],
        "task": [
          {
            "id": "list_all",
            "label": "List every domain",
            "fields": [
              "all",
              "uuid",
              "title"
            ],
            "required": [
              "all"
            ],
            "set": {
              "all": [
                true
              ]
            }
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "all",
              "inactive",
              "name"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "uuid",
              "title",
              "autostart"
            ]
          }
        ]
      },
      {
        "path": [
          "start"
        ],
        "label": "Start a domain",
        "description": "Start a previously defined inactive domain.",
        "source": [
          {
            "id": "man",
            "kind": "manual",
            "url": "https://manpages.debian.org/unstable/libvirt-clients/virsh.1.en.html",
            "revision": "2026-10",
            "evidence": "start domain-name-or-uuid [--console] [--paused]\n[--autodestroy] [--bypass-cache] [--force-boot]\n[--pass-fds N,M,...] [--reset-nvram]\nStart a (previously defined) inactive domain\nIf --force-boot is specified, then any managedsave state is discarded and a fresh boot occurs.\n"
          }
        ],
        "field": [
          {
            "id": "domain",
            "label": "Domain",
            "description": "Domain name or UUID.",
            "type": "string",
            "position": 0,
            "sources": [
              "man"
            ]
          },
          {
            "id": "console",
            "label": "Attach to console",
            "type": "boolean",
            "option": [
              "--console"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "paused",
            "label": "Start paused",
            "type": "boolean",
            "option": [
              "--paused"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "force_boot",
            "label": "Force fresh boot",
            "description": "Discards any managedsave state.",
            "type": "boolean",
            "option": [
              "--force-boot"
            ],
            "effect": "delete",
            "sources": [
              "man"
            ]
          }
        ],
        "task": [
          {
            "id": "start_domain",
            "label": "Start a domain",
            "fields": [
              "domain",
              "console",
              "paused"
            ],
            "required": [
              "domain"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "domain",
              "console",
              "paused"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "force_boot"
            ]
          }
        ]
      },
      {
        "path": [
          "shutdown"
        ],
        "label": "Shut down a domain",
        "description": "Gracefully shut down a domain; there is no guarantee it succeeds.",
        "source": [
          {
            "id": "man",
            "kind": "manual",
            "url": "https://manpages.debian.org/unstable/libvirt-clients/virsh.1.en.html",
            "revision": "2026-10",
            "evidence": "shutdown domain [--mode MODE-LIST]\nGracefully shuts down a domain.\nthe --mode parameter can specify a comma separated list which includes acpi, agent, initctl, signal and paravirt.\n"
          }
        ],
        "field": [
          {
            "id": "domain",
            "label": "Domain",
            "description": "Domain name or UUID.",
            "type": "string",
            "position": 0,
            "sources": [
              "man"
            ]
          },
          {
            "id": "mode",
            "label": "Shutdown mode",
            "description": "Comma-separated list of methods to try.",
            "type": "string",
            "option": [
              "--mode"
            ],
            "suggestions": [
              {
                "value": "acpi",
                "label": "ACPI"
              },
              {
                "value": "agent",
                "label": "Guest agent"
              },
              {
                "value": "initctl",
                "label": "initctl"
              },
              {
                "value": "signal",
                "label": "Signal"
              },
              {
                "value": "paravirt",
                "label": "Paravirt"
              }
            ],
            "sources": [
              "man"
            ]
          }
        ],
        "task": [
          {
            "id": "shutdown_domain",
            "label": "Shut down a domain",
            "fields": [
              "domain",
              "mode"
            ],
            "required": [
              "domain"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "domain",
              "mode"
            ]
          }
        ]
      }
    ]
  }
}
