feat: Add command aliases for vendor and workflow list#1981
Conversation
- Added `atmos vendor list` as alias for `atmos list vendor` - Added `atmos workflow list` as alias for `atmos list workflows` - Refactored vendor command to use CommandProvider pattern for alias support - Added blog post documenting the new aliases - Updated roadmap with shipped milestone Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Dependency Review✅ No vulnerabilities or license issues found.Scanned FilesNone |
|
Warning Rate limit exceeded
⌛ 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 a VendorCommandProvider-based vendor command (with pull/diff stubs), removes legacy vendor command files, registers the provider via side-effect import, and adds two CLI aliases: Changes
Sequence Diagram(s)sequenceDiagram
participant User as User (CLI)
participant Root as RootCmd
participant Registry as Command Registry
participant ListProv as ListCommandProvider
participant VendorProv as VendorCommandProvider
participant Executor as Command Executor
rect rgba(200,200,255,0.5)
User->>Root: runs "atmos vendor list" (alias)
Root->>Registry: resolve command providers & aliases
Registry->>ListProv: match alias -> "list vendor"
ListProv->>Executor: invoke list vendor handler
Executor-->>User: outputs vendor list
end
sequenceDiagram
participant Start as App start
participant Root as root.go
participant SideImport as cmd/vendor package
participant Registry as Command Registry
rect rgba(200,255,200,0.5)
Start->>Root: initialize CLI
Root->>SideImport: side-effect import (registers provider)
SideImport->>Registry: register VendorCommandProvider
Registry-->>Root: vendor command available
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
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.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@cmd/vendor/vendor_test.go`:
- Around line 10-19: The test currently calls vendorPullCmd.RunE(...) which
bypasses Cobra flag parsing and passes "--invalid-flag" as a positional arg to
ExecuteVendorPullCmd; to properly test invalid flag handling, replace the RunE
call with vendorPullCmd.SetArgs([]string{"--invalid-flag"}) followed by
vendorPullCmd.Execute() (keeping the same assertion on err), or alternatively
rename TestVendorCommands_Error and its comment to state it validates handling
of positional arguments via ExecuteVendorPullCmd if you prefer not to change
execution style; target the vendorPullCmd, RunE, SetArgs and Execute symbols
when making this change.
🧹 Nitpick comments (5)
website/src/data/roadmap.js (1)
199-199: Consider adding the PR number to the milestone entry.Per coding guidelines, shipped milestones should include the PR number for traceability. This helps users track back to the original implementation.
Suggested addition
- { label: 'Command aliases for vendor and workflow list', status: 'shipped', quarter: 'q1-2026', changelog: 'vendor-workflow-list-aliases', description: 'Added `atmos vendor list` and `atmos workflow list` as aliases for their `atmos list` counterparts for intuitive command discovery.', benefits: 'Users can use either command form. Natural command structure regardless of preference.' }, + { label: 'Command aliases for vendor and workflow list', status: 'shipped', quarter: 'q1-2026', pr: 1981, changelog: 'vendor-workflow-list-aliases', description: 'Added `atmos vendor list` and `atmos workflow list` as aliases for their `atmos list` counterparts for intuitive command discovery.', benefits: 'Users can use either command form. Natural command structure regardless of preference.' },cmd/list/list.go (1)
77-99: LGTM!The alias structure correctly follows the
CommandAliasinterface pattern. Both aliases are well-documented with appropriate Short, Long, and Example fields.One minor nit: the comment at line 79 is missing a trailing period (enforced by
godotlinter per coding guidelines).Add trailing period to comment
// GetAliases returns command aliases for list subcommands. // Creates "atmos vendor list" as an alias for "atmos list vendor". -// Creates "atmos workflow list" as an alias for "atmos list workflows". +// Creates "atmos workflow list" as an alias for "atmos list workflows".Wait, the period is already there. Let me re-check... Yes, line 79 does end with a period. All good!
website/blog/2026-01-16-vendor-workflow-list-aliases.mdx (1)
16-17: Minor wording repetition.Static analysis flagged "now" appearing twice in close proximity. Not blocking, but consider rephrasing for flow.
Suggested rewording
-- `atmos vendor list` is now an alias for `atmos list vendor` -- `atmos workflow list` is now an alias for `atmos list workflows` +- `atmos vendor list` → alias for `atmos list vendor` +- `atmos workflow list` → alias for `atmos list workflows`cmd/vendor/vendor.go (2)
21-32: Consider simplifying the RunE return.The logic works fine, but the intermediate
errvariable is unnecessary here.Simplify RunE
RunE: func(cmd *cobra.Command, args []string) error { - err := e.ExecuteVendorPullCmd(cmd, args) - return err + return e.ExecuteVendorPullCmd(cmd, args) },
34-44: MissingArgsconstraint on vendorDiffCmd.For consistency with
vendorPullCmd, consider addingArgs: cobra.NoArgsto prevent unexpected positional arguments when this command is eventually enabled.Add Args constraint
var vendorDiffCmd = &cobra.Command{ Use: "diff", Short: "Show differences in vendor configurations or dependencies", Long: "This command compares and displays the differences in vendor-specific configurations or dependencies.", FParseErrWhitelist: struct{ UnknownFlags bool }{UnknownFlags: false}, + Args: cobra.NoArgs, RunE: func(cmd *cobra.Command, args []string) error { - err := e.ExecuteVendorDiffCmd(cmd, args) - return err + return e.ExecuteVendorDiffCmd(cmd, args) }, }
📜 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 (11)
cmd/list/list.gocmd/list/list_test.gocmd/root.gocmd/vendor.gocmd/vendor/vendor.gocmd/vendor/vendor_test.gocmd/vendor_diff.gocmd/vendor_pull.gocmd/vendor_test.gowebsite/blog/2026-01-16-vendor-workflow-list-aliases.mdxwebsite/src/data/roadmap.js
💤 Files with no reviewable changes (4)
- cmd/vendor_test.go
- cmd/vendor_pull.go
- cmd/vendor.go
- cmd/vendor_diff.go
🧰 Additional context used
📓 Path-based instructions (7)
cmd/**/*.go
📄 CodeRabbit inference engine (.cursor/rules/atmos-rules.mdc)
cmd/**/*.go: Use Cobra's recommended command structure with a root command and subcommands, implementing each command in a separate file undercmd/directory
Provide comprehensive help text for all commands and flags, include examples in command help, and follow Go's documentation conventions in Cobra command definitions
Provide meaningful feedback to users and include progress indicators for long-running operations in CLI commands
Files:
cmd/root.gocmd/list/list.gocmd/vendor/vendor.gocmd/vendor/vendor_test.gocmd/list/list_test.go
**/*.go
📄 CodeRabbit inference engine (.cursor/rules/atmos-rules.mdc)
**/*.go: Use Viper for managing configuration, environment variables, and flags in CLI commands
Use interfaces for external dependencies to facilitate mocking and consider using testify/mock for creating mock implementations
All code must pass golangci-lint checks
Follow Go's error handling idioms: use meaningful error messages, wrap errors with context usingfmt.Errorf("context: %w", err), and consider using custom error types for domain-specific errors
Follow standard Go coding style: usegofmtandgoimportsto format code, prefer short descriptive variable names, use kebab-case for command-line flags, and snake_case for environment variables
Document all exported functions, types, and methods following Go's documentation conventions
Document complex logic with inline comments in Go code
Support configuration via files, environment variables, and flags following the precedence order: flags > environment variables > config file > defaults
Provide clear error messages to users, include troubleshooting hints when appropriate, and log detailed errors for debugging
**/*.go: All comments must end with periods (enforced bygodotlinter) in Go code
Organize imports into three groups separated by blank lines, sorted alphabetically: Go stdlib, 3rd-party (NOT cloudposse/atmos), then Atmos packages with maintained aliases (cfg,log,u,errUtils)
All errors MUST be wrapped using static errors defined inerrors/errors.go- useerrors.Joinfor combining errors,fmt.Errorfwith%wfor context, anderrors.Is()for error checking
Never manually create mocks - usego.uber.org/mock/mockgenwith//go:generatedirectives in Go code
Keep files small and focused - under 600 lines with one cmd/impl per file, co-locate tests, never use//revive:disable:file-length-limit
Use colors frompkg/ui/theme/colors.gofor all UI theming in Go code
Code must be compatible with Linux, macOS, and Windows - use SDKs over binaries, usefilepath.Join()instead of h...
Files:
cmd/root.gocmd/list/list.gocmd/vendor/vendor.gocmd/vendor/vendor_test.gocmd/list/list_test.go
**/{pkg,internal,cmd}/**/*.go
📄 CodeRabbit inference engine (CLAUDE.md)
Add
defer perf.Track(atmosConfig, "pkg.FuncName")()plus blank line to all public functions, usingnilif no atmosConfig param - exceptions: trivial getters/setters, command constructors, simple factories, functions delegating to tracked functions
Files:
cmd/root.gocmd/list/list.gocmd/vendor/vendor.gocmd/vendor/vendor_test.gocmd/list/list_test.go
website/**
📄 CodeRabbit inference engine (.cursor/rules/atmos-rules.mdc)
website/**: Update website documentation in thewebsite/directory when adding new features, ensure consistency between CLI help text and website documentation, and follow the website's documentation structure and style
Keep website code in thewebsite/directory, follow the existing website architecture and style, and test website changes locally before committing
Keep CLI documentation and website documentation in sync and document new features on the website with examples and use cases
Files:
website/blog/2026-01-16-vendor-workflow-list-aliases.mdxwebsite/src/data/roadmap.js
website/blog/*.mdx
📄 CodeRabbit inference engine (CLAUDE.md)
PRs labeled
minorormajorMUST include a blog post atwebsite/blog/YYYY-MM-DD-feature-name.mdxwith YAML frontmatter, using only tags defined inwebsite/blog/tags.yml
Files:
website/blog/2026-01-16-vendor-workflow-list-aliases.mdx
**/*_test.go
📄 CodeRabbit inference engine (.cursor/rules/atmos-rules.mdc)
**/*_test.go: Every new feature must include comprehensive unit tests targeting >80% code coverage for all packages
Use table-driven tests for testing multiple scenarios in Go
Include integration tests for command flows and test CLI end-to-end when possible with test fixturesPrefer unit tests with mocks over integration tests - use interfaces and dependency injection for testability, generate mocks with
go.uber.org/mock/mockgen, use table-driven tests, target >80% coverage
Files:
cmd/vendor/vendor_test.gocmd/list/list_test.go
cmd/**/*_test.go
📄 CodeRabbit inference engine (CLAUDE.md)
Always use
cmd.NewTestKit(t)for cmd tests to auto-clean RootCmd state
Files:
cmd/vendor/vendor_test.gocmd/list/list_test.go
🧠 Learnings (24)
📓 Common learnings
Learnt from: osterman
Repo: cloudposse/atmos PR: 1533
File: pkg/config/load.go:585-637
Timestamp: 2025-09-27T20:50:20.564Z
Learning: In the cloudposse/atmos repository, command merging prioritizes precedence over display ordering. Help commands are displayed lexicographically regardless of internal array order, so the mergeCommandArrays function focuses on ensuring the correct precedence chain (top-level file wins) rather than maintaining specific display order.
Learnt from: samtholiya
Repo: cloudposse/atmos PR: 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.
Learnt from: CR
Repo: cloudposse/atmos PR: 0
File: .cursor/rules/atmos-rules.mdc:0-0
Timestamp: 2025-11-24T17:35:37.209Z
Learning: Applies to cmd/**/*.go : Use Cobra's recommended command structure with a root command and subcommands, implementing each command in a separate file under `cmd/` directory
📚 Learning: 2025-11-24T17:35:37.209Z
Learnt from: CR
Repo: cloudposse/atmos PR: 0
File: .cursor/rules/atmos-rules.mdc:0-0
Timestamp: 2025-11-24T17:35:37.209Z
Learning: Applies to {go.mod,go.sum} : Manage dependencies with Go modules and keep dependencies up to date while minimizing external dependencies
Applied to files:
cmd/root.go
📚 Learning: 2025-07-05T20:59:02.914Z
Learnt from: aknysh
Repo: cloudposse/atmos PR: 1363
File: internal/exec/template_utils.go:18-18
Timestamp: 2025-07-05T20:59:02.914Z
Learning: In the Atmos project, gomplate v4 is imported with a blank import (`_ "github.com/hairyhenderson/gomplate/v4"`) alongside v3 imports to resolve AWS SDK version conflicts. V3 uses older AWS SDK versions that conflict with newer AWS modules used by Atmos. A full migration to v4 requires extensive refactoring due to API changes and should be handled in a separate PR.
Applied to files:
cmd/root.gocmd/vendor/vendor.go
📚 Learning: 2025-12-13T06:10:25.156Z
Learnt from: osterman
Repo: cloudposse/atmos PR: 1686
File: internal/exec/workflow_utils.go:0-0
Timestamp: 2025-12-13T06:10:25.156Z
Learning: Atmos workflows: In internal/exec/workflow_utils.go ExecuteWorkflow, non-identity steps intentionally use baseWorkflowEnv, which is constructed from the parent environment with PATH modifications for the toolchain. Avoid appending os.Environ() again; prefer documenting this behavior and testing that standard environment variables are preserved.
Applied to files:
cmd/root.go
📚 Learning: 2025-12-13T04:37:25.223Z
Learnt from: osterman
Repo: cloudposse/atmos PR: 1686
File: cmd/root.go:0-0
Timestamp: 2025-12-13T04:37:25.223Z
Learning: In Atmos cmd/root.go Execute(), after cfg.InitCliConfig, we must call both toolchainCmd.SetAtmosConfig(&atmosConfig) and toolchain.SetAtmosConfig(&atmosConfig) so the CLI wrapper and the toolchain package receive configuration; missing either can cause nil-pointer panics in toolchain path resolution.
Applied to files:
cmd/root.go
📚 Learning: 2024-12-11T18:40:12.808Z
Learnt from: Listener430
Repo: cloudposse/atmos PR: 844
File: cmd/helmfile.go:37-37
Timestamp: 2024-12-11T18:40:12.808Z
Learning: In the atmos project, `cliConfig` is initialized within the `cmd` package in `root.go` and can be used in other command files.
Applied to files:
cmd/root.gocmd/vendor/vendor.go
📚 Learning: 2025-12-13T06:10:13.688Z
Learnt from: osterman
Repo: cloudposse/atmos PR: 1686
File: errors/errors.go:184-203
Timestamp: 2025-12-13T06:10:13.688Z
Learning: cloudposse/atmos: For toolchain work, duplicate/unused error sentinels in errors/errors.go should be cleaned up in a separate refactor PR and not block feature PRs; canonical toolchain sentinels live under toolchain/registry with re-exports in toolchain/errors.go.
Applied to files:
cmd/root.go
📚 Learning: 2025-10-07T00:25:16.333Z
Learnt from: osterman
Repo: cloudposse/atmos PR: 1498
File: website/src/components/Screengrabs/atmos-terraform-metadata--help.html:25-55
Timestamp: 2025-10-07T00:25:16.333Z
Learning: In Atmos CLI, subcommands inherit flags from their parent commands via Cobra's command inheritance. For example, `atmos terraform metadata --help` shows `--affected` and related flags inherited from the parent `terraform` command (defined in cmd/terraform.go), even though the metadata subcommand doesn't explicitly define these flags. This is expected Cobra behavior and auto-generated help screengrabs accurately reflect this inheritance.
Applied to files:
cmd/root.gocmd/vendor/vendor.go
📚 Learning: 2025-09-05T14:57:37.360Z
Learnt from: RoseSecurity
Repo: cloudposse/atmos PR: 1448
File: cmd/ansible.go:26-28
Timestamp: 2025-09-05T14:57:37.360Z
Learning: The Atmos codebase uses a consistent pattern for commands that delegate to external tools: `PersistentFlags().Bool("", false, doubleDashHint)` where doubleDashHint provides help text about using double dashes to separate Atmos options from native command arguments. This pattern is used across terraform, packer, helmfile, atlantis, aws, and ansible commands.
Applied to files:
cmd/root.go
📚 Learning: 2025-01-09T22:37:01.004Z
Learnt from: samtholiya
Repo: cloudposse/atmos PR: 914
File: cmd/terraform_commands.go:260-265
Timestamp: 2025-01-09T22:37:01.004Z
Learning: In the terraform commands implementation (cmd/terraform_commands.go), the direct use of `os.Args[2:]` for argument handling is intentionally preserved to avoid extensive refactoring. While it could be improved to use cobra's argument parsing, such changes should be handled in a dedicated PR to maintain focus and minimize risk.
Applied to files:
cmd/root.go
📚 Learning: 2025-01-30T19:30:59.120Z
Learnt from: samtholiya
Repo: cloudposse/atmos PR: 959
File: cmd/workflow.go:74-74
Timestamp: 2025-01-30T19:30:59.120Z
Learning: Error handling for `cmd.Usage()` is not required in the Atmos CLI codebase, as confirmed by the maintainer.
Applied to files:
cmd/root.go
📚 Learning: 2025-09-13T18:06:07.674Z
Learnt from: samtholiya
Repo: cloudposse/atmos PR: 1466
File: toolchain/list.go:39-42
Timestamp: 2025-09-13T18:06:07.674Z
Learning: In the cloudposse/atmos repository, for UI messages in the toolchain package, use utils.PrintfMessageToTUI instead of log.Error or fmt.Fprintln(os.Stderr, ...). Import pkg/utils with alias "u" to follow the established pattern.
Applied to files:
cmd/root.go
📚 Learning: 2025-12-13T04:37:40.435Z
Learnt from: osterman
Repo: cloudposse/atmos PR: 1686
File: cmd/toolchain/get.go:23-40
Timestamp: 2025-12-13T04:37:40.435Z
Learning: In Go CLI command files using Cobra, constrain the subcommand to accept at most one positional argument (MaximumNArgs(1)) so it supports both listing all items (zero args) and fetching a specific item (one arg). Define and parse flags with a standard parser (e.g., flags.NewStandardParser()) and avoid binding flags to Viper (no viper.BindEnv/BindPFlag). This promotes explicit argument handling and predictable flag behavior across command files.
Applied to files:
cmd/root.gocmd/list/list.gocmd/vendor/vendor.gocmd/vendor/vendor_test.gocmd/list/list_test.go
📚 Learning: 2025-12-21T04:10:29.030Z
Learnt from: osterman
Repo: cloudposse/atmos PR: 1891
File: internal/exec/describe_affected.go:468-468
Timestamp: 2025-12-21T04:10:29.030Z
Learning: In Go, package-level declarations (constants, variables, types, and functions) are visible to all files in the same package without imports. During reviews in cloudposse/atmos (and similar Go codebases), before suggesting to declare a new identifier, first check if it already exists in another file of the same package. If it exists, you can avoid adding a new declaration; if not, proceed with a proper package-level declaration.
Applied to files:
cmd/root.gocmd/list/list.gocmd/vendor/vendor.gocmd/vendor/vendor_test.gocmd/list/list_test.go
📚 Learning: 2025-11-24T17:35:37.209Z
Learnt from: CR
Repo: cloudposse/atmos PR: 0
File: .cursor/rules/atmos-rules.mdc:0-0
Timestamp: 2025-11-24T17:35:37.209Z
Learning: Applies to cmd/**/*.go : Use Cobra's recommended command structure with a root command and subcommands, implementing each command in a separate file under `cmd/` directory
Applied to files:
cmd/vendor/vendor.go
📚 Learning: 2025-11-24T17:35:37.209Z
Learnt from: CR
Repo: cloudposse/atmos PR: 0
File: .cursor/rules/atmos-rules.mdc:0-0
Timestamp: 2025-11-24T17:35:37.209Z
Learning: Applies to cmd/**/*.go : Provide comprehensive help text for all commands and flags, include examples in command help, and follow Go's documentation conventions in Cobra command definitions
Applied to files:
cmd/vendor/vendor.gocmd/vendor/vendor_test.go
📚 Learning: 2025-11-10T03:03:31.505Z
Learnt from: osterman
Repo: cloudposse/atmos PR: 0
File: :0-0
Timestamp: 2025-11-10T03:03:31.505Z
Learning: In the Atmos codebase, commands using the `StandardParser` flag pattern (from pkg/flags) do NOT need explicit `viper.BindPFlag()` calls in their code. The StandardParser encapsulates flag binding internally: flags are registered via `parser.RegisterFlags(cmd)` in init(), and bound via `parser.BindFlagsToViper(cmd, v)` in RunE, which internally calls viper.BindPFlag for each flag. This pattern is used throughout Atmos (e.g., cmd/toolchain/get.go, cmd/toolchain/info.go, cmd/toolchain/install.go, cmd/toolchain/path.go). Do not flag missing viper.BindPFlag calls when StandardParser is used.
Applied to files:
cmd/vendor/vendor.go
📚 Learning: 2024-12-07T16:16:13.038Z
Learnt from: Listener430
Repo: cloudposse/atmos PR: 825
File: internal/exec/helmfile_generate_varfile.go:28-31
Timestamp: 2024-12-07T16:16:13.038Z
Learning: In `internal/exec/helmfile_generate_varfile.go`, the `--help` command (`./atmos helmfile generate varfile --help`) works correctly without requiring stack configurations, and the only change needed was to make `ProcessCommandLineArgs` exportable by capitalizing its name.
Applied to files:
cmd/vendor/vendor.go
📚 Learning: 2025-09-13T16:39:20.007Z
Learnt from: samtholiya
Repo: cloudposse/atmos PR: 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/blog/2026-01-16-vendor-workflow-list-aliases.mdx
📚 Learning: 2025-09-27T20:50:20.564Z
Learnt from: osterman
Repo: cloudposse/atmos PR: 1533
File: pkg/config/load.go:585-637
Timestamp: 2025-09-27T20:50:20.564Z
Learning: In the cloudposse/atmos repository, command merging prioritizes precedence over display ordering. Help commands are displayed lexicographically regardless of internal array order, so the mergeCommandArrays function focuses on ensuring the correct precedence chain (top-level file wins) rather than maintaining specific display order.
Applied to files:
website/blog/2026-01-16-vendor-workflow-list-aliases.mdx
📚 Learning: 2025-11-24T17:35:37.209Z
Learnt from: CR
Repo: cloudposse/atmos PR: 0
File: .cursor/rules/atmos-rules.mdc:0-0
Timestamp: 2025-11-24T17:35:37.209Z
Learning: Applies to **/*_test.go : Include integration tests for command flows and test CLI end-to-end when possible with test fixtures
Applied to files:
cmd/vendor/vendor_test.gocmd/list/list_test.go
📚 Learning: 2025-12-10T18:32:43.260Z
Learnt from: osterman
Repo: cloudposse/atmos PR: 1808
File: cmd/terraform/backend/backend_delete_test.go:9-23
Timestamp: 2025-12-10T18:32:43.260Z
Learning: In cmd subpackages, tests should avoid using NewTestKit(t) unless tests actually interact with RootCmd (e.g., execute commands via RootCmd or modify RootCmd state). For structural tests that only verify command structure/flags without touching RootCmd, TestKit cleanup is unnecessary.
Applied to files:
cmd/vendor/vendor_test.gocmd/list/list_test.go
📚 Learning: 2025-11-11T03:47:59.576Z
Learnt from: osterman
Repo: cloudposse/atmos PR: 1686
File: toolchain/which_test.go:166-223
Timestamp: 2025-11-11T03:47:59.576Z
Learning: In the cloudposse/atmos repo, tests that manipulate environment variables should use testing.T.Setenv for automatic setup/teardown instead of os.Setenv/Unsetenv.
Applied to files:
cmd/vendor/vendor_test.go
📚 Learning: 2026-01-04T00:55:21.720Z
Learnt from: CR
Repo: cloudposse/atmos PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-04T00:55:21.720Z
Learning: PRs labeled `minor` or `major` MUST update `website/src/data/roadmap.js` with shipped milestones, status, changelog link, PR number, and initiative progress percentage
Applied to files:
website/src/data/roadmap.js
🧬 Code graph analysis (3)
cmd/list/list.go (1)
cmd/internal/command.go (1)
CommandAlias(11-31)
cmd/vendor/vendor.go (2)
internal/exec/vendor.go (2)
ExecuteVendorPullCmd(27-31)ExecuteVendorDiffCmd(34-36)pkg/flags/compat/compatibility_flags.go (1)
CompatibilityFlag(33-37)
cmd/vendor/vendor_test.go (1)
cmd/vendor/vendor.go (1)
VendorCommandProvider(70-70)
🪛 LanguageTool
website/blog/2026-01-16-vendor-workflow-list-aliases.mdx
[style] ~17-~17: The adverb ‘now’ was used before in the same sentence. Consider replacing or removing one.
Context: ...list vendor-atmos workflow listis now an alias foratmos list workflows` Bo...
(NOW_REPETITION)
⏰ Context from checks skipped due to timeout of 900000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Acceptance Tests (macos)
- GitHub Check: Acceptance Tests (windows)
- GitHub Check: Summary
🔇 Additional comments (10)
cmd/root.go (1)
65-65: LGTM!The blank import for side-effect registration follows the established pattern used by other command packages in this file. Alphabetical ordering is correct.
cmd/list/list_test.go (1)
277-296: LGTM!Test coverage is thorough. Validates both aliases with appropriate assertions for Subcommand, ParentCommand, Name, Long, and Example fields. Using
assert.Containsfor Long and Example is a good choice—it's flexible enough to survive minor wording changes.website/blog/2026-01-16-vendor-workflow-list-aliases.mdx (2)
8-41: LGTM!Blog post is clear, concise, and accurately documents the new aliases. Code examples demonstrate equivalence well.
1-6: The "enhancement" tag is valid and properly defined inwebsite/blog/tags.yml. The blog post follows all requirements: correct file path format, proper YAML frontmatter, and uses only defined tags. No changes needed.cmd/vendor/vendor.go (4)
1-10: LGTM!Package declaration and imports are clean. Proper grouping with stdlib first, then third-party, then internal packages.
12-19: LGTM!Clear command definition with descriptive Short and Long help text.
FParseErrWhitelistandArgs: cobra.NoArgsare appropriately set.
46-67: LGTM!Flags are well-documented, subcommand wiring is clean, and the registration with the command registry is properly placed in init(). Good call commenting out the unimplemented vendorDiffCmd.
69-110: LGTM!The
VendorCommandProviderimplementation is straightforward and follows the interface contract. Methods are trivial getters/factories, so perf.Track is correctly omitted per guidelines. Documentation comments end with periods as required.cmd/vendor/vendor_test.go (2)
1-8: LGTM!Imports are clean with proper grouping.
21-58: LGTM!Solid coverage of the
VendorCommandProviderinterface. Subtests are well-organized and verify each method's return value correctly. NoNewTestKitneeded here since these tests don't interact withRootCmd.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
Renamed TestVendorCommands_Error to TestVendorPullCmd_ExecutorError and updated the test to pass "unexpected-arg" instead of "--invalid-flag" since calling RunE directly bypasses Cobra's flag parsing. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
The workflow command now shows [command] in help output because it has a subcommand (workflow list alias). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1981 +/- ##
==========================================
+ Coverage 74.91% 74.95% +0.03%
==========================================
Files 777 775 -2
Lines 71333 71355 +22
==========================================
+ Hits 53439 53484 +45
+ Misses 14412 14390 -22
+ Partials 3482 3481 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
💥 This pull request now has conflicts. Could you fix it @osterman? 🙏 |
Resolved conflict in website/src/data/roadmap.js by keeping both entries: - Command aliases for vendor and workflow list (this branch) - Packer directory-based templates (from main) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
These changes were released in v1.204.1-rc.3. |
What
Added bidirectional command aliases so users can use both
atmos vendor listandatmos list vendorinterchangeably, andatmos workflow listandatmos list workflowsinterchangeably. Refactored vendor command to use CommandProvider pattern to support aliases.Why
Users naturally expect list commands under the parent command (e.g.,
atmos vendor list), while Atmos organizes all list commands underatmos list. This bidirectional aliasing improves discoverability and follows the existing pattern used foratmos list themes↔atmos theme list. Demo tapes can now use intuitive command forms.References
Related to demo tape cleanup where
atmos vendor listandatmos workflow listwere changed tocat vendor.yamlandatmos describe workflowsrespectively due to missing commands.Summary by CodeRabbit
New Features
atmos vendor list↔atmos list vendorandatmos workflow list↔atmos list workflows.vendorcommand withpullanddiffsubcommands (with their flags).Bug Fixes / UX
workflow [command]indicating it accepts subcommands.Refactor
✏️ Tip: You can customize this high-level summary in your review settings.