CLI Introduction
The Kurtosis CLI is a Go CLI wrapped around the Kurtosis Go SDK. This section will go through the most common Kurtosis CLI commands and some useful tips on getting started. If you have not already done so, the CLI can be installed by following the instructions here.
Kurtosis supports command-line completion; we recommend installing it for the best experience.
Configuration file path
To locate where the Kurtosis configuration file is on your machine, simply use:
kurtosis config path
to print out the file path of the kurtosis-config.yml
file.
Get the CLI version
The version of the CLI and the currently-running engine can be printed with the following:
kurtosis version
Global Flags
The Kurtosis CLI supports two global flags - help
and cli-log-level
. These flags can be used with any Kurtosis CLI command.
-h or --help
This flag prints the help text for all commands and subcommands. You can use this at any time to see information on the command you're trying to run. For example:
kurtosis service -h
Example Output of the above command
cli-log-level
This flag sets the level of details that the Kurtosis CLI will print logs with - by default it only logs info
level logs to the CLI. The following other log levels are supported by Kurtosis -
panic|fatal|error|warning|info|debug|trace
. For example, logs with error level can be printed using the command below:-
kurtosis run --cli-level-log debug github.com/package-author/package-repo
Example Output of the above command
Users can use the debug
--cli-log-level
flag, , as shown above, to display the entire stack trace to the CLI. By default the entire stack trace is saved to the kurtosis-cli.log
file.
The sample error stack-trace that can be seen on the cli after debug
level is shown below:
DEBU[2023-04-03T12:58:03-04:00] Cluster setting filepath: ''
DEBU[2023-04-03T12:58:03-04:00] Kurtosis config YAML filepath: ''
DEBU[2023-04-03T12:58:03-04:00] Loaded Kurtosis Config &{overrides:0x1400000e510 shouldSendMetrics:true clusters:map[docker:0x14000097680 minikube:0x140000976b0]}
DEBU[2023-04-03T12:58:03-04:00] Instantiating a context aware backend with no remote backend config ends up returninga regular local Docker backend.
Error: An error occurred validating arg ''
--- at /root/project/cli/cli/command_framework/lowlevel/lowlevel_kurtosis_command.go:290 (LowlevelKurtosisCommand.MustGetCobraCommand.func2) ---
Caused by: Error reading filepath_or_dirpath ''
--- at /root/project/cli/cli/command_framework/highlevel/file_system_path_arg/file_system_path_arg.go:109 (getValidationFunc.func1) ---
Caused by: stat ../../../per/other/submodul/: no such file or directory