Complete reference for the stackkit command-line interface.
Every subcommand accepts these flags.
| Flag | Short | Default | Description |
|---|---|---|---|
--verbose | -v | false | Enable verbose output |
--quiet | -q | false | Suppress non-essential output |
--chdir | -C | . | Change to directory before running |
--spec | -s | stack-spec.yaml | Path to stack specification file |
--context | auto-detect | Node context override (local, cloud, pi) |
stackkit init [kit]Create a new stack-spec.yaml. Without arguments, an interactive wizard guides you through StackKit selection, variant, domain, and email configuration.
stackkit init # interactive wizard
stackkit init base-kit # skip kit selection
stackkit init base-kit --variant minimal # specify variant
stackkit init base-kit --non-interactive # fail if input required
stackkit init ./path/to/custom-kit # use local kit path
| Flag | Default | Description |
|---|---|---|
--variant | auto | Service variant |
--mode | simple | Deployment mode (simple, advanced) |
-o, --output | deploy | Output directory for generated files |
-f, --force | false | Overwrite existing files |
--non-interactive | false | Fail instead of prompting for input |
stackkit preparePrepare a system for deployment. Checks and installs Docker and OpenTofu if missing, validates the spec, and reports system resources.
stackkit prepare # local system
stackkit prepare --host 192.168.1.100 --user root # remote via SSH
stackkit prepare --dry-run # preview only
| Flag | Default | Description |
|---|---|---|
--host | localhost | Target host IP or hostname |
--user | SSH username (remote only) | |
--key | SSH private key path (remote only) | |
--dry-run | false | Show what would be done without changes |
--skip-docker | false | Skip Docker check/install |
--skip-tofu | false | Skip OpenTofu check/install |
--auto-fix | true | Auto-correct fixable issues |
stackkit generateGenerate OpenTofu files from the stack spec and StackKit templates. Output placed in deploy/ by default. Generated files are artifacts — never edit them directly.
stackkit generate # generate into ./deploy
stackkit generate -o ./out # custom output directory
stackkit generate --force # overwrite existing output
| Flag | Default | Description |
|---|---|---|
-o, --output | deploy | Output directory |
-f, --force | false | Overwrite existing output |
stackkit planPreview what apply would change without modifying anything.
stackkit plan # preview changes
stackkit plan -o plan.tfplan # save plan to file
stackkit plan --destroy # preview a destroy
| Flag | Default | Description |
|---|---|---|
-o, --out | Save plan to file | |
--destroy | false | Create a destroy plan |
stackkit apply [plan-file]Deploy the infrastructure. If the deploy directory is missing, generate runs automatically first.
stackkit apply # deploy with confirmation
stackkit apply --auto-approve # deploy without confirmation
stackkit apply plan.tfplan # apply a saved plan
| Flag | Default | Description |
|---|---|---|
--auto-approve | false | Skip the interactive confirmation |
stackkit destroyTear down all infrastructure managed by the deployment.
stackkit destroy # with confirmation
stackkit destroy --auto-approve # no confirmation
stackkit destroy --auto-approve --force # ignore errors
| Flag | Default | Description |
|---|---|---|
--auto-approve | false | Skip confirmation |
--force | false | Continue even if errors occur |
stackkit statusShow current deployment status: services, health, and container IDs.
stackkit status # table output
stackkit status --json # JSON output
| Flag | Default | Description |
|---|---|---|
--json | false | Output as JSON |
stackkit validate [file]Validate the stack spec against CUE schemas and check generated OpenTofu files.
stackkit validate # validate current spec
stackkit validate my-spec.yaml # validate a specific file
stackkit validate --all # also validate all .cue files
| Flag | Default | Description |
|---|---|---|
--all | false | Also validate all .cue files under working directory |
stackkit addonManage composable add-ons: monitoring, backup, VPN, media server, and more.
stackkit addon list # list available add-ons
stackkit addon add monitoring # add an add-on
stackkit addon remove monitoring # remove an add-on
After adding or removing add-ons, run stackkit generate --force to regenerate deployment files.
stackkit versionPrint version, git commit, build date, Go version, and OS/architecture.
$ stackkit version
stackkit version v0.3.0
Git commit: a1b2c3d
Build date: 2026-03-01T12:00:00Z
Go version: go1.24
OS/Arch: linux/amd64
stackkit completion <shell>Generate shell completion scripts for tab-completion.
# Bash
stackkit completion bash > /etc/bash_completion.d/stackkit
# Zsh
stackkit completion zsh > "${fpath[1]}/_stackkit"
# Fish
stackkit completion fish > ~/.config/fish/completions/stackkit.fish
curl -sSL install.stackkit.cc | sh
mkdir my-homelab && cd my-homelab
stackkit init base-kit
stackkit apply --auto-approve
stackkit status
# edit stack-spec.yaml
stackkit generate --force
stackkit plan
stackkit apply
stackkit addon add monitoring
stackkit generate --force
stackkit apply
| Path | Created by | Purpose |
|---|---|---|
stack-spec.yaml | init | Deployment specification |
deploy/ | generate | Generated OpenTofu files (never edit) |
deploy/main.tf | generate | OpenTofu resource definitions |
.stackkit/state.yaml | apply | Deployment state tracking |