README
¶
list-versions
A version-declaration inventory CLI for getting a "bird's-eye view when planning upgrades."
It lists, in a single command, the current state of the areas Dependabot doesn't touch (language runtimes / IaC resources / CI tools / managed services). Application-level direct dependencies are also supported, opt-in via --deps.
Install
go install github.com/KazuyaMiyagi/list-versions/cmd/list-versions@latest
For a Brewfile:
go "github.com/KazuyaMiyagi/list-versions/cmd/list-versions"
Usage
# list everything under the current directory
list-versions
# pass multiple paths (expanded by the shell glob)
list-versions ~/src/github.com/*/
# emit as CSV / JSON
list-versions --format csv
list-versions --format json
# filter by TYPE (glob supported)
list-versions --type Ruby
list-versions --type 'Lambda,RDS,Aurora'
list-versions --type 'gem:rails*'
# change the sort keys (column order follows)
list-versions --sort type,version,directory,file
# include application-level direct dependencies (Gemfile/package.json/... and each lockfile)
list-versions --deps
# add directories to exclude
list-versions --exclude .venv,tmp
Detected sources
Language runtimes / tool versions
.python-version/.ruby-version/.node-version/.terraform-version/.go-version/.openapi-generator-version/.bun-version, and the.X-versionfamily in general.nvmrc/.tool-versions(asdf / mise)package.jsonengines.{node,npm,pnpm,yarn,bun}andpackageManager(corepack)- the
ruby "..."directive inGemfile BUNDLED WITHinGemfile.lock(Bundler)requires-python/ Poetry'spythoninpyproject.toml
Containers
FROM image:tag[@sha256:...]inDockerfile/Dockerfile.*(ARG NAME=defaultis also resolved)- Kubernetes manifests (container & initContainer images on
Pod/Deployment/StatefulSet/DaemonSet/ReplicaSet/Job/CronJob) - Helm Chart
Chart.yaml(version/appVersion) +image.taginvalues.yaml
Terraform
terraform { required_version }/required_providers/ moduleversion- AWS resource attributes:
- Lambda runtime (
aws_lambda_function.runtime,aws_lambda_layer_version.compatible_runtimes) - RDS / Aurora (
aws_db_instance.engine_version,aws_rds_cluster.engine_version) - ElastiCache (
aws_elasticache_*Redis / Memcached / Valkey) - OpenSearch (
aws_opensearch_domain.engine_version) - EKS (
aws_eks_cluster.version,aws_eks_node_group.release_version) - ECS (
aws_ecs_task_definition.container_definitions) - App Runner (
aws_apprunner_service.source_configuration.image_repository.image_identifier) - AMI (
aws_instance.ami,aws_launch_template.image_id)
- Lambda runtime (
- GCP resource attributes:
- Cloud Run v2 (Service / Job / Gen1) container image
- Cloud Functions (
google_cloudfunctions_function,google_cloudfunctions2_function.build_config.runtime) - App Engine (
google_app_engine_*_app_version.runtime) - Cloud SQL (
google_sql_database_instance.database_version) - Compute (
google_compute_instance.boot_disk.initialize_params.image)
CloudFormation
Resources.*.Properties.{Runtime, EngineVersion, Version, ReleaseVersion, ...}in YAML / JSON (Lambda / SAM / RDS / Aurora / ElastiCache / OpenSearch / EKS)
Serverless Framework
provider.runtime/functions.*.runtimeinserverless.yml
CI
- in
.github/workflows/*.{yml,yaml}:uses: foo/bar@ref(the# v4.2.2comment on a SHA pin is preserved)with: *-version/*-version-file/ theversionof setup-style actions${{ env.X }}/${{ matrix.X }}resolution (matrix is expanded into rows as a cross product)
Application dependencies (opt-in via --deps)
| Ecosystem | Manifest | Lockfile |
|---|---|---|
| Ruby | Gemfile |
Gemfile.lock |
| npm | package.json (deps / devDeps) |
package-lock.json / yarn.lock / pnpm-lock.yaml / bun.lock |
| Python | pyproject.toml (PEP 621 / Poetry) / Pipfile / requirements.txt |
poetry.lock / Pipfile.lock / uv.lock |
| Rust | Cargo.toml |
Cargo.lock |
| Go | — | go.mod (actual versions, // indirect excluded) |
| PHP | composer.json |
composer.lock |
| Elixir | mix.exs |
mix.lock |
Output
The default is a table:
┌──────────────┬───────────────┬─────────┬─────────┐
│ DIRECTORY │ FILE │ TYPE │ VERSION │
├──────────────┼───────────────┼─────────┼─────────┤
│ myapp │ .ruby-version │ Ruby │ 3.4.9 │
│ myapp │ .node-version │ Node.js │ 24.13.0 │
│ myapp/worker │ .node-version │ Node.js │ 25.9.0 │
└──────────────┴───────────────┴─────────┴─────────┘
--format csv / --format json produce the other formats. With --sort, the column order and sort keys move together.
Limitations
- Bun's binary lockfile (
bun.lockb) is unsupported. Onlybun.lock(text) is supported. - CloudFormation short-form intrinsics (
!Ref X, etc.) leak through as values because yaml.v3 discards the tag information. The long formRef: Xis skipped correctly. - Helm
values.yamlis only read for a simple top-levelimage.tag(sub-charts and multiple images are unsupported). - Dynamic env set via
$GITHUB_ENV(echo X=Y >> $GITHUB_ENV) can't be analyzed statically, so it's left as an expression. - Terraform
Lambda@Edgedetection only works when it's self-contained within the same module directory (cross-module is unsupported).
Release
Releases are driven by pushing a semver tag: GitHub Actions (.github/workflows/release.yml) runs GoReleaser and automatically creates the per-OS/arch binaries and the GitHub Release.
git tag v0.1.0
git push origin v0.1.0
Once the tag is pushed to GitHub, the following are attached to the Release:
- binary archives for
darwin/amd64,darwin/arm64,linux/amd64,linux/arm64,windows/amd64,windows/arm64 checksums.txt- a changelog (Conventional Commits based)
Users can also just install it via go install ...@vX.Y.Z.
License
MIT