Skip to content

CLI Reference | Global flags

These flags are accepted by every kapitan command (they sit before the subcommand, e.g. kapitan --profile compile). Each command also has its own flags — see the per-command pages — and any flag can be persisted in the .kapitan dotfile.

The table below is generated from Kapitan's argument parser at docs-build time, so it always matches the installed version.

Flag Default Choices Description
--mp-method spawn spawn, fork, forkserver set multiprocessing start method
--profile False enable CPU profiling via pyinstrument for the parent process
--profile-workers False also CPU-profile multiprocessing workers; one report per worker PID. Requires --profile.
--profile-serial False run target compilation serially in the parent process (no multiprocessing.Pool). Produces a single unified pyinstrument report with full call-stack depth. Slower wall-clock but the only way to see all stacks (including kadet/jinja/jsonnet internals) in one flame graph. Implies/pairs well with --profile.
--profile-format html html, text, json, speedscope pyinstrument output format (default: html)
--profile-interval 0.001 pyinstrument sampling interval in seconds (default: 0.001)
--profile-output-dir kapitan-profiles directory for profile reports (default: ./kapitan-profiles)
--memory-profile False enable memory profiling via tracemalloc; writes a top-N text report
--memory-profile-top 30 number of top allocators to include in the memory report (default: 30)
Share this page