Read composer.lock Directly: A 1000-Line CLI That Beats composer show --tree

php dev.to

Read composer.lock Directly: A 1000-Line CLI That Beats composer show --tree You inherit a PHP project with 80 packages in composer.lock and no idea why any of them are there. composer show --tree helps, but its output is hard to paste, hard to filter, and hard to put in a PR. I wanted something I could pipe — tree for humans, DOT for SVGs, Mermaid for GitHub Markdown. Turns out composer.lock is a documented JSON file, and a small CLI that reads it directly is about 1000 lines of PHP

Read Full Tutorial open_in_new
arrow_back Back to Tutorials