-
-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve atmos list stacks #979
base: main
Are you sure you want to change the base?
Conversation
📝 WalkthroughWalkthroughThe pull request introduces enhanced configuration and output capabilities for the Changes
Assessment against linked issues
Possibly related PRs
Suggested labels
Suggested reviewers
✨ Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (4)
pkg/list/list_stacks.go (1)
202-236
: Enhance table rendering and consider performance.
The TTY support is a nice touch. Also, in lines 226-228, you can apply the suggestedcopy(headerRow, headers)
improvement to simplify the loop.-for i, h := range headers { - headerRow[i] = h -} +copy(headerRow, headers)🧰 Tools
🪛 golangci-lint (1.62.2)
226-226: S1001: should use copy(to, from) instead of a loop
(gosimple)
cmd/list_stacks.go (1)
33-34
: Consider adding error handling for the flag parsing.While the code works, it silently ignores any flag parsing errors. Consider handling these errors to provide better user feedback.
- formatFlag, _ := cmd.Flags().GetString("format") - delimiterFlag, _ := cmd.Flags().GetString("delimiter") + formatFlag, err := cmd.Flags().GetString("format") + if err != nil { + u.PrintMessageInColor(fmt.Sprintf("Error getting format flag: %v", err), theme.Colors.Error) + return + } + delimiterFlag, err := cmd.Flags().GetString("delimiter") + if err != nil { + u.PrintMessageInColor(fmt.Sprintf("Error getting delimiter flag: %v", err), theme.Colors.Error) + return + }Also applies to: 49-49
pkg/list/list_components_test.go (1)
48-55
: Consider adding more test cases.While the current test case is good, consider adding tests for:
- Different format options (json, csv)
- Custom delimiters
- Invalid template expressions
atmos.yaml (1)
79-88
: LGTM! Well-structured column configuration.The list configuration effectively uses Go templates to format the output. The column names and values are clear and meaningful.
Consider adding documentation for template variables.
It would be helpful to add comments explaining the available template variables and their usage.
list: + # Available template variables: + # - .atmos_stack: The full stack name + # - .vars: Map of stack variables (e.g., tenant, environment) + # - .atmos_stack_file: The stack configuration file path columns:
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (8)
atmos.yaml
(1 hunks)cmd/list_stacks.go
(3 hunks)pkg/list/list_components_test.go
(1 hunks)pkg/list/list_stacks.go
(2 hunks)pkg/list/list_stacks_test.go
(2 hunks)pkg/schema/schema.go
(1 hunks)tests/snapshots/TestCLICommands_atmos_describe_config.stdout.golden
(2 hunks)tests/snapshots/TestCLICommands_atmos_describe_config_-f_yaml.stdout.golden
(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- tests/snapshots/TestCLICommands_atmos_describe_config.stdout.golden
🧰 Additional context used
🪛 golangci-lint (1.62.2)
pkg/list/list_stacks.go
226-226: S1001: should use copy(to, from) instead of a loop
(gosimple)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Summary
🔇 Additional comments (16)
pkg/list/list_stacks.go (8)
4-4
: Imports look good.
No problems found.Also applies to: 8-8, 10-10
18-30
: Validate user inputs and fallback logic.
This section elegantly checksformat
and falls back tolistConfig.Format
. Good clarity and error handling.
49-82
: Consolidation of stack information is thorough.
Mergingvars
and component-specific vars ensures comprehensive data instackInfo
. This is well-structured.
85-127
: All-stacks listing logic is consistent.
Inclusion of environment details and dynamic fallback to.yaml
files aligns with current approach.
129-140
: Graceful handling of empty stack lists.
The conditional check returns descriptive messages. Looks good.
141-150
: Default columns are adequately defined.
The fallback scenario is well-handled.
151-174
: Template parsing and execution.
Error messaging for template issues is concise and clear. Good job.
177-201
: JSON and CSV generation is well-structured.
Appending rows is intuitive, and error checks are clean.tests/snapshots/TestCLICommands_atmos_describe_config_-f_yaml.stdout.golden (2)
28-30
: New list configuration section.
This neatly decouples listing requirements understacks
. Good design.
38-44
: Path changes applied.
Strong consistency with the new user environment. No issues spotted.pkg/list/list_stacks_test.go (2)
28-37
: Validating empty format and columns in TestListStacks.
The coverage forFilterAndListStacks
with a basiclistConfig
is appropriate.
54-63
: Testing component-based listing with columns.
Looked for potential missing negative tests, but the coverage is still acceptable.cmd/list_stacks.go (2)
22-25
: LGTM! Clear and helpful examples.The examples effectively demonstrate the various output format options available to users.
61-62
: LGTM! Well-documented flags.The flags are properly registered with clear descriptions and appropriate default values.
pkg/schema/schema.go (1)
152-157
: LGTM! Well-structured schema definition.The
Stacks
struct is properly organized with clear field tags and documentation.pkg/list/list_components_test.go (1)
57-57
: LGTM! Proper test assertion chain.The test properly validates the output and error handling.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🧹 Nitpick comments (6)
pkg/list/list_stacks_test.go (2)
28-35
: Consider extracting duplicated test configuration.The list configuration is identical in both test functions. Let's refactor this to improve maintainability.
+// Common test configuration +var defaultTestConfig = schema.ListConfig{ + Format: "", + Columns: []schema.ListColumnConfig{ + {Name: "Stack", Value: "{{ .atmos_stack }}"}, + {Name: "File", Value: "{{ .atmos_stack_file }}"}, + }, +} func TestListStacks(t *testing.T) { // ... - listConfig := schema.ListConfig{ - Format: "", - Columns: []schema.ListColumnConfig{ - {Name: "Stack", Value: "{{ .atmos_stack }}"}, - {Name: "File", Value: "{{ .atmos_stack_file }}"}, - }, - } + listConfig := defaultTestConfig // ... } func TestListStacksWithComponent(t *testing.T) { // ... - listConfig := schema.ListConfig{ - Format: "", - Columns: []schema.ListColumnConfig{ - {Name: "Stack", Value: "{{ .atmos_stack }}"}, - {Name: "File", Value: "{{ .atmos_stack_file }}"}, - }, - } + listConfig := defaultTestConfig // ... }Also applies to: 54-61
111-113
: Strengthen error handling tests.The current error handling is basic. Consider adding specific error case assertions.
t.Run(test.name, func(t *testing.T) { result, err := FilterAndListStacks(context, stacksBasePath, test.config, stackType, component) - assert.NoError(t, err) - assert.Equal(t, test.expected, result) + if test.expectedError != "" { + assert.Error(t, err) + assert.Contains(t, err.Error(), test.expectedError) + } else { + assert.NoError(t, err) + assert.Equal(t, test.expected, result) + } })website/docs/cli/commands/list/list-stacks.mdx (2)
52-60
: Enhance documentation with more configuration examples.The current example is good but limited. Consider adding examples for:
- Multiple columns configuration
- Different output formats
- Complex template expressions
```yaml stacks: display: columns: - name: Stack value: '{{ .atmos_stack }}' - name: Tenant value: '{{ index .vars "tenant" }}' + - name: Environment + value: '{{ index .vars "environment" | default "N/A" }}' + - name: Components + value: '{{ range $key, $value := .components }}{{ $key }}, {{ end }}' + format: "table" # or "json", "csv"--- `89-95`: **Expand example outputs section.** Consider adding examples for different output formats and scenarios. ```diff $ atmos list stacks STACK TENANT dev acme staging acme prod acme-corp + +# JSON output example +$ atmos list stacks --format json +[ + { + "Stack": "dev", + "Tenant": "acme", + "Environment": "development" + } + ... +] + +# CSV output example +$ atmos list stacks --format csv +Stack,Tenant,Environment +dev,acme,development +...
pkg/list/list_stacks.go (2)
20-29
: Strengthen format validation.The format validation could be more robust by adding constants for supported formats.
+const ( + FormatTable = "table" + FormatJSON = "json" + FormatCSV = "csv" +) +var supportedFormats = map[string]bool{ + FormatTable: true, + FormatJSON: true, + FormatCSV: true, + "": true, // empty string defaults to table +} func ValidateFormat(format string) error { - // existing validation + if !supportedFormats[format] { + return fmt.Errorf("unsupported format %q, supported formats: table, json, csv", format) + } return nil }
223-227
: Optimize header copying.The current implementation uses a loop to copy headers. This can be simplified using the built-in copy function.
-headerRow := make([]string, len(headers)) -for i, h := range headers { - headerRow[i] = h -} +headerRow := make([]string, len(headers)) +copy(headerRow, headers)🧰 Tools
🪛 golangci-lint (1.62.2)
224-224: S1001: should use copy(to, from) instead of a loop
(gosimple)
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
pkg/list/list_stacks.go
(2 hunks)pkg/list/list_stacks_test.go
(3 hunks)website/docs/cli/commands/list/list-stacks.mdx
(1 hunks)
🧰 Additional context used
🪛 LanguageTool
website/docs/cli/commands/list/list-stacks.mdx
[uncategorized] ~68-~68: Possible missing comma found.
Context: ...tion provides a safer way to access map values as it won't cause a template error if t...
(AI_HYDRA_LEO_MISSING_COMMA)
🪛 golangci-lint (1.62.2)
pkg/list/list_stacks.go
224-224: S1001: should use copy(to, from) instead of a loop
(gosimple)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: Build (windows-latest, windows)
- GitHub Check: Summary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, minor nit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (4)
website/docs/cli/commands/list/list-stacks.mdx (4)
50-60
: Add documentation for supported output formats.The configuration example is clear, but we should also document the supported output formats (JSON, CSV, table) mentioned in the implementation.
Add a section about output formats like this:
The command output can be customized using template variables in your `atmos.yaml` configuration. Here's an example of how to configure the display format to add a custom field called "Tenant": +You can specify the output format using the `--output` flag: +```shell +atmos list stacks --output json # JSON format +atmos list stacks --output csv # CSV format +atmos list stacks --output table # Table format (default) +``` + ```yaml
56-58
: Document the.atmos_stack
template variable.The example uses
.atmos_stack
but doesn't explain what this variable represents.Add a brief explanation of the
.atmos_stack
variable and other available template variables.
73-77
: Clarify configuration precedence.The documentation should explain how custom configurations interact with default settings. Do custom columns replace or append to the defaults?
Add a note about configuration behavior:
You can customize the displayed columns using the `list.stacks.columns` configuration in `atmos.yaml`. + +:::note Configuration Behavior +Custom column configurations will completely replace the default columns. If you want to keep the default columns while adding new ones, you need to include them in your configuration. +:::
68-68
: Add comma for improved readability.Add a comma after "map values" to improve sentence flow.
-The `index` function provides a safer way to access map values as it won't cause a template error if the key doesn't exist. +The `index` function provides a safer way to access map values, as it won't cause a template error if the key doesn't exist.🧰 Tools
🪛 LanguageTool
[uncategorized] ~68-~68: Possible missing comma found.
Context: ...tion provides a safer way to access map values as it won't cause a template error if t...(AI_HYDRA_LEO_MISSING_COMMA)
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
website/docs/cli/commands/list/list-stacks.mdx
(1 hunks)
🧰 Additional context used
🪛 LanguageTool
website/docs/cli/commands/list/list-stacks.mdx
[uncategorized] ~68-~68: Possible missing comma found.
Context: ...tion provides a safer way to access map values as it won't cause a template error if t...
(AI_HYDRA_LEO_MISSING_COMMA)
⏰ Context from checks skipped due to timeout of 90000ms (6)
- GitHub Check: Build (macos-latest, macos)
- GitHub Check: Build (windows-latest, windows)
- GitHub Check: Build (ubuntu-latest, linux)
- GitHub Check: Analyze (go)
- GitHub Check: website-deploy-preview
- GitHub Check: Summary
💥 This pull request now has conflicts. Could you fix it @Cerebrovinny? 🙏 |
@osterman following test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🔭 Outside diff range comments (1)
pkg/list/list_workflows.go (1)
169-230
:🧩 Analysis chain
Add explicit TSV format handling in the switch statement.
The switch statement validates TSV format but doesn't handle it explicitly. Currently, TSV format falls through to the default case, which uses the same delimiter-based output as CSV. This could lead to inconsistent behavior and doesn't align with user expectations.
Add explicit TSV case handling:
switch format { case "json": // ... existing JSON handling ... case "csv": // ... existing CSV handling ... +case "tsv": + // Use tab as delimiter for TSV output + delimiter = "\t" + var output strings.Builder + output.WriteString(strings.Join(header, delimiter) + utils.GetLineEnding()) + for _, row := range rows { + output.WriteString(strings.Join(row, delimiter) + utils.GetLineEnding()) + } + return output.String(), nil default: // ... existing default handling ... }This change ensures that:
- TSV format always uses tab as delimiter
- Output is consistent with standard TSV format
- User-provided delimiter is ignored for TSV format
Let's verify the TSV format handling in other list commands:
🏁 Script executed:
#!/bin/bash # Search for other list commands that might need TSV format handling rg -l "FormatTSV" --type goLength of output: 78
Explicit TSV handling missing in both list_workflows.go and list_stacks.go
We confirmed that the grep search for "FormatTSV" returns two files—pkg/list/list_workflows.go and pkg/list/list_stacks.go—which indicates that both list commands currently lack explicit TSV handling. The existing switch in list_workflows.go (and likely a similar one in list_stacks.go) falls into the default case when encountering a "tsv" format, resulting in the use of the user-provided delimiter rather than a hardcoded tab. This leads to inconsistent behavior that doesn’t align with standard TSV expectations.
Action Items:
- pkg/list/list_workflows.go: Add an explicit "tsv" case that sets the delimiter to "\t" and returns TSV output.
- pkg/list/list_stacks.go: Ensure similar handling for TSV is added, making the implementation consistent across list commands.
🧹 Nitpick comments (2)
pkg/list/list_stacks.go (2)
32-89
: Consider optimizing variable extraction.The variable extraction logic could be simplified to reduce nesting and improve readability.
- // Extract variables from components - if components, ok := v2["components"].(map[string]any); ok { - // Helper function to extract vars from component section - extractComponentVars := func(componentSection map[string]any) { - for _, comp := range componentSection { - if compMap, ok := comp.(map[string]any); ok { - if vars, ok := compMap["vars"].(map[string]any); ok { - for k, v := range vars { - if _, exists := stackInfo["vars"].(map[string]any)[k]; !exists && v != nil { - stackInfo["vars"].(map[string]any)[k] = v - } - } - } - } - } - } + // Extract variables from components + extractComponentVars := func(vars map[string]any) { + for k, v := range vars { + if _, exists := stackInfo["vars"].(map[string]any)[k]; !exists && v != nil { + stackInfo["vars"].(map[string]any)[k] = v + } + } + } + + if components, ok := v2["components"].(map[string]any); ok { + for _, section := range components { + if sectionMap, ok := section.(map[string]any); ok { + for _, comp := range sectionMap { + if compMap, ok := comp.(map[string]any); ok { + if vars, ok := compMap["vars"].(map[string]any); ok { + extractComponentVars(vars) + } + } + } + } + } + }
328-345
: Consider adding color configuration options.The table styling is currently hardcoded. Consider making the colors configurable through the
listConfig
.+type TableStyle struct { + BorderColor string + HeaderStyle lipgloss.Style + RowStyle lipgloss.Style +} +func getTableStyle(config schema.ListConfig) TableStyle { + return TableStyle{ + BorderColor: config.Style.BorderColor, + HeaderStyle: lipgloss.NewStyle().PaddingLeft(1).PaddingRight(1).Inherit(config.Style.HeaderStyle), + RowStyle: lipgloss.NewStyle().PaddingLeft(1).PaddingRight(1).Inherit(config.Style.RowStyle), + } +} // In the table creation code: -BorderStyle(lipgloss.NewStyle().Foreground(lipgloss.Color(theme.ColorBorder))). +BorderStyle(lipgloss.NewStyle().Foreground(lipgloss.Color(getTableStyle(listConfig).BorderColor))).
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
pkg/list/list_stacks.go
(1 hunks)pkg/list/list_workflows.go
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: Build (windows-latest, windows)
- GitHub Check: Summary
🔇 Additional comments (6)
pkg/list/list_workflows.go (2)
26-26
: LGTM! Added TSV format constant.The constant
FormatTSV
is correctly defined and follows the existing naming convention.
34-34
: LGTM! Updated format validation.The
ValidateFormat
function correctly includes TSV in the list of valid formats.pkg/list/list_stacks.go (4)
19-29
: LGTM! Function signature and format validation look solid.The new parameters and format validation provide good flexibility while maintaining safety checks.
201-224
: Excellent pre-parsing of templates for performance optimization!The implementation of template pre-parsing is a great performance improvement, as it avoids parsing templates for each row.
297-307
: Consider adding unit tests for value escaping.The
escapeValue
function handles critical data formatting but lacks test coverage.Would you like me to generate comprehensive unit tests for the value escaping logic?
283-292
: 🏁 Script executed:#!/bin/bash # Description: Check for potential delimiter conflicts in stack names and variables # Search for special characters in stack names or variables that might conflict with delimiters rg -l '[,\t|;]' --type yamlLength of output: 4298
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
pkg/list/list_stacks_test.go (1)
75-226
: Great test coverage! Consider adding these test cases.The test function is well-structured with comprehensive coverage of formats and configurations. To make it even better, consider adding:
- Error cases (invalid template syntax, missing required fields)
- JSON format test case
- Empty stacks map test case
Example additional test cases:
tests := []struct { name string config schema.ListConfig format string delimiter string expected string }{ // ... existing test cases ... + { + name: "json format", + config: schema.ListConfig{}, + format: "json", + delimiter: "", + expected: `[{"Stack":"dev","Stage":"dev","File":"examples/quick-start-simple/stacks/deploy/dev.yaml"}]`, + }, + { + name: "invalid template", + config: schema.ListConfig{ + Columns: []schema.ListColumnConfig{ + {Name: "Invalid", Value: "{{ invalid }}"}, + }, + }, + format: "", + delimiter: "\t", + expectedError: "template: :1: function \"invalid\" not defined", + }, + { + name: "empty stacks map", + config: schema.ListConfig{}, + format: "", + delimiter: "\t", + emptyStacksMap: true, + expected: "Stack\tStage\tFile\n-----\t-----\t----\n", + }, }pkg/list/list_workflows_test.go (1)
146-155
: Add test case for TSV output format.While the TSV format is validated in
TestValidateFormat
, consider adding a test case inTestListWorkflows
to verify the TSV output format, similar to the existing JSON and CSV format test cases.tests := []struct { name string fileFlag string config schema.ListConfig format string delimiter string wantErr bool contains []string notContains []string validate func(t *testing.T, output string) }{ + { + name: "tsv format with multiple workflows", + fileFlag: "", + config: schema.ListConfig{}, + format: "tsv", + delimiter: "\t", + wantErr: false, + validate: func(t *testing.T, output string) { + lines := strings.Split(strings.TrimSpace(output), utils.GetLineEnding()) + assert.GreaterOrEqual(t, len(lines), 3) // Header + at least 2 workflows + assert.Equal(t, "File\tWorkflow\tDescription", lines[0]) + + var foundNetworking bool + var foundValidation bool + for _, line := range lines[1:] { + fields := strings.Split(line, "\t") + if len(fields) == 3 { + if fields[0] == "Networking" && fields[1] == "plan-all-vpc" { + foundNetworking = true + assert.Equal(t, "Run terraform plan on all vpc components", fields[2]) + } + if fields[0] == "Validation" && fields[1] == "validate-all" { + foundValidation = true + assert.Equal(t, "Validate all components", fields[2]) + } + } + } + assert.True(t, foundNetworking, "Networking workflow not found") + assert.True(t, foundValidation, "Validation workflow not found") + }, + },
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
pkg/list/list_stacks_test.go
(4 hunks)pkg/list/list_workflows_test.go
(7 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Summary
🔇 Additional comments (3)
pkg/list/list_stacks_test.go (1)
29-37
: Enhance validation in existing test functions.The list configuration is minimal and identical in both tests. Consider:
- Validating the actual column values in the output
- Testing different format options
- Testing error cases
Example enhancement for
TestListStacks
:output, err := FilterAndListStacks(stacksMap, "", listConfig, "", "\t") assert.Nil(t, err) -dependentsYaml, err := u.ConvertToYAML(output) -assert.NotEmpty(t, dependentsYaml) +// Verify column values +assert.Contains(t, output, "Stack") +assert.Contains(t, output, "File") + +// Test different formats +output, err = FilterAndListStacks(stacksMap, "", listConfig, "csv", ",") +assert.Nil(t, err) +assert.Contains(t, output, "Stack,File")Also applies to: 55-63
pkg/list/list_workflows_test.go (2)
44-48
: LGTM! TSV format support added.The test case for TSV format validation is well-structured and consistent with other format test cases.
76-76
: LGTM! File permissions updated to modern octal format.The file permission values have been consistently updated from
0644
to0o644
format across all file operations, following modern Go conventions.However, let's verify that these changes are consistent across the codebase.
Also applies to: 89-89, 100-100, 118-118, 136-136, 310-310
✅ Verification successful
🏁 Script executed:
#!/bin/bash # Description: Check for any remaining old-style octal permissions in Go files # Search for old-style octal permissions (0644, 0755, etc.) rg '(?<!\bo)\b0[0-7]{3}\b' -t go # Search for new-style octal permissions (0o644, 0o755, etc.) for comparison rg '\b0o[0-7]{3}\b' -t goLength of output: 3548
Consistency of Octal Formatting Across the Codebase Verified
All file operations now use the modern octal format (e.g., 0o644, 0o755) as evidenced by the grep output—no instances of the old-style digits were detected in our search across Go files.
- Verified in files such as pkg/list/list_workflows_test.go, tests/cli_test.go, and several internal/exec files.
|
||
## Display Format | ||
|
||
The command output can be customized using template variables in your `atmos.yaml` configuration. Here's an example of how to configure the display format to adds custom fields called "Stack", "Tenant", "Environment", and "File: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we describe anywhere what happens when using redirection or pipes, or that it automatically degrades when there is not tty attached
what
why
Evidence:
![CleanShot 2025-01-28 at 20 15 39](https://private-user-images.githubusercontent.com/52631834/407504988-890a812a-ffa8-4aac-8f0d-7aa7651fe1fa.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxODgyNjUsIm5iZiI6MTczOTE4Nzk2NSwicGF0aCI6Ii81MjYzMTgzNC80MDc1MDQ5ODgtODkwYTgxMmEtZmZhOC00YWFjLThmMGQtN2FhNzY1MWZlMWZhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEwVDExNDYwNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTljMTQzYTU4MjJjN2NkYmEyYjU4NzRlYTFmYjgwNDk0NDNhNzVjNzljYzAyMWMzNDdkNjZiNTg4MDJiZTRkYTImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.9Ybs0tWCX3s9OQWtbhR7ymTHTt-isy5IQFFHI2vaagw)
references
Summary by CodeRabbit
Summary by CodeRabbit
New Features
--format
to specify output format (table, JSON, CSV, TSV).--delimiter
to set column separator.list
section understacks
andworkflows
.Improvements