Colored print utility for bash scripts. Simple, lightweight, and easy to use.
brew tap riesenia/utils
brew install rprintrprint <type> <message>info- Blue info messagesuccess- Green success messageerror- Red error message (outputs to stderr)warning- Yellow warning messagedebug- Cyan debug message (only shown ifDEBUG=1)
rprint info "Starting process..."
rprint success "Process completed!"
rprint error "Something went wrong"
rprint warning "This is a warning"
DEBUG=1 rprint debug "Debug information"#!/bin/bash
rprint info "Downloading files..."
curl -O https://example.com/file.tar.gz
if [ $? -eq 0 ]; then
rprint success "Download completed"
else
rprint error "Download failed"
exit 1
fi
rprint warning "Don't forget to verify the file"