Global flags
All tfctl commands support the following global flags. These flags control CLI behavior, output formatting, and execution mode across all commands.
Available flags
--help,-h: Display help information for the command.- Optional.
- Data type: boolean
- Default value:
false
--version,-v: Display tfctl version information.- Optional.
- Data type: boolean
- Default value:
false
--debug: Enable debug output. Shows detailed logging information for troubleshooting.- Optional.
- Data type: boolean
- Default value:
false
--dry-run: Create a preview of proposed changes without making them. Shows what would happen without executing the operation.- Optional.
- Data type: boolean
- Default value:
false
--json: Output results in JSON format. Useful for programmatic processing of command output.- Optional.
- Data type: boolean
- Default value:
false
--jq=<EXPRESSION>: Apply a jq filter expression to JSON output. This flag automatically applies--json.- Optional.
- Data type: string
- Default value: None
--markdown: Output results in Markdown format.- Optional.
- Data type: boolean
- Default value:
false
--no-color: Disable color output. Useful for CI/CD environments or when redirecting output to files.- Optional.
- Data type: boolean
- Default value:
false
--no-redact: Do not mask secret values in output. Use with caution as this exposes sensitive information.- Optional.
- Data type: boolean
- Default value:
false
--profile=<NAME>: Specify the profile to use. Overrides the active profile for this command invocation.- Optional.
- Data type: string
- Default value: Active profile
--quiet: Renders only essential content. Suppresses progress messages and non-critical output.- Optional.
- Data type: boolean
- Default value:
false
Examples
The following examples demonstrate common use cases for the global flags.
Enable debug output
The following example runs a command with debug logging enabled:
$ tfctl get workspaces --debug
Preview changes without executing
The following example shows what would happen without making actual changes:
$ tfctl create workspace --attribute name=test-workspace --dry-run
Format output as JSON
The following example outputs results in JSON format:
$ tfctl get workspaces --json
Filter JSON output with jq
The following example uses jq to extract specific fields from JSON output:
$ tfctl get workspaces --jq '.data[].attributes.name'
Use a specific profile
The following example runs a command using a non-default profile:
$ tfctl get workspaces --profile production