Skip to content

feat(version): add --short flag to print version number without banner#2174

Open
Copilot wants to merge 6 commits intomainfrom
copilot/add-atmos-version-info
Open

feat(version): add --short flag to print version number without banner#2174
Copilot wants to merge 6 commits intomainfrom
copilot/add-atmos-version-info

Conversation

Copy link
Contributor

Copilot AI commented Mar 12, 2026

atmos version always emits the ASCII art banner and alien icon, making it cumbersome to extract just the version string in scripts or CI pipelines.

Changes

Core

  • --short / -s flag on atmos version: prints only the version number to stdout, no banner, no update check
  • --format plain: underlying format that --short maps to; explicitly valid alongside existing json/yaml
  • Update check skipped for plain format (avoids unnecessary GitHub API call)
  • ATMOS_VERSION_SHORT env var for parity with other flags

Docs & Changelog

  • Updated website/docs/cli/commands/version/usage.mdx with --short and --format plain docs
  • Blog post: website/blog/2026-03-12-version-short-flag.mdx
  • Roadmap entry in DX initiative (website/src/data/roadmap.js)

Usage

# Before: awkward and fragile
ATMOS_VER=$(atmos version | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1)

# After: clean and direct
ATMOS_VER=$(atmos version --short)

All three are equivalent:

atmos version --short
atmos version -s
atmos version --format plain

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@mergify mergify bot added triage Needs triage wip Work in Progress: Not ready for final review or merge labels Mar 12, 2026
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>
Copilot AI changed the title [WIP] Add functionality to return atmos version information feat(version): add --short flag to print version number without banner Mar 12, 2026
@mergify mergify bot removed the wip Work in Progress: Not ready for final review or merge label Mar 12, 2026
@nitrocode nitrocode added minor New features that do not break anything and removed triage Needs triage labels Mar 12, 2026
@github-actions
Copy link

Warning

Release Documentation Required

This PR is labeled minor or major and requires documentation updates:

  • Changelog entry - Add a blog post in website/blog/YYYY-MM-DD-feature-name.mdx
  • Roadmap update - Update website/src/data/roadmap.js with the new milestone

Alternatively: If this change doesn't require release documentation, remove the minor or major label.

1 similar comment
@github-actions
Copy link

Warning

Release Documentation Required

This PR is labeled minor or major and requires documentation updates:

  • Changelog entry - Add a blog post in website/blog/YYYY-MM-DD-feature-name.mdx
  • Roadmap update - Update website/src/data/roadmap.js with the new milestone

Alternatively: If this change doesn't require release documentation, remove the minor or major label.

Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>
@github-actions github-actions bot added the size/m Medium size PR label Mar 12, 2026
@github-actions
Copy link

github-actions bot commented Mar 12, 2026

Dependency Review

✅ No vulnerabilities or license issues found.

Scanned Files

None

@codecov
Copy link

codecov bot commented Mar 12, 2026

Codecov Report

❌ Patch coverage is 61.29032% with 12 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@38bbe99). Learn more about missing BASE report.

Files with missing lines Patch % Lines
internal/exec/version.go 47.82% 9 Missing and 3 partials ⚠️

❌ Your patch check has failed because the patch coverage (61.29%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2174   +/-   ##
=======================================
  Coverage        ?   77.19%           
=======================================
  Files           ?     1013           
  Lines           ?    95743           
  Branches        ?        0           
=======================================
  Hits            ?    73911           
  Misses          ?    17656           
  Partials        ?     4176           
Flag Coverage Δ
unittests 77.19% <61.29%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
cmd/version/version.go 79.59% <100.00%> (ø)
internal/exec/version.go 72.72% <47.82%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@osterman
Copy link
Member

Before: awkward and fragile

ATMOS_VER=$(atmos version | grep -oE '[0-9]+.[0-9]+.[0-9]+' | head -1)

I assert this is the wrong conclusion. This has already been solved, and I think it's based on an outdated version of Atmos.

When using atmos in a headless mode or no TTY (such as in pipelining), it only displays the simple version.

@copilot please confirm.

Copy link
Contributor Author

Copilot AI commented Mar 12, 2026

Before: awkward and fragile

ATMOS_VER=$(atmos version | grep -oE '[0-9]+.[0-9]+.[0-9]+' | head -1)
...

Confirmed and tested. In no-TTY/headless mode (e.g., piped), atmos version skips the figurine ASCII art banner but still outputs the full version line:

👽 Atmos 1.96.0 on linux/amd64

The --short flag outputs only the bare version number:

1.96.0

These are distinct. The headless mode output is not machine-parseable without a grep workaround (emoji + OS/arch included), which is exactly the use-case --short solves.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/cloudposse/atmos/releases/latest
    • Triggering command: /tmp/atmos-test /tmp/atmos-test version h-UfUHJtdk8lCD2w9JRv/h-UfUHJtdk8lCD2w9JRv l/linux_amd64/compile go1.26.0 -c=4 -nolocalimports -importcfg /tmp/go-build496681250/b2361/importcfg -pack /home/REDACTED/go/pkg/mod/github.com/tliron/glsp@v0.2.2/server/handle.go /home/REDACTED/go/pkg/mod/github.com/tliron/glsp@v0.2.2/server/logging.go -o ion.go .go ux-amd64/pkg/tool/linux_amd64/compile -p /afero/mem mpile ux-amd64/pkg/too-trimpath (http block)
    • Triggering command: /tmp/atmos-test /tmp/atmos-test version JMCAf4cRCzfsinOvE1dU/JMCAf4cRCzfsinOvE1dU l/linux_amd64/compile go1.26.0 -c=4 -nolocalimports -importcfg /tmp/go-build496681250/b2378/importcfg -pack /home/REDACTED/go/pkg/mod/github.com/segmentio/encoding@v0.5.3/json/codec.go /home/REDACTED/go/pkg/mod/github.com/segmentio/encoding@v0.5.3/json/decode.go -o f.go o-v2/service/bedoras.land/oras-go/v2/internal/graph ux-amd64/pkg/tool/linux_amd64/compile esolvers.go mote/transport mpile ux-amd64/pkg/too-trimpath (http block)
  • us.i.posthog.com
    • Triggering command: /tmp/atmos-test /tmp/atmos-test version h-UfUHJtdk8lCD2w9JRv/h-UfUHJtdk8lCD2w9JRv l/linux_amd64/compile go1.26.0 -c=4 -nolocalimports -importcfg /tmp/go-build496681250/b2361/importcfg -pack /home/REDACTED/go/pkg/mod/github.com/tliron/glsp@v0.2.2/server/handle.go /home/REDACTED/go/pkg/mod/github.com/tliron/glsp@v0.2.2/server/logging.go -o ion.go .go ux-amd64/pkg/tool/linux_amd64/compile -p /afero/mem mpile ux-amd64/pkg/too-trimpath (dns block)
    • Triggering command: /tmp/atmos-test /tmp/atmos-test version JMCAf4cRCzfsinOvE1dU/JMCAf4cRCzfsinOvE1dU l/linux_amd64/compile go1.26.0 -c=4 -nolocalimports -importcfg /tmp/go-build496681250/b2378/importcfg -pack /home/REDACTED/go/pkg/mod/github.com/segmentio/encoding@v0.5.3/json/codec.go /home/REDACTED/go/pkg/mod/github.com/segmentio/encoding@v0.5.3/json/decode.go -o f.go o-v2/service/bedoras.land/oras-go/v2/internal/graph ux-amd64/pkg/tool/linux_amd64/compile esolvers.go mote/transport mpile ux-amd64/pkg/too-trimpath (dns block)
    • Triggering command: /tmp/atmos-test /tmp/atmos-test version --short l/linux_amd64/compile go1.26.0 -c=4 -nolocalimports -importcfg /tmp/go-build496681250/b2395/importcfg -pack /home/REDACTED/go/pkg/mod/github.com/yosida95/uritemplate/v3@v3.0.2/compile.go /home/REDACTED/go/pkg/mod/github.com/yosida95/uritemplate/v3@v3.0.2/equals.go 6812�� s.go r.go ux-amd64/pkg/tool/linux_amd64/compile s.pb.go tier/go-toml/v2/-o mpile ux-amd64/pkg/too-trimpath (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@osterman
Copy link
Member

@copilot fix tests

Copy link
Contributor Author

Copilot AI commented Mar 13, 2026

@osterman The model claude-sonnet-4.6 is not available for your account. This can happen if the model was disabled by your organization's policy or if your Copilot plan doesn't include access to it.

You can try again without specifying a model (just @copilot) to use the default, or choose a different model from the model picker.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: aa80ad16-cb72-430b-a58b-a1a3e2ae36d6

@nitrocode
Copy link
Member

@copilot fix tests

Copy link
Contributor Author

Copilot AI commented Mar 13, 2026

@copilot fix tests

The CI failure in the "Tests" run was an infrastructure issue — the macOS runner hit a 502 when downloading OpenTofu, unrelated to the code changes. All version-related unit tests pass locally (cmd/version and internal/exec).

@copilot fix tests

The CI failure was a transient infrastructure issue (502 when downloading OpenTofu on the macOS runner), not a code test failure. All version-related tests pass locally.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • checkpoint-api.hashicorp.com
    • Triggering command: /usr/local/bin/packer /usr/local/bin/packer version -stringintconv l/linux_amd64/vet /tmp/go-build4185811081/b1986/vet.cfg n/gomplate/v4@v4-errorsas n/gomplate/v4@v4-ifaceassert ux-amd64/pkg/tool/linux_amd64/vet /cert.pb.go /cert.pb.validat-atomic mpile ux-amd64/pkg/too-buildtags -o kg_.a om/aws/aws-sdk-g-ifaceassert ux-amd64/pkg/tool/linux_amd64/vet ne.go mote/errcode mpile ux-amd64/pkg/too-buildtags (dns block)
  • https://api.github.com/rate_limit
    • Triggering command: /tmp/go-build4185811081/b001/version.test /tmp/go-build4185811081/b001/version.test -test.testlogfile=/tmp/go-build4185811081/b001/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true kg_.a mpile ux-amd64/pkg/tool/linux_amd64/vet -unreachable=fal/home/REDACTED/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.26.0.linux-amd64/pkg/too-buildtags xds/go/xds/type/-atomic mpile ux-amd64/pkg/too-buildtags -o Os-FdT_oP g/pro/api_client-ifaceassert ux-amd64/pkg/tool/linux_amd64/vet -p g/grpc/xds mpile ux-amd64/pkg/too-buildtags (http block)
  • https://api.github.com/repos/cloudposse/atmos/releases
    • Triggering command: /tmp/go-build4185811081/b001/version.test /tmp/go-build4185811081/b001/version.test -test.testlogfile=/tmp/go-build4185811081/b001/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true kg_.a mpile ux-amd64/pkg/tool/linux_amd64/vet -unreachable=fal/home/REDACTED/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.26.0.linux-amd64/pkg/too-buildtags xds/go/xds/type/-atomic mpile ux-amd64/pkg/too-buildtags -o Os-FdT_oP g/pro/api_client-ifaceassert ux-amd64/pkg/tool/linux_amd64/vet -p g/grpc/xds mpile ux-amd64/pkg/too-buildtags (http block)
  • https://api.github.com/repos/cloudposse/atmos/releases/latest
    • Triggering command: /tmp/go-build4185811081/b001/version.test /tmp/go-build4185811081/b001/version.test -test.testlogfile=/tmp/go-build4185811081/b001/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true kg_.a mpile ux-amd64/pkg/tool/linux_amd64/vet -unreachable=fal/home/REDACTED/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.26.0.linux-amd64/pkg/too-buildtags xds/go/xds/type/-atomic mpile ux-amd64/pkg/too-buildtags -o Os-FdT_oP g/pro/api_client-ifaceassert ux-amd64/pkg/tool/linux_amd64/vet -p g/grpc/xds mpile ux-amd64/pkg/too-buildtags (http block)
  • https://api.github.com/repos/cloudposse/atmos/releases/tags/v1.63.0
    • Triggering command: /tmp/go-build4185811081/b001/version.test /tmp/go-build4185811081/b001/version.test -test.testlogfile=/tmp/go-build4185811081/b001/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true kg_.a mpile ux-amd64/pkg/tool/linux_amd64/vet -unreachable=fal/home/REDACTED/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.26.0.linux-amd64/pkg/too-buildtags xds/go/xds/type/-atomic mpile ux-amd64/pkg/too-buildtags -o Os-FdT_oP g/pro/api_client-ifaceassert ux-amd64/pkg/tool/linux_amd64/vet -p g/grpc/xds mpile ux-amd64/pkg/too-buildtags (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI requested a review from nitrocode March 13, 2026 04:17
@nitrocode nitrocode marked this pull request as ready for review March 15, 2026 04:24
@nitrocode nitrocode requested a review from a team as a code owner March 15, 2026 04:24
Copilot AI added a commit that referenced this pull request Mar 17, 2026
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>
@mergify
Copy link

mergify bot commented Mar 20, 2026

💥 This pull request now has conflicts. Could you fix it @Copilot? 🙏

@mergify mergify bot added conflict This PR has conflicts and removed conflict This PR has conflicts labels Mar 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

minor New features that do not break anything size/m Medium size PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants