Ansifilter handles text files containing ANSI terminal escape codes.
conda install conda-forge::ansifilter