Global CLI Flags in StackGen
StackGen CLI provides global flags that can be used with various commands to modify their behavior, control output formats, and enable interactive execution. These flags help tailor the command-line experience to different use cases, whether in automation, debugging, or interactive mode.
Available Flags
Flag | Description |
---|---|
-i, --interactive | Runs the CLI in interactive mode, prompting for required inputs. |
--log int | Sets the logging verbosity level: 2: DEBUG , 3: INFO (default), 4: WARN , 5: ERROR . |
-o, --output string | Sets the output format: json : JSON-formatted output, human (default): Human-readable output, raw : Raw, unformatted output. |
These flags can be combined with StackGen CLI commands to fine-tune the command execution experience.
Examples
Run a Command in Interactive Mode
stackgen provision --interactive
This command will run the provision
command in interactive mode, prompting you for required inputs.
Set Log Level to Debug
stackgen generate --log 2
This command will execute the generate
command with a log level set to DEBUG
, which provides detailed debugging information.
Change Output Format to JSON
stackgen resource show --output json
This command will return the output in JSON format, making it easier to parse programmatically.