#tee #unix #ansi

app ctee

Unix's tee with stripping of ANSI-colors

2 unstable releases

0.2.0 Jul 22, 2023
0.1.0 Feb 1, 2022

#39 in #tee

MIT license

6KB
55 lines

ctee

Github Actions Crates.io Crate Downloads MIT License

Rust implementation of Unix's tee with stripping of ANSI colors.

Installation

Use the crate published on crates.io:

cargo install --locked ctee

OR manually clone and install the latest version:

git clone https://github.com/Lipen/ctee
cd ctee
cargo install --path .

Usage

$ ctee --help

Read from STDIN and write to STDOUT (unchanged) and FILES (without ANSI-colors)

USAGE:
    ctee [OPTIONS] [FILES]...

ARGS:
    <FILES>...    Output files

OPTIONS:
    -a, --append                     Append to the given files instead of overwriting
        --bs <BUFFER_SIZE>           Buffer size [default: 8192]
    -h, --help                       Print help information
        --strip-ansi <STRIP_ANSI>    Strip ANSI color codes when writing to files [default: true]
    -V, --version                    Print version information

EXAMPLES:
    <command-with-colorized-output> | ctee my.log

Credits

@shepmaster for the code of Rust implementation of tee.

Dependencies

~3.5MB
~66K SLoC