{
  "id": "kraftkit",
  "name": "KraftKit",
  "homepage": "https://unikraft.org/docs/cli",
  "description": "CLI for building and running Unikraft unikernels.",
  "executables": [
    "kraft"
  ],
  "dotfiles": {
    "paths": [
      "[configHome]/kraftkit/config.yaml"
    ],
    "secret": []
  },
  "commands": {
    "format": 1,
    "label": "Run a unikernel",
    "description": "Run a built project, package or kernel binary with architecture, platform, memory, ports and volumes. Networks, kernel args, MAC/IP and app arguments after -- are left out.",
    "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://unikraft.org/docs/cli/reference/kraft/run",
        "revision": "2026-10",
        "evidence": "kraft run [FLAGS] PROJECT|PACKAGE|BINARY -- [APP ARGS]\n-m, --arch string            Set the architecture\n-d, --detach                 Run unikernel in background\n-e, --env stringArray        Set environment variables, int the format key[=value]\n-M, --memory string          Assign memory to the unikernel (K/Ki, M/Mi, G/Gi) (default \"64Mi\")\n-n, --name string            Name of the instance\n--plat string            Set the platform virtual machine monitor driver. (default \"auto\")\n-p, --port stringArray       Publish a machine's port(s) to the host\n--rm                     Automatically remove the unikernel when it shutsdown\n--rootfs string          Specify a path to use as root file system (can be volume or initramfs)\n-t, --target string          Explicitly use the defined project target\n-v, --volume strings         Bind a volume to the instance\n"
      }
    ],
    "subcommand": [
      {
        "path": [
          "run"
        ],
        "label": "Run a unikernel",
        "source": [
          {
            "id": "help",
            "kind": "help",
            "url": "https://unikraft.org/docs/cli/reference/kraft/run",
            "revision": "2026-10",
            "evidence": "kraft run [FLAGS] PROJECT|PACKAGE|BINARY -- [APP ARGS]\n-m, --arch string            Set the architecture\n-d, --detach                 Run unikernel in background\n-e, --env stringArray        Set environment variables, int the format key[=value]\n-M, --memory string          Assign memory to the unikernel (K/Ki, M/Mi, G/Gi) (default \"64Mi\")\n-n, --name string            Name of the instance\n--plat string            Set the platform virtual machine monitor driver. (default \"auto\")\n-p, --port stringArray       Publish a machine's port(s) to the host\n--rm                     Automatically remove the unikernel when it shutsdown\n--rootfs string          Specify a path to use as root file system (can be volume or initramfs)\n-t, --target string          Explicitly use the defined project target\n-v, --volume strings         Bind a volume to the instance\n"
          }
        ],
        "field": [
          {
            "id": "project",
            "label": "Project, package or kernel binary",
            "description": "Leave empty to run the project in the current directory.",
            "type": "string",
            "position": 0,
            "sources": [
              "help"
            ]
          },
          {
            "id": "target",
            "label": "Project target",
            "type": "string",
            "option": [
              "--target",
              "-t"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "arch",
            "label": "Architecture",
            "type": "string",
            "option": [
              "--arch",
              "-m"
            ],
            "suggestions": [
              {
                "value": "x86_64",
                "label": "x86_64"
              },
              {
                "value": "arm64",
                "label": "arm64"
              }
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "plat",
            "label": "Platform",
            "type": "string",
            "option": [
              "--plat"
            ],
            "suggestions": [
              {
                "value": "qemu",
                "label": "QEMU"
              }
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "memory",
            "label": "Memory",
            "description": "For example 64Mi, 1G.",
            "type": "string",
            "option": [
              "--memory",
              "-M"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "port",
            "label": "Publish ports",
            "description": "host:guest, for example 8080:80.",
            "type": "string",
            "option": [
              "--port",
              "-p"
            ],
            "multiple": true,
            "sources": [
              "help"
            ]
          },
          {
            "id": "volume",
            "label": "Volumes",
            "description": "host-path:guest-path.",
            "type": "string",
            "option": [
              "--volume",
              "-v"
            ],
            "multiple": true,
            "sources": [
              "help"
            ]
          },
          {
            "id": "rootfs",
            "label": "Root filesystem",
            "type": "path",
            "path": {
              "kind": "any",
              "role": "input"
            },
            "option": [
              "--rootfs"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "env",
            "label": "Environment variables",
            "type": "string",
            "option": [
              "--env",
              "-e"
            ],
            "multiple": true,
            "sources": [
              "help"
            ]
          },
          {
            "id": "name",
            "label": "Instance name",
            "type": "string",
            "option": [
              "--name",
              "-n"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "detach",
            "label": "Run in background",
            "type": "boolean",
            "option": [
              "--detach",
              "-d"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "rm",
            "label": "Remove when it stops",
            "type": "boolean",
            "option": [
              "--rm"
            ],
            "sources": [
              "help"
            ]
          }
        ],
        "task": [
          {
            "id": "run_project",
            "label": "Run the current project",
            "fields": [
              "target",
              "memory",
              "port"
            ],
            "required": []
          },
          {
            "id": "run_binary",
            "label": "Run a kernel binary",
            "fields": [
              "project",
              "arch",
              "plat",
              "memory",
              "port"
            ],
            "required": [
              "project",
              "arch",
              "plat"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "project",
              "target",
              "arch",
              "plat",
              "memory",
              "port"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "volume",
              "rootfs",
              "env",
              "name",
              "detach",
              "rm"
            ]
          }
        ]
      }
    ]
  }
}
