-
-
Notifications
You must be signed in to change notification settings - Fork 135
Update atmos version list command. Add docs
#1672
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
Conversation
|
Warning Rate limit exceeded@aknysh has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 0 minutes and 48 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughAdds early normalization and validation of the output format for the version list/show commands, switches supported formats to Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant CLI as "atmos version list/show"
participant Validator as "Format Validator"
participant Parser as "Date Parser"
participant Fetcher as "Version Fetcher"
participant Formatter as "Output Formatter"
User->>CLI: run command with `--format`
CLI->>Validator: normalize & validate format
alt invalid format
Validator-->>CLI: unsupported format error
CLI-->>User: print error & exit
else valid format
Validator-->>CLI: ok
CLI->>Parser: parse date flags
Parser-->>CLI: parsed dates
CLI->>Fetcher: fetch versions
Fetcher-->>CLI: return versions
CLI->>Formatter: format output (table/json/yaml)
Formatter-->>User: render output
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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 (1)
cmd/version/list.go (1)
183-191: Efficient reuse of normalized format.Switching on
normalizedFormatavoids redundantstrings.ToLower()calls. The default case (lines 190-191) is now unreachable since validation happens upfront, but keeping it as defensive code is fine.If you prefer to remove dead code, you could drop the default case entirely:
switch normalizedFormat { case "text": return formatReleaseListText(releases) case "json": return formatReleaseListJSON(releases) case "yaml": return formatReleaseListYAML(releases) - default: - return fmt.Errorf("%w: %s (supported: text, json, yaml)", errUtils.ErrUnsupportedOutputFormat, listFormat) }But keeping it doesn't hurt.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
cmd/version/list.go(2 hunks)
🧰 Additional context used
📓 Path-based instructions (6)
cmd/**/*.go
📄 CodeRabbit inference engine (.cursor/rules/atmos-rules.mdc)
cmd/**/*.go: Use Cobra's recommended command structure with a root command and subcommands
Implement each CLI command in a separate file under cmd/
Use Viper for managing configuration, environment variables, and flags in the CLI
Keep separation of concerns between CLI interface (cmd) and business logic
Use kebab-case for command-line flags
Provide comprehensive help text for all commands and flags
Include examples in Cobra command help
Use Viper for configuration management; support files, env vars, and flags with precedence flags > env > config > defaults
Follow single responsibility; separate command interface from business logic
Provide meaningful user feedback and include progress indicators for long-running operations
Provide clear error messages to users and troubleshooting hints where appropriate
cmd/**/*.go: Follow Cobra command pattern: one command per file; load examples via //go:embed and render via utils.PrintfMarkdown in RunE.
Telemetry for new commands is automatic via RootCmd.ExecuteC(); for non-standard paths use telemetry.CaptureCmd or telemetry.CaptureCmdString.
Files:
cmd/version/list.go
**/*.go
📄 CodeRabbit inference engine (.cursor/rules/atmos-rules.mdc)
**/*.go: All code must pass golangci-lint checks
Follow Go error handling idioms and use meaningful error messages
Wrap errors with context using fmt.Errorf("context: %w", err)
Consider custom error types for domain-specific errors
Follow standard Go coding style; run gofmt and goimports
Use snake_case for environment variables
Document complex logic with inline comments
**/*.go: All comments must end with periods; enforced by golangci-lint godot across all Go comments.
Organize imports into three groups (stdlib, third-party, Atmos) separated by blank lines and sorted alphabetically within each group; keep existing aliases.
All errors must be wrapped using static errors defined in errors/errors.go; prefer errors.Join for multiple, fmt.Errorf with %w for context, and errors.Is for checks; never rely on string comparisons.
Prefer cross-platform implementations: use SDKs over external binaries; use filepath/os facilities; gate OS-specific logic with runtime.GOOS or build tags.
Files:
cmd/version/list.go
**/!(*_test).go
📄 CodeRabbit inference engine (.cursor/rules/atmos-rules.mdc)
Document all exported functions, types, and methods with Go doc comments
Files:
cmd/version/list.go
{cmd,internal,pkg}/**/*.go
📄 CodeRabbit inference engine (CLAUDE.md)
{cmd,internal,pkg}/**/*.go: Adddefer perf.Track()to all public functions and critical private ones, include a blank line after it, and use package-qualified names (e.g., "exec.ProcessComponent"). Use atmosConfig if available, else nil.
Always bind environment variables with viper.BindEnv; every var must have an ATMOS_ alternative and prefer ATMOS_ over external names.
Distinguish structured logging from UI output: UI prompts/errors/status to stderr; data/results to stdout; logging for system/debug only; no UI via logging.
Most text UI must go to stderr (via utils.PrintfMessageToTUI or fmt.Fprintf(os.Stderr,...)); only data/results to stdout.
Files:
cmd/version/list.go
{pkg,internal,cmd}/**/*.go
📄 CodeRabbit inference engine (CLAUDE.md)
Always use mockgen for interface mocks; never write manual mocks with many stub methods.
Files:
cmd/version/list.go
**/*
📄 CodeRabbit inference engine (CLAUDE.md)
Target minimum 80% coverage on new/changed lines; exclude mock files from coverage: **/mock_.go, mock_.go, **/mock/*.go.
Files:
cmd/version/list.go
🧬 Code graph analysis (1)
cmd/version/list.go (1)
errors/errors.go (1)
ErrUnsupportedOutputFormat(49-49)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
- GitHub Check: Build (windows-latest, windows)
- GitHub Check: Lint (golangci)
- GitHub Check: Analyze (javascript-typescript)
- GitHub Check: Analyze (go)
- GitHub Check: Analyze (go)
- GitHub Check: Lint (golangci)
- GitHub Check: Summary
🔇 Additional comments (1)
cmd/version/list.go (1)
152-156: Solid fail-fast validation!This achieves exactly what the PR set out to do—validating format before hitting GitHub's API. The early return prevents unnecessary network calls and gives users immediate feedback. Nice alignment with the limit/offset validation pattern above.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1672 +/- ##
==========================================
- Coverage 66.30% 66.30% -0.01%
==========================================
Files 350 350
Lines 39670 39674 +4
==========================================
Hits 26305 26305
- Misses 11360 11364 +4
Partials 2005 2005
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
- Update format validation in both list and show commands - Change default format value from 'text' to 'table' - Update all tests to expect 'table' format - Update flag descriptions to reflect new format name This change improves clarity as the output is specifically a table format, not generic text. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
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
♻️ Duplicate comments (1)
cmd/version/list.go (1)
183-192: Prior feedback to use “table” instead of “text” is addressed. Nice.This resolves the earlier review thread about naming.
Also applies to: 201-201
🧹 Nitpick comments (6)
cmd/version/show.go (2)
157-170: Switch to “table” looks good; add fail-fast validation before GitHub calls.Behavior matches list.go. To avoid unnecessary API/spinner work on invalid formats, validate/normalize up-front and switch on the normalized value.
Suggested change:
RunE: func(cmd *cobra.Command, args []string) error { defer perf.Track(atmosConfigPtr, "version.show.RunE")() // Default to latest if no version specified. versionArg := "latest" if len(args) > 0 { versionArg = args[0] } + // Validate/normalize format early (fail-fast). + normalizedFormat := strings.ToLower(showFormat) + if normalizedFormat != "table" && normalizedFormat != "json" && normalizedFormat != "yaml" { + return fmt.Errorf("%w: %s (supported: table, json, yaml)", errUtils.ErrUnsupportedOutputFormat, showFormat) + } + // Create GitHub client. client := &RealGitHubClient{} // Fetch release (with or without spinner depending on TTY). release, err := fetchReleaseWithSpinner(client, versionArg) if err != nil { return err } // Format output. - switch strings.ToLower(showFormat) { + switch normalizedFormat { case "table": if err := formatReleaseDetailText(release); err != nil { return err } return nil case "json": return formatReleaseDetailJSON(release) case "yaml": return formatReleaseDetailYAML(release) default: return fmt.Errorf("%w: %s (supported: table, json, yaml)", errUtils.ErrUnsupportedOutputFormat, showFormat) } },
175-176: Default “table” is consistent; bind flag/env via Viper for config parity.Bind the flag and ATMOS_ env to follow CLI config conventions.
import ( _ "embed" "fmt" "os" "strings" "github.com/charmbracelet/bubbles/spinner" tea "github.com/charmbracelet/bubbletea" "github.com/google/go-github/v59/github" "github.com/mattn/go-isatty" "github.com/spf13/cobra" + "github.com/spf13/viper" errUtils "github.com/cloudposse/atmos/errors" "github.com/cloudposse/atmos/pkg/perf" ) @@ func init() { showCmd.Flags().StringVar(&showFormat, "format", "table", "Output format: table, json, yaml") + _ = viper.BindEnv("version.show.format", "ATMOS_VERSION_SHOW_FORMAT") + _ = viper.BindPFlag("version.show.format", showCmd.Flags().Lookup("format")) versionCmd.AddCommand(showCmd) }cmd/version/show_test.go (1)
16-16: Flag default assertion updated to “table” — LGTM.Once show adds early format validation, mirror list’s format-validation test cases here.
cmd/version/list.go (2)
152-157: Great fail-fast validation and normalization.This fixes flakiness and aligns with other flag validations. To avoid duplication with show.go, consider a small helper:
func normalizeAndValidateFormat(s string) (string, error) { f := strings.ToLower(s) switch f { case "table", "json", "yaml": return f, nil default: return "", fmt.Errorf("%w: %s (supported: table, json, yaml)", errUtils.ErrUnsupportedOutputFormat, s) } }Then call it here and in show.RunE.
201-201: Default “table” is consistent; bind flag/env with Viper to honor config precedence.Add Viper bindings so users can set ATMOS_VERSION_LIST_FORMAT or config files.
import ( _ "embed" "fmt" "os" "strings" "time" "github.com/charmbracelet/bubbles/spinner" tea "github.com/charmbracelet/bubbletea" "github.com/google/go-github/v59/github" "github.com/mattn/go-isatty" "github.com/spf13/cobra" + "github.com/spf13/viper" errUtils "github.com/cloudposse/atmos/errors" "github.com/cloudposse/atmos/pkg/perf" ) @@ func init() { listCmd.Flags().IntVar(&listLimit, "limit", listDefaultLimit, "Maximum number of releases to display (1-100)") listCmd.Flags().IntVar(&listOffset, "offset", 0, "Number of releases to skip") listCmd.Flags().StringVar(&listSince, "since", "", "Only show releases published after this date (ISO 8601 format: YYYY-MM-DD)") listCmd.Flags().BoolVar(&listIncludePrereleases, "include-prereleases", false, "Include pre-release versions") listCmd.Flags().StringVar(&listFormat, "format", "table", "Output format: table, json, yaml") + _ = viper.BindEnv("version.list.format", "ATMOS_VERSION_LIST_FORMAT") + _ = viper.BindPFlag("version.list.format", listCmd.Flags().Lookup("format")) versionCmd.AddCommand(listCmd) }cmd/version/list_test.go (1)
340-342: Updated test case to “valid format table” — LGTM.Optional: consider a command-level GitHub client factory you can override in tests to avoid any network when exercising RunE.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (4)
cmd/version/list.go(3 hunks)cmd/version/list_test.go(1 hunks)cmd/version/show.go(2 hunks)cmd/version/show_test.go(1 hunks)
🧰 Additional context used
📓 Path-based instructions (8)
cmd/**/*.go
📄 CodeRabbit inference engine (.cursor/rules/atmos-rules.mdc)
cmd/**/*.go: Use Cobra's recommended command structure with a root command and subcommands
Implement each CLI command in a separate file under cmd/
Use Viper for managing configuration, environment variables, and flags in the CLI
Keep separation of concerns between CLI interface (cmd) and business logic
Use kebab-case for command-line flags
Provide comprehensive help text for all commands and flags
Include examples in Cobra command help
Use Viper for configuration management; support files, env vars, and flags with precedence flags > env > config > defaults
Follow single responsibility; separate command interface from business logic
Provide meaningful user feedback and include progress indicators for long-running operations
Provide clear error messages to users and troubleshooting hints where appropriate
cmd/**/*.go: Follow Cobra command pattern: one command per file; load examples via //go:embed and render via utils.PrintfMarkdown in RunE.
Telemetry for new commands is automatic via RootCmd.ExecuteC(); for non-standard paths use telemetry.CaptureCmd or telemetry.CaptureCmdString.
Files:
cmd/version/show.gocmd/version/list.gocmd/version/list_test.gocmd/version/show_test.go
**/*.go
📄 CodeRabbit inference engine (.cursor/rules/atmos-rules.mdc)
**/*.go: All code must pass golangci-lint checks
Follow Go error handling idioms and use meaningful error messages
Wrap errors with context using fmt.Errorf("context: %w", err)
Consider custom error types for domain-specific errors
Follow standard Go coding style; run gofmt and goimports
Use snake_case for environment variables
Document complex logic with inline comments
**/*.go: All comments must end with periods; enforced by golangci-lint godot across all Go comments.
Organize imports into three groups (stdlib, third-party, Atmos) separated by blank lines and sorted alphabetically within each group; keep existing aliases.
All errors must be wrapped using static errors defined in errors/errors.go; prefer errors.Join for multiple, fmt.Errorf with %w for context, and errors.Is for checks; never rely on string comparisons.
Prefer cross-platform implementations: use SDKs over external binaries; use filepath/os facilities; gate OS-specific logic with runtime.GOOS or build tags.
Files:
cmd/version/show.gocmd/version/list.gocmd/version/list_test.gocmd/version/show_test.go
**/!(*_test).go
📄 CodeRabbit inference engine (.cursor/rules/atmos-rules.mdc)
Document all exported functions, types, and methods with Go doc comments
Files:
cmd/version/show.gocmd/version/list.go
{cmd,internal,pkg}/**/*.go
📄 CodeRabbit inference engine (CLAUDE.md)
{cmd,internal,pkg}/**/*.go: Adddefer perf.Track()to all public functions and critical private ones, include a blank line after it, and use package-qualified names (e.g., "exec.ProcessComponent"). Use atmosConfig if available, else nil.
Always bind environment variables with viper.BindEnv; every var must have an ATMOS_ alternative and prefer ATMOS_ over external names.
Distinguish structured logging from UI output: UI prompts/errors/status to stderr; data/results to stdout; logging for system/debug only; no UI via logging.
Most text UI must go to stderr (via utils.PrintfMessageToTUI or fmt.Fprintf(os.Stderr,...)); only data/results to stdout.
Files:
cmd/version/show.gocmd/version/list.gocmd/version/list_test.gocmd/version/show_test.go
{pkg,internal,cmd}/**/*.go
📄 CodeRabbit inference engine (CLAUDE.md)
Always use mockgen for interface mocks; never write manual mocks with many stub methods.
Files:
cmd/version/show.gocmd/version/list.gocmd/version/list_test.gocmd/version/show_test.go
**/*
📄 CodeRabbit inference engine (CLAUDE.md)
Target minimum 80% coverage on new/changed lines; exclude mock files from coverage: **/mock_.go, mock_.go, **/mock/*.go.
Files:
cmd/version/show.gocmd/version/list.gocmd/version/list_test.gocmd/version/show_test.go
**/*_test.go
📄 CodeRabbit inference engine (.cursor/rules/atmos-rules.mdc)
**/*_test.go: Every new feature must include comprehensive unit tests
Test both happy paths and error conditions
Use table-driven tests for multiple scenarios
**/*_test.go: Unit tests should be table-driven where appropriate and focus on pure functions; target >80% coverage with emphasis on pkg/ and internal/exec/.
Test behavior, not implementation; avoid tautological or stub-only tests; use dependency injection to make code testable; remove always-skipped tests; table-driven tests must use realistic scenarios.
Place//go:generate mockgendirectives for mocks at the top of test files; for internal interfaces use-source=$GOFILE -destination=mock_$GOFILE -package=$GOPACKAGE.
Tests must call production code paths (do not duplicate production logic within tests).
Always use t.Skipf with a reason (never t.Skip or Skipf without context).
Test files should mirror implementation structure and be co-located with source files (foo.go ↔ foo_test.go).
Use precondition-based test skipping helpers from tests/test_preconditions.go (e.g., RequireAWSProfile, RequireGitHubAccess).
Files:
cmd/version/list_test.gocmd/version/show_test.go
cmd/**/*_test.go
📄 CodeRabbit inference engine (CLAUDE.md)
cmd/**/*_test.go: Always use cmd.NewTestKit(t) in ALL cmd package tests, including subtests, to snapshot and restore RootCmd state.
Command tests live under cmd/ and must use temporary binaries when needed; TestMain must call os.Exit(m.Run()) to propagate exit code.
Files:
cmd/version/list_test.gocmd/version/show_test.go
🧬 Code graph analysis (2)
cmd/version/show.go (1)
errors/errors.go (1)
ErrUnsupportedOutputFormat(49-49)
cmd/version/list.go (1)
errors/errors.go (1)
ErrUnsupportedOutputFormat(49-49)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: Build (windows-latest, windows)
- GitHub Check: Analyze (go)
- GitHub Check: Lint (golangci)
- GitHub Check: Summary
🔇 Additional comments (1)
cmd/version/list.go (1)
183-192: Switching on normalizedFormat is correct and consistent.This prevents case-sensitivity pitfalls and keeps error paths clean.
|
Update the docs |
- Create version/ subdirectory following Atmos documentation structure - Add usage.mdx as the main version command landing page - Add list.mdx with full documentation for `atmos version list` - Add show.mdx with full documentation for `atmos version show` - Update all broken links to point to new documentation location - Remove old version.mdx file Documentation includes: - Usage examples and syntax - Flag descriptions using definition lists - GitHub API rate limit information - Feature highlights - Use cases and examples 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
0fc3e0a
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)
website/docs/cli/commands/version/list.mdx (1)
127-127: Consider rephrasing passive voice for style consistency.Line 127 uses passive voice: "No special scopes are needed for accessing public repositories." You could rephrase as "No special scopes are required" or "You need no special scopes" for a more active tone.
website/docs/cli/commands/version/show.mdx (1)
104-104: Consider rephrasing passive voice for style consistency.Line 104 uses passive voice: "No special scopes are needed for accessing public repositories." You could rephrase as "No special scopes are required" or "You need no special scopes" for a more active tone. (Same note applies to list.mdx line 127.)
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (8)
website/docs/cheatsheets/commands.mdx(1 hunks)website/docs/cli/cli.mdx(1 hunks)website/docs/cli/commands/help.mdx(1 hunks)website/docs/cli/commands/version/_category_.json(1 hunks)website/docs/cli/commands/version/list.mdx(1 hunks)website/docs/cli/commands/version/show.mdx(1 hunks)website/docs/cli/commands/version/usage.mdx(2 hunks)website/docs/cli/global-flags.mdx(1 hunks)
✅ Files skipped from review due to trivial changes (2)
- website/docs/cli/commands/help.mdx
- website/docs/cli/global-flags.mdx
🧰 Additional context used
📓 Path-based instructions (3)
website/**
📄 CodeRabbit inference engine (.cursor/rules/atmos-rules.mdc)
website/**: Update website documentation in website/ when adding features
Ensure consistency between CLI help text and website documentation
Follow the website's documentation structure and style
Keep website code in website/ and follow its architecture/style; test changes locally
Keep CLI and website documentation in sync; document new features with examples and use casesAlways build the website (cd website && npm run build) after modifying docs, images, sidebars, or site components to catch broken links/formatting.
Files:
website/docs/cli/cli.mdxwebsite/docs/cli/commands/version/_category_.jsonwebsite/docs/cli/commands/version/usage.mdxwebsite/docs/cheatsheets/commands.mdxwebsite/docs/cli/commands/version/list.mdxwebsite/docs/cli/commands/version/show.mdx
**/*
📄 CodeRabbit inference engine (CLAUDE.md)
Target minimum 80% coverage on new/changed lines; exclude mock files from coverage: **/mock_.go, mock_.go, **/mock/*.go.
Files:
website/docs/cli/cli.mdxwebsite/docs/cli/commands/version/_category_.jsonwebsite/docs/cli/commands/version/usage.mdxwebsite/docs/cheatsheets/commands.mdxwebsite/docs/cli/commands/version/list.mdxwebsite/docs/cli/commands/version/show.mdx
website/docs/cli/commands/**/**/*.mdx
📄 CodeRabbit inference engine (CLAUDE.md)
All new commands/flags/parameters must be documented in Docusaurus MDX under website/docs/cli/commands//.mdx using definition lists (
) for arguments and flags and the provided frontmatter/template.
Files:
website/docs/cli/commands/version/usage.mdxwebsite/docs/cli/commands/version/list.mdxwebsite/docs/cli/commands/version/show.mdx
🧠 Learnings (4)
📚 Learning: 2025-10-14T01:54:48.410Z
Learnt from: osterman
PR: cloudposse/atmos#1498
File: website/src/components/Screengrabs/atmos-completion--help.html:2-7
Timestamp: 2025-10-14T01:54:48.410Z
Learning: Screengrab HTML files in website/src/components/Screengrabs/ are generated from actual Atmos CLI output converted to HTML. The ANSI-art headers and formatting in these files are intentional and reflect the real CLI user experience, so they should not be suggested for removal or modification.
Applied to files:
website/docs/cli/commands/version/usage.mdx
📚 Learning: 2025-10-19T22:59:32.304Z
Learnt from: CR
PR: cloudposse/atmos#0
File: CLAUDE.md:0-0
Timestamp: 2025-10-19T22:59:32.304Z
Learning: Applies to cmd/markdown/*_usage.md : Store CLI example usage in embedded markdown files named atmos_<command>_<subcommand>_usage.md.
Applied to files:
website/docs/cheatsheets/commands.mdx
📚 Learning: 2024-10-27T16:59:26.187Z
Learnt from: osterman
PR: cloudposse/atmos#729
File: internal/exec/help.go:48-51
Timestamp: 2024-10-27T16:59:26.187Z
Learning: In the Atmos CLI help messages, when providing examples that include the version number, use the actual version variable (e.g., `version.Version`) instead of placeholders like `<version>`.
Applied to files:
website/docs/cheatsheets/commands.mdx
📚 Learning: 2025-09-13T16:39:20.007Z
Learnt from: samtholiya
PR: cloudposse/atmos#1466
File: cmd/markdown/atmos_toolchain_aliases.md:2-4
Timestamp: 2025-09-13T16:39:20.007Z
Learning: In the cloudposse/atmos repository, CLI documentation files in cmd/markdown/ follow a specific format that uses " $ atmos command" (with leading space and dollar sign prompt) in code blocks. This is the established project convention and should not be changed to comply with standard markdownlint rules MD040 and MD014.
Applied to files:
website/docs/cli/commands/version/list.mdx
🪛 LanguageTool
website/docs/cli/commands/version/list.mdx
[style] ~127-~127: To elevate your writing, try using a synonym like ‘required’ here. Or, to avoid using the passive voice, try replacing the past participle ‘needed’ with an adjective.
Context: ...xxxxxxxxxxx" ``` No special scopes are needed for accessing public repositories. ## ...
(IS_NEEDED_NECESSARY)
website/docs/cli/commands/version/show.mdx
[style] ~104-~104: To elevate your writing, try using a synonym like ‘required’ here. Or, to avoid using the passive voice, try replacing the past participle ‘needed’ with an adjective.
Context: ...xxxxxxxxxxx" ``` No special scopes are needed for accessing public repositories. ## ...
(IS_NEEDED_NECESSARY)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: Build (windows-latest, windows)
- GitHub Check: Build (macos-latest, macos)
- GitHub Check: Analyze (go)
- GitHub Check: website-deploy-preview
- GitHub Check: Lint (golangci)
- GitHub Check: Summary
🔇 Additional comments (9)
website/docs/cli/cli.mdx (1)
27-27: Link target updated to new version usage page.The link correctly points to the new documentation structure where the version command usage is the entry point to subcommands.
website/docs/cheatsheets/commands.mdx (1)
34-34: Consistent link update across cheatsheet.The Card url matches the link update in cli.mdx, maintaining consistency in the documentation navigation structure.
website/docs/cli/commands/version/usage.mdx (2)
9-9: DocCardList import properly added.The import enables automatic rendering of subcommand cards in the Subcommands section, connecting to list and show pages.
81-84: Subcommands section properly structured.The DocCardList component will automatically render navigation cards for the list and show subcommands, enabling easy discovery.
website/docs/cli/commands/version/_category_.json (1)
1-11: Category configuration properly defined.The JSON structure correctly creates a collapsible version command category with the usage page as the entry point, enabling the sidebar to render subcommands under a parent category.
website/docs/cli/commands/version/list.mdx (2)
1-80: Comprehensive documentation for version list command.The page covers usage, examples, flags, and features clearly. The format options (table, json, yaml) and pagination examples are practical and well-organized.
15-15: Verify screengrab slug exists.The Screengrab component references slug "atmos-version-list--help". Ensure the corresponding HTML file exists at website/src/components/Screengrabs/atmos-version-list--help.html.
website/docs/cli/commands/version/show.mdx (2)
1-103: Comprehensive documentation for version show command.The page well documents the show command with clear argument descriptions, examples, and format options. Structure mirrors list.mdx effectively.
15-15: Verify screengrab slug exists.The Screengrab component references slug "atmos-version-show--help". Ensure the corresponding HTML file exists at website/src/components/Screengrabs/atmos-version-show--help.html.
- Fix unclosed <dd> tag by keeping content on single line - Resolves MDX compilation error 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
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 (1)
website/docs/cli/commands/version/show.mdx (1)
88-105: Consider tightening passive voice in rate limits section.Minor writing suggestion (optional): Line 105 uses passive voice ("are needed"). Consider rephrasing to active voice for clarity: "No special scopes are required" or "You don't need special scopes to access public repositories."
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
website/docs/cli/commands/version/show.mdx(1 hunks)website/docs/cli/commands/version/usage.mdx(3 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
website/**
📄 CodeRabbit inference engine (.cursor/rules/atmos-rules.mdc)
website/**: Update website documentation in website/ when adding features
Ensure consistency between CLI help text and website documentation
Follow the website's documentation structure and style
Keep website code in website/ and follow its architecture/style; test changes locally
Keep CLI and website documentation in sync; document new features with examples and use casesAlways build the website (cd website && npm run build) after modifying docs, images, sidebars, or site components to catch broken links/formatting.
Files:
website/docs/cli/commands/version/usage.mdxwebsite/docs/cli/commands/version/show.mdx
website/docs/cli/commands/**/**/*.mdx
📄 CodeRabbit inference engine (CLAUDE.md)
All new commands/flags/parameters must be documented in Docusaurus MDX under website/docs/cli/commands//.mdx using definition lists (
) for arguments and flags and the provided frontmatter/template.
Files:
website/docs/cli/commands/version/usage.mdxwebsite/docs/cli/commands/version/show.mdx
**/*
📄 CodeRabbit inference engine (CLAUDE.md)
Target minimum 80% coverage on new/changed lines; exclude mock files from coverage: **/mock_.go, mock_.go, **/mock/*.go.
Files:
website/docs/cli/commands/version/usage.mdxwebsite/docs/cli/commands/version/show.mdx
🧠 Learnings (2)
📚 Learning: 2025-10-19T22:59:32.304Z
Learnt from: CR
PR: cloudposse/atmos#0
File: CLAUDE.md:0-0
Timestamp: 2025-10-19T22:59:32.304Z
Learning: Applies to website/docs/cli/commands/**/**/*.mdx : All new commands/flags/parameters must be documented in Docusaurus MDX under website/docs/cli/commands/<command>/<subcommand>.mdx using definition lists (<dl>) for arguments and flags and the provided frontmatter/template.
Applied to files:
website/docs/cli/commands/version/usage.mdx
📚 Learning: 2025-09-13T16:39:20.007Z
Learnt from: samtholiya
PR: cloudposse/atmos#1466
File: cmd/markdown/atmos_toolchain_aliases.md:2-4
Timestamp: 2025-09-13T16:39:20.007Z
Learning: In the cloudposse/atmos repository, CLI documentation files in cmd/markdown/ follow a specific format that uses " $ atmos command" (with leading space and dollar sign prompt) in code blocks. This is the established project convention and should not be changed to comply with standard markdownlint rules MD040 and MD014.
Applied to files:
website/docs/cli/commands/version/usage.mdx
🪛 LanguageTool
website/docs/cli/commands/version/show.mdx
[style] ~105-~105: To elevate your writing, try using a synonym like ‘required’ here. Or, to avoid using the passive voice, try replacing the past participle ‘needed’ with an adjective.
Context: ...xxxxxxxxxxx" ``` No special scopes are needed for accessing public repositories. ## ...
(IS_NEEDED_NECESSARY)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
- GitHub Check: Run pre-commit hooks
- GitHub Check: Lint (golangci)
- GitHub Check: Analyze (go)
- GitHub Check: website-deploy-preview
- GitHub Check: Summary
🔇 Additional comments (4)
website/docs/cli/commands/version/usage.mdx (2)
81-83: Good structure with subcommand aggregation.The new "Subcommands" section with DocCardList properly delegates to dedicated documentation pages for
listandshowsubcommands. This keeps the main version page clean and maintainable.After merging, run
cd website && npm run buildto verify no broken links or formatting issues in the docs site.
68-69: The documentation is accurate—no changes needed.The base
atmos versioncommand and theatmos version showsubcommand support different formats. Verification of the implementation confirms:
- Base command (
atmos version): supports onlyjsonandyamlformats (internal/exec/version.go line 148-155)- Subcommand (
atmos version show): supportstable,json, andyamlformatsThe usage.mdx documentation correctly reflects the base command's capabilities, and show.mdx correctly reflects the show subcommand's capabilities. These are separate commands with separate format support, so the documentation is appropriately different and accurate.
Likely an incorrect or invalid review comment.
website/docs/cli/commands/version/show.mdx (2)
1-78: Well-structured documentation forversion showsubcommand.The new documentation page is comprehensive and properly formatted. Good coverage of arguments, examples, flags, rate limits, and use cases. The format flag correctly documents the updated formats (
table,json,yaml) withtableas default, which aligns with the PR objectives.
1-139: Manual build verification still required.The structural analysis looks good—components exist, imports are valid, MDX syntax is clean, and sidebar auto-discovery will pick up the new file. However, the sandbox can't run the full
npm install && npm run buildpipeline.Per the coding guidelines, please build locally to catch any edge cases:
cd website && npm run build
…eengrabs - Add note that ATMOS_GITHUB_TOKEN takes precedence over GITHUB_TOKEN - Update both list.mdx and show.mdx documentation files - Add version --help, version list --help, version show --help to demo-stacks.txt 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
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)
website/docs/cli/commands/version/list.mdx (1)
109-109: Consider rewording passive voice for clarity. Lines 109 and 131 use "No special scopes are needed" which reads as passive. Try "Special scopes aren't required" or "You don't need special scopes" for more active phrasing and better readability.Also applies to: 131-131
website/docs/cli/commands/version/show.mdx (1)
73-109: Format defaults and supported values match PR objectives. Documentation accurately reflects the switch totableas default and the supported formats (table, json, yaml). Examples clearly show both version argument variations and all output formats.One style note at line 109: same as in list.mdx, "No special scopes are needed" could use more active phrasing like "Special scopes aren't required."
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (3)
demo/screengrabs/demo-stacks.txt(1 hunks)website/docs/cli/commands/version/list.mdx(1 hunks)website/docs/cli/commands/version/show.mdx(1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*
📄 CodeRabbit inference engine (CLAUDE.md)
Target minimum 80% coverage on new/changed lines; exclude mock files from coverage: **/mock_.go, mock_.go, **/mock/*.go.
Files:
demo/screengrabs/demo-stacks.txtwebsite/docs/cli/commands/version/list.mdxwebsite/docs/cli/commands/version/show.mdx
website/**
📄 CodeRabbit inference engine (.cursor/rules/atmos-rules.mdc)
website/**: Update website documentation in website/ when adding features
Ensure consistency between CLI help text and website documentation
Follow the website's documentation structure and style
Keep website code in website/ and follow its architecture/style; test changes locally
Keep CLI and website documentation in sync; document new features with examples and use casesAlways build the website (cd website && npm run build) after modifying docs, images, sidebars, or site components to catch broken links/formatting.
Files:
website/docs/cli/commands/version/list.mdxwebsite/docs/cli/commands/version/show.mdx
website/docs/cli/commands/**/**/*.mdx
📄 CodeRabbit inference engine (CLAUDE.md)
All new commands/flags/parameters must be documented in Docusaurus MDX under website/docs/cli/commands//.mdx using definition lists (
) for arguments and flags and the provided frontmatter/template.
Files:
website/docs/cli/commands/version/list.mdxwebsite/docs/cli/commands/version/show.mdx
🧠 Learnings (2)
📚 Learning: 2025-01-19T15:49:15.593Z
Learnt from: samtholiya
PR: cloudposse/atmos#955
File: tests/snapshots/TestCLICommands_atmos_validate_editorconfig_--help.stdout.golden:0-0
Timestamp: 2025-01-19T15:49:15.593Z
Learning: In future commits, the help text for Atmos CLI commands should be limited to only show component and stack parameters for commands that actually use them. This applies to the example usage section in command help text.
Applied to files:
demo/screengrabs/demo-stacks.txt
📚 Learning: 2025-09-13T16:39:20.007Z
Learnt from: samtholiya
PR: cloudposse/atmos#1466
File: cmd/markdown/atmos_toolchain_aliases.md:2-4
Timestamp: 2025-09-13T16:39:20.007Z
Learning: In the cloudposse/atmos repository, CLI documentation files in cmd/markdown/ follow a specific format that uses " $ atmos command" (with leading space and dollar sign prompt) in code blocks. This is the established project convention and should not be changed to comply with standard markdownlint rules MD040 and MD014.
Applied to files:
website/docs/cli/commands/version/list.mdx
🪛 LanguageTool
website/docs/cli/commands/version/list.mdx
[style] ~131-~131: To elevate your writing, try using a synonym like ‘required’ here. Or, to avoid using the passive voice, try replacing the past participle ‘needed’ with an adjective.
Context: ...THUB_TOKEN`. ::: No special scopes are needed for accessing public repositories. ## ...
(IS_NEEDED_NECESSARY)
website/docs/cli/commands/version/show.mdx
[style] ~109-~109: To elevate your writing, try using a synonym like ‘required’ here. Or, to avoid using the passive voice, try replacing the past participle ‘needed’ with an adjective.
Context: ...THUB_TOKEN`. ::: No special scopes are needed for accessing public repositories. ## ...
(IS_NEEDED_NECESSARY)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: Build (macos-latest, macos)
- GitHub Check: Build (windows-latest, windows)
- GitHub Check: Lint (golangci)
- GitHub Check: Analyze (go)
- GitHub Check: website-deploy-preview
- GitHub Check: Summary
🔇 Additional comments (2)
demo/screengrabs/demo-stacks.txt (1)
53-55: Good. These additions align with the version command refactoring and are necessary to document the new help topics in the demo flow.website/docs/cli/commands/version/list.mdx (1)
1-98: Format validation and defaults align with PR objectives. The documentation correctly reflects the format validation moved before API calls and thetabledefault (renamed fromtext). Examples are comprehensive and cover pagination, filtering, and all supported formats. Definition list structure for flags follows doc conventions.
atmos version listatmos version list command. Add docs
- Add comprehensive format validation tests for show command - Test all three valid formats (table, json, yaml) and invalid format - Improve list command test to properly assert errors - Increase test coverage from 72.73% to 77.0% Coverage improvements: - show.go: Added tests for all format switch cases - list.go: Added proper error assertions for invalid format 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
|
These changes were released in v1.195.0. |
what
atmos version listcommandtextformat totableinatmos version listwhy
--formatparameter AFTER making GitHub API calls, causing tests to fail with GitHub rate limit errors instead of proper format validation errorstableis a more accurate namereferences
TestListCommand_FormatValidation--limitand--offsetparametersSummary by CodeRabbit
Bug Fixes
Tests
Documentation