I wrote a blog post about it recently https://emacsredux.com/blog/2021/04/07/run-shell-commands-from-the-minibuffer/ 🙂