Capture and simultaneously display and save CLI command output to multiple destinations with filtering
- Capture stdout and stderr separately or combined from piped input or wrapped commands
- Write output to multiple files simultaneously while displaying in terminal
- Filter output lines using regex patterns (include or exclude modes)
- Add configurable timestamps to each line (RFC3339, Unix, relative)
- Preserve terminal colors in display while writing clean text to files
- Support for appending to existing files or overwriting
- Separate file destinations for stdout vs stderr
- Line buffering to ensure real-time output display
- Exit with the same code as the wrapped command
Use this project when you need to:
- Quickly solve problems related to stdout-tee
- Integrate go functionality into your workflow
- Learn how go handles common patterns
# Clone the repository
git clone https://github.com/KurtWeston/stdout-tee.git
cd stdout-tee
# Install dependencies
go build./main- go
github.com/spf13/cobragithub.com/fatih/color
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.