Formatting code in .wl and .m files from the command-line?

I use an external editor (Sublime Text) to edit my .wl and .m files and run them with WolframKernel from the command line. This means everything I do is outside of Mathematica. Is there a way I can format a file using something like the official code formatter where I input the code in the file through the command line as standard input and receive the formatted text as standard output (something like cat /my/file.wl | formatting_util)? Thanks for reading.