DocsReleasesCommunityGuidesBlog

Unikraft CLI Companion Tool

Unikraft's companion command-line tool kraft has been modeled after many popular package managers and build tools with the explicit aim of making it easy to build and manage your application as a unikernel.

Before beginning, it is important to familiarize yourself with the concept of a unikernel and how unikernels differ from other runtime mediums, including: containers, standard VMs and OSes (e.g. Linux). At the same time, a general understanding of how a unikernel is constructed with Unikraft will help you understand how to use kraft effectively.

Please let us know if you run into any issues by reaching out through one of the main communication channels or by filing an issue on GitHub. Happy krafting! 🐒

Quick-start example based on qemu/x86_64#

Start by using the interactive installer:

curl --proto '=https' --tlsv1.2 -sSf https://get.kraftkit.sh | sh

This will install the kraft binary executable onto your host as well as additional dependencies necessary for building and running Unikraft unikernels. The installer detects your OS and suggests an appropriate installation procedure.

For more information on customizing your installation of kraft, please refer to the complete installation guide.

To test your installation, you can try running our pre-built "Hello, World" unikernel on your machine by simply invoking the following command:

kraft run unikraft.org/helloworld:latest

If all goes well, you should be greeted with a message and some helpful tips. If things didn't go well, please check out our troubleshooting guide for more information and for frequently asked questions.

kraft -h
.
/^\ Build and use highly customized and ultra-lightweight unikernels.
:[ ]:
| = | Version: v0.10.1
/|/=\|\ Documentation: https://unikraft.org/docs/cli
(_:| |:_) Issues & support: https://github.com/unikraft/kraftkit/issues
v v Platform: https://unikraft.cloud
' '
USAGE
kraft [FLAGS] SUBCOMMAND
BUILD COMMANDS
build Configure and build Unikraft unikernels
clean Remove the build object files of a Unikraft project
menu Open's Unikraft configuration editor TUI
PROJECT LIBRARY COMMANDS
lib add Add unikraft library to the project directory
lib create Initialize a library from a template
lib remove Removes a library dependency from the project directory
PACKAGING COMMANDS
pkg Package and distribute Unikraft unikernels and their dependencies
pkg info Show information about a package
pkg list List installed Unikraft component packages
pkg pull Pull a Unikraft unikernel and/or its dependencies
pkg push Push a Unikraft unikernel package to registry
pkg remove Removes selected local packages
pkg source Add Unikraft component manifests
pkg unsource Remove Unikraft component manifests
pkg update Retrieve new lists of Unikraft components, libraries and packages
LOCAL RUNTIME COMMANDS
logs Fetch the logs of a unikernel
pause Pause one or more running unikernels
ps List running unikernels
remove Remove one or more running unikernels
run Run a unikernel
start Start one or more machines
stop Stop one or more running unikernels
LOCAL NETWORKING COMMANDS
net create Create a new machine network
net down Bring a network offline
net inspect Inspect a machine network
net list List machine networks
net remove Remove a network
net up Bring a network online
LOCAL VOLUME COMMANDS
vol create Create a machine volume
vol inspect Inspect a machine volume
vol ls List machine volumes
vol remove Remove a volume
COMPOSE COMMANDS
compose build Build or rebuild services
compose create Create a compose project
compose down Stop and remove a compose project
compose logs Print the logs of services in a project
compose ls List compose projects
compose pause Pause a compose project
compose ps List running services of current project
compose pull Pull images of services of current project
compose push Push images of services of current project
compose start Start a compose project
compose stop Stop a compose project
compose unpause Unpause a compose project
compose up Run a compose project
UNIKRAFT CLOUD COMMANDS
cloud deploy Deploy your application
cloud quotas View your resource quota on Unikraft Cloud
cloud tunnel Forward a local port to an unexposed instance
UNIKRAFT CLOUD IMAGE COMMANDS
cloud img list List all images at a metro for your account
cloud img remove Remove an image
UNIKRAFT CLOUD INSTANCE COMMANDS
cloud instance create Create an instance
cloud instance get Retrieve the state of instances
cloud instance list List instances
cloud instance logs Get console output of instances
cloud instance remove Remove instances
cloud instance start Start instances
cloud instance stop Stop instances
cloud instance top Show instance metrics
UNIKRAFT CLOUD VOLUME COMMANDS
cloud vol attach Attach a persistent volume to an instance
cloud vol create Create a persistent volume
cloud vol detach Detach a persistent volume from an instance
cloud vol get Retrieve the state of persistent volumes
cloud vol import Import local data to a persistent volume
cloud vol list List persistent volumes
cloud vol remove Permanently delete persistent volume(s)
UNIKRAFT CLOUD SERVICE COMMANDS
cloud service create Create a service
cloud service get Retrieve the state of services
cloud service list List services
cloud service remove Delete services
UNIKRAFT CLOUD AUTOSCALE COMMANDS
cloud scale add Add an autoscale configuration policy
cloud scale get Get an autoscale configuration or policy
cloud scale init Initialize autoscale configuration for a service
cloud scale remove Delete an autoscale configuration policy
cloud scale reset Reset autoscale configuration of a service
UNIKRAFT CLOUD CERTIFICATE COMMANDS
cloud cert create Create a certificate
cloud cert get Retrieve the status of a certificate
cloud cert list List certificates
cloud cert remove Remove a certificate
UNIKRAFT CLOUD COMPOSE COMMANDS
cloud compose build Build a compose project
cloud compose create Create a deployment from a Compose project on Unikraft Cloud
cloud compose down Stop and remove the services in a Unikraft Cloud Compose project deployment
cloud compose log View logs of services in a Unikraft Cloud Compose project deployment
cloud compose ls List service deployments at a given path
cloud compose ps List the active services of Unikraft Cloud Compose project
cloud compose push Push the images services to Unikraft Cloud from a Compose project
cloud compose start Start services in a Unikraft Cloud Compose project deployment
cloud compose stop Stop services in a Unikraft Cloud Compose project deployment
cloud compose up Deploy services in a compose project to Unikraft Cloud
MISCELLANEOUS COMMANDS
login Provide authorization details for a remote service
version Show kraft version information
completion Generate the autocompletion script for the specified shell
help Help about any command
FLAGS
--buildkit-host string Path to the buildkit host
--config-dir string Path to KraftKit config directory
--containerd-addr string Address of containerd daemon socket
--editor string Set the text editor to open when prompt to edit a file
--events-pid-file string Events process ID used when running multiple unikernels
--git-protocol string Preferred Git protocol to use (default "https")
-h, --help help for kraft
--http-unix-sock string When making HTTP(S) connections, pipe requests via this shared socket
--log-level string Log level verbosity. Choice of: [panic, fatal, error, warn, info, debug, trace] (default "info")
--log-timestamps Enable log timestamps
--log-type string Log type. Choice of: [fancy, basic, json] (default "fancy")
--manifests-dir string Path to Unikraft manifest cache
--no-check-updates Do not check for updates
--no-color Disable color output
--no-emojis Do not use emojis in any console output
--no-parallel Do not run internal tasks in parallel
--no-prompt Do not prompt for user interaction
--no-warn-sudo Do not warn on running via sudo
--pager string System pager to pipe output to
--plugins-dir string Path to KraftKit plugin directory
--qemu string Path to QEMU executable
--runtime-dir string Directory for placing runtime files (e.g. pidfiles)
--sources-dir string Path to Unikraft component cache
--with-manifest strings Paths to package or component manifests
--with-mirror strings Paths to mirrors of Unikraft component artifacts

Next steps#

Once installed and running, learn more about:

Edit this page on GitHub

Connect with the community

Feel free to ask questions, report issues, and meet new people.

Join us on Discord!
®

Getting Started

What is a unikernel?Install CLI companion toolUnikraft InternalsRoadmap

© 2025  The Unikraft Authors. All rights reserved. Documentation distributed under CC BY-NC 4.0.