Command line utility to record command environments and output