Need cmd.exe/DOS dir replacement for Python development

What should it do that’s different from dir?

What do you mean by “compact”?

Depending on your requirements:

dir /w

Install WSL and use linux command line tools.

Otherwise write a python script that does exactly what you want.