Note
This is the new Unikraft CLI which will eventually supersede kraft cloud. It is still in early development and subject to change before the v1.0.0 release. Feedback appreciated!
The official command-line interface for Unikraft Cloud — deploy and manage unikernels globally in milliseconds.
- Deploy Instantly — Run unikernel images as serverless instances with
unikraft run - Global Infrastructure — Deploy across multiple metros with automatic multi-region support
- Resource Management — Full CRUD operations for instances, volumes, services, certificates, and images
- Scale-to-Zero — Built-in support for scale-to-zero policies to optimize costs
- Multiple Output Formats — Machine-readable JSON or human-friendly text output
- Profile Management — Switch between multiple accounts and configurations
- Shell Completions — Tab completion for Bash, Zsh, Fish, and PowerShell
Debian/Ubuntu
# Update and install dependencies
sudo apt update
sudo apt install ca-certificates curl
# Download and add the GPG key
sudo install -d -m 0755 /etc/apt/keyrings
sudo curl -fsSL \
-o /etc/apt/keyrings/unikraft-cli.gpg \
https://pkg.unikraft.com/debian/cli-apt/keys/cli-apt.gpg
sudo tee /etc/apt/sources.list.d/unikraft-cli.sources <<EOF
Types: deb
URIs: https://pkg.unikraft.com/debian/cli-apt/
Suites: $(. /etc/os-release && echo "$VERSION_CODENAME")
Components: stable
Signed-By: /etc/apt/keyrings/unikraft-cli.gpg
EOF
# Update and install the CLI
sudo apt update
sudo apt install unikraft-cliFedora/RHEL/Rocky/Alma
# Add the Unikraft CLI repository
sudo tee /etc/yum.repos.d/unikraft-cli-rpm.repo <<EOF
[unikraft]
name=unikraft
baseurl=https://pkg.unikraft.com/rpm/cli-rpm/
gpgcheck=0
enabled=1
EOF
# Install the CLI at the specific pre-release version
yum install unikraft-cliFrom Source
# Clone the repository
git clone https://github.com/unikraft/cli.git
cd cli
# Build the CLI
make cli
# The binary is available at dist/unikraft
./dist/unikraft --version1. Login to Unikraft Cloud
unikraft loginThis opens your browser for authentication. Alternatively, provide a token file:
unikraft login --token /path/to/tokenOr, if you need to directly specify a metro endpoint, you can manually create a profile:
# Linux: ~/.config/unikraft/config.yaml
# MacOS: ~/Library/Application\ Support/unikraft/config.yaml
profile: default
profiles:
default:
type: cloud
organization: <org-name>
token: <api-token>
metros:
- name: <metro-name> # e.g. fra
endpoint: <metro-endpoint> # e.g. https://api.fra.unikraft.cloud
country: <metro-country> # e.g. de
insecure: false # skip tls verification (avoid for production use)unikraft run --metro=fra -p 443:8080/http+tls nginx:latestThis deploys an NGINX instance in Frankfurt with HTTPS enabled.
unikraft instances listunikraft instances logs my-instance| Command | Description |
|---|---|
login |
Login to Unikraft Cloud |
logout |
Logout from Unikraft Cloud |
profile |
Manage profiles (list, get, use) |
run |
Run an image as an instance |
instances |
Manage instances (list, get, create, edit, delete, logs, start, stop, restart) |
volumes |
Manage persistent volumes (list, get, create, edit, delete, clone) |
services |
Manage service groups (list, get, create, edit, delete) |
certificates |
Manage TLS certificates (list, get, create, delete) |
images |
Manage images (list, get, copy) |
metros |
List available metro locations |
completion |
Generate shell completion scripts |
Deploy with environment variables:
unikraft run --metro=sfo -e KEY=VALUE -e DEBUG=true my-app:latestDeploy with an attached volume:
unikraft run --metro=was -v my-volume:/data my-app:latestDeploy with custom resources:
unikraft run --metro=dal -m 512MiB --vcpus 2 my-app:latestDeploy with scale-to-zero:
unikraft run --metro=sin --scale-to-zero policy=on,cooldown-time=300 my-app:latestCreate an instance with multiple service ports:
unikraft run --metro=fra -p 443:8080/http+tls -p 80:443/http+redirect nginx:latestEdit an existing instance:
unikraft instances edit my-instance --set image=nginx:1.27Clone a volume:
unikraft volumes clone my-volume --set name=my-volume-backupBuild and publish an image from a Kraftfile:
unikraft build . --output my-org/my-app:latestThe CLI stores configuration in ~/.config/unikraft/config.yaml (or the path specified by UNIKRAFT_CONFIG).
| Variable | Description |
|---|---|
UNIKRAFT_CONFIG |
Path to the configuration file |
UNIKRAFT_PROFILE |
Override the current profile |
UNIKRAFT_LOG_LEVEL |
Set log level (trace, debug, info, warn, error, fatal) |
UNIKRAFT_LOG_TYPE |
Set output format (text, json) |
UNIKRAFT_TELEMETRY |
Enable/disable anonymous telemetry (true, false) |
Manage multiple accounts or configurations with profiles:
# List profiles
unikraft profile list
# Switch profile
unikraft profile use staging
# Use a profile for a single command
unikraft --profile=staging instances listThe CLI supports multiple output formats via the -o flag:
# Default table output
unikraft instances list
# JSON output
unikraft instances list -o json
# Show specific fields
unikraft instances get my-instance --fields name,state,image
# Include verbose/detailed fields
unikraft instances get my-instance -v- Go 1.25+
- Git
- GNU Make which transparently wraps Task
make cliThe binary is placed in dist/unikraft.
# Run unit tests
make test
# Run linter
make lint
# Run integration tests (requires setup)
make integration
# Update integration test golden files
make integration-update# Generate all docs
make docs
# Generate man pages only
make docs:man
# Generate markdown docs only
make docs:mdxOutput is placed in dist/docs/.
The CLI follows a resource-oriented architecture:
- Commands (
internal/cmd/) — Kong-based command definitions with subcommand routing - Resources (
internal/resource/) — Unified interface for API objects with field introspection - Multi-Metro (
internal/multimetro/) — Client abstraction for global infrastructure operations - Configuration (
internal/config/) — Profile and credential management - Telemetry (
internal/telemetry/) — Anonymous usage analytics (opt-out via--no-telemetry)
- Kong — CLI parsing and command wiring
- Bubble Tea — Terminal UI components
- Unikraft Cloud SDK — API client library
Generate completion scripts for your shell:
# Bash
unikraft completion bash > /etc/bash_completion.d/unikraft
# Zsh
unikraft completion zsh > "${fpath[1]}/_unikraft"
# Fish
unikraft completion fish > ~/.config/fish/completions/unikraft.fish
# PowerShell
unikraft completion powershell > unikraft.ps1The CLI collects anonymous usage analytics to improve the product. No personally identifiable information is collected. To opt out:
# Disable for a single command
unikraft --no-telemetry instances list
# Disable permanently
export UNIKRAFT_TELEMETRY=false
# Or
export DO_NOT_TRACK=1BSD-3-Clause. See LICENSE.md for details. Copyright (c) 2026, Unikraft GmbH and The Unikraft CLI Authors.