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 }
[[commands.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]
-m, --arch string Set the architecture
-d, --detach Run unikernel in background
-e, --env stringArray Set environment variables, int the format key[=value]
-M, --memory string Assign memory to the unikernel (K/Ki, M/Mi, G/Gi) (default "64Mi")
-n, --name string Name of the instance
--plat string Set the platform virtual machine monitor driver. (default "auto")
-p, --port stringArray Publish a machine's port(s) to the host
--rm Automatically remove the unikernel when it shutsdown
--rootfs string Specify a path to use as root file system (can be volume or initramfs)
-t, --target string Explicitly use the defined project target
-v, --volume strings Bind a volume to the instance
"""
[[commands.subcommand]]
path = ["run"]
label = "Run a unikernel"
[[commands.subcommand.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]
-m, --arch string Set the architecture
-d, --detach Run unikernel in background
-e, --env stringArray Set environment variables, int the format key[=value]
-M, --memory string Assign memory to the unikernel (K/Ki, M/Mi, G/Gi) (default "64Mi")
-n, --name string Name of the instance
--plat string Set the platform virtual machine monitor driver. (default "auto")
-p, --port stringArray Publish a machine's port(s) to the host
--rm Automatically remove the unikernel when it shutsdown
--rootfs string Specify a path to use as root file system (can be volume or initramfs)
-t, --target string Explicitly use the defined project target
-v, --volume strings Bind a volume to the instance
"""
[[commands.subcommand.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"]
[[commands.subcommand.field]]
id = "target"
label = "Project target"
type = "string"
option = ["--target", "-t"]
sources = ["help"]
[[commands.subcommand.field]]
id = "arch"
label = "Architecture"
type = "string"
option = ["--arch", "-m"]
suggestions = [{ value = "x86_64", label = "x86_64" }, { value = "arm64", label = "arm64" }]
sources = ["help"]
[[commands.subcommand.field]]
id = "plat"
label = "Platform"
type = "string"
option = ["--plat"]
suggestions = [{ value = "qemu", label = "QEMU" }]
sources = ["help"]
[[commands.subcommand.field]]
id = "memory"
label = "Memory"
description = "For example 64Mi, 1G."
type = "string"
option = ["--memory", "-M"]
sources = ["help"]
[[commands.subcommand.field]]
id = "port"
label = "Publish ports"
description = "host:guest, for example 8080:80."
type = "string"
option = ["--port", "-p"]
multiple = true
sources = ["help"]
[[commands.subcommand.field]]
id = "volume"
label = "Volumes"
description = "host-path:guest-path."
type = "string"
option = ["--volume", "-v"]
multiple = true
sources = ["help"]
[[commands.subcommand.field]]
id = "rootfs"
label = "Root filesystem"
type = "path"
path = { kind = "any", role = "input" }
option = ["--rootfs"]
sources = ["help"]
[[commands.subcommand.field]]
id = "env"
label = "Environment variables"
type = "string"
option = ["--env", "-e"]
multiple = true
sources = ["help"]
[[commands.subcommand.field]]
id = "name"
label = "Instance name"
type = "string"
option = ["--name", "-n"]
sources = ["help"]
[[commands.subcommand.field]]
id = "detach"
label = "Run in background"
type = "boolean"
option = ["--detach", "-d"]
sources = ["help"]
[[commands.subcommand.field]]
id = "rm"
label = "Remove when it stops"
type = "boolean"
option = ["--rm"]
sources = ["help"]
[[commands.subcommand.task]]
id = "run_project"
label = "Run the current project"
fields = ["target", "memory", "port"]
required = []
[[commands.subcommand.task]]
id = "run_binary"
label = "Run a kernel binary"
fields = ["project", "arch", "plat", "memory", "port"]
required = ["project", "arch", "plat"]
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["project", "target", "arch", "plat", "memory", "port"]
[[commands.subcommand.group]]
id = "advanced"
label = "Advanced"
fields = ["volume", "rootfs", "env", "name", "detach", "rm"]