tldr: $ mix deps phoenix phoenix_live_view
* phoenix 1.8.2 (Hex package) (mix)
locked at 1.8.2 (phoenix) 19ea65b4
ok
* phoenix_live_view 1.1.18 (Hex package) (mix)
locked at 1.1.18 (phoenix_live_view) f189b759
ok
Use Case 1
When reporting bugs to library maintainers, users are often asked to provide versions of specific dependencies (e.g., "What version of Phoenix and LiveView are you using?"). Currently, the way to get this information via Mix is to run `mix deps` and search through potentially dozens of dependencies.
mix deps | grep -w 'phoenix\|phoenix_live_view'
The above is less memorable, more daunting to less experienced developers, and unintentionally omits part of the output.
The proposed improvement would make it so that one could print only the specified dependencies with their versions and status:
mix deps phoenix phoenix_live_view
Use Case 2
CLI and "Agentic" workflows benefit from generic tools that LLM-based agents can use to build up context.
Recently, in Elixir v1.19, `mix help` has been improved to allow printing documentation for modules and functions directly from the command line, motivated in part by empowering agents without dependencies on MCP and other tools.
Being able to print the current versions of a single package or a few related packages could also be leveraged by agents and tools.
The filtering by passing positional arguments directly mirrors established patterns from package managers (`dnf info pkg1 pkg2`, `apt show pkg1 pkg2`) and fits Mix's existing conventions where positional args specify targets, e.g. in `mix deps.tree` and `mix deps.unlock`.
If accepted, the proposal implementation would entail tests and documentation, plus a small number of lines in lib/mix/lib/mix/tasks/deps.ex. I volunteer to submit a PR.
Thanks,
Rodolfo Carvalho