Leprechaun CLI Logger

1.0.0 · active · verified Sun Apr 19

Leprechaun is a specialized logging utility designed for command-line interface (CLI) applications, providing simple, lightweight, and visually distinct output. It offers `info`, `success`, `warning`, and `error` functions, each prepending messages with appropriate colored icons, enhancing readability and user experience in console environments. The package is currently at version 1.0.0, having recently migrated to TypeScript, which indicates a focus on type safety and maintainability. Its release cadence is not yet established, with 1.0.0 being the first major stable release. A key differentiator is its emphasis on aesthetics and a minimal API, making it easy to integrate for developers who prioritize clear, color-coded CLI feedback without extensive configuration.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to import and use all four primary logging functions (`info`, `success`, `warning`, `error`) to display diverse messages with appropriate colorful icons in a CLI application.

import { info, success, warning, error } from 'leprechaun';

const project = 'MyCLIApp';
const version = '1.0.0';
const featureEnabled = true;

info('Starting', project, 'v' + version);
success('Configuration loaded:', featureEnabled ? 'enabled' : 'disabled');
warning('Check for updates recommended for', project);
error('Failed to connect to service. Retrying...');

view raw JSON →