To just use the command on Windows (without giving a path to the encoder), you’ll need to have installed the Lame or FFmpeg binaries in their default location in “Program Files” so as to create a Windows registry setting that Audacity will look for as the location of the encoder.
Here are a couple of examples with FFmpeg.
This exports a file with the codec forced to Nellymoser Asao, so for example you might want to use .flv extension for the format to export to in Audacity’s “Export File” window:
ffmpeg -i - -acodec nellymoser "%f"
This exports a file forcing the file to a 256 kbps mp2, using FFmpeg from an arbitrary location of your choice (ensure the path has quotes around it if it includes spaces as it does here):
"E:FFmpeg for Audacityffmpeg.exe" -i - -acodec mp2 -ab 256000 "%f"
I’d be interested to know if command-line exporting works on Mac. /src/export/ExportCL.cpp suggests the code does not work on Windows or Mac, but I expect it does.