dur-cli is a CLI tool that helps you show total duration of media files on your computer, and also YouTube playlist duration.
npm i -g dur-cli
dur --pl PLAYLIST_ID_OR_URL
but first, have your own Google API key by following this very short tutorial here: https://youtu.be/Jl9Nitf8PJs
to view all options, type
For a live demo, watch this video https://youtu.be/JKXq7reTbAM
Source code: https://github.com/roktcode/duration-cli