pretty-cli-logger
v1.1.0
Published
Zero-dependency colorful CLI logger
Readme
Pretty CLI Logger 🌈⏱️
A zero-dependency, minimalist CLI logger with colorful output and smart terminal color detection. Perfect for CLI tools, scripts, and devops pipelines!
Features ✨
- 🎨 Automatic color detection: Colors only appear in TTYs (no messy escape codes in logs!).
- ⏱️ Precise UTC timestamps down to milliseconds.
- 📦 Zero dependencies: Won’t bloat your project.
- 🔥 Simple API: Just
logInfo(),logWarn(),logErr(),logDebug().
Installation 📦
npm i pretty-cli-logger
# Or pnpm
pnpm add pretty-cli-logger
# Or Yarn
yarn add pretty-cli-loggerUsage 🚀
import * from "pretty-cli-logger"
logInfo("System check passed") // Green label
logWarn("Low disk space") // Yellow label
logErr("Failed to connect to DB") // Red label
logDebug("Cache miss for user:123") // Gray labelNotes 📝
- Colors use ANSI escape codes (supported by most modern terminals).
- Timestamps are in UTC for consistency across timezones.
- Want to disable colors? Set NO_COLOR=1 in your environment.
