Logs that look great in your terminalβand make sense in your CI.
Most loggers are backend-first or just sad console.log()
clones. devlogr
isnβt.
This is structured logging with styleβbuilt for dev tools, task runners, release scripts, and CLI utilities that actually run in terminalsβeither locally or in CI pipelines.
No brittle hacks. No bland output. Just focused feedback, clean visuals, useful context, and a pinch of personality.
npm install @neofork/devlogr
import { createLogger } from '@neofork/devlogr';
const log = createLogger('my-cli');
log.title('π§ Setup');
log.info('Starting process');
log.success('Complete!');
log.startSpinner('Working...');
log.updateSpinnerText('Still going...');
log.completeSpinnerWithSuccess('All done!');
DevLogr is built for terminal lifeβsmart, sharp, and ready to adapt without extra setup.
DEVLOGR_LOG_LEVEL
(e.g., debug
, info
, warn
, error
).DevLogr just worksβbeautiful in your terminal, clear in your CI, and quiet when it should be.
log.error('Something broke');
log.warning('This might be an issue');
log.info('FYI');
log.debug('Debugging info');
log.success('It worked!');
log.task('Running something...');
log.title('π Deployment Phase');
log.plain('No formatting here.');
DevLogr features a powerful spinner system for both simple and complex tasks, powered by Listr2.
log.startSpinner('Loading...');
log.updateSpinnerText('Still loading...');
log.succeedSpinner('Loaded');
log.failSpinner('Failed');
log.completeSpinnerWithSuccess('Mission accomplished');
import { Logger } from '@neofork/devlogr';
import { ListrTask } from 'listr2';
const logger = new Logger('Deploy');
const deploymentTasks: ListrTask[] = [
{
title: 'Installing dependencies',
task: async (ctx, task) => {
task.output = 'Downloading packages...';
await new Promise(resolve => setTimeout(resolve, 1000));
task.output = 'Resolving dependencies...';
await new Promise(resolve => setTimeout(resolve, 1000));
},
},
{
title: 'Database operations',
task: () =>
logger.createTaskList([
{
title: 'Creating tables',
task: async () => await new Promise(resolve => setTimeout(resolve, 800)),
},
{
title: 'Seeding data',
task: async (ctx, task) => {
task.output = 'Inserting records...';
await new Promise(resolve => setTimeout(resolve, 600));
},
},
]),
},
{
title: 'Running tests',
task: async (ctx, task) => {
task.output = 'All tests passed';
await new Promise(resolve => setTimeout(resolve, 1200));
},
},
];
// Run sequential tasks
await logger.runTasks('Deployment Process', deploymentTasks);
// Run concurrent tasks
await logger.runTasks('Quality Checks', qualityTasks, { concurrent: true });
For more advanced examples including concurrent execution, nested hierarchies, error handling, and complex workflows, see the examples directory.
Want to see DevLogr in action? Check out:
listr2
Run with:
npm run example:<name>
See examples/README.md for full list.
Auto-generated docs available at: https://neoforkdev.github.io/devlogr/
/latest/
/v0.0.1/
Generate locally:
npm run docs # generate docs
npm run docs:serve # serve locally
Configure behavior via env vars:
Variable | Description | Example |
---|---|---|
DEVLOGR_LOG_LEVEL |
Minimum log level (debug , etc.) |
debug |
DEVLOGR_OUTPUT_JSON |
Structured JSON logs | true |
DEVLOGR_SHOW_TIMESTAMP |
Show timestamps | true /iso |
DEVLOGR_SHOW_PREFIX |
Show level prefixes & logger name | true |
DEVLOGR_SHOW_COLOR |
Enable colors | true |
DEVLOGR_SHOW_EMOJI |
Enable emojis | true |
DEVLOGR_SHOW_UNICODE |
Enable Unicode symbols | true |
DEVLOGR_SHOW_ICONS |
Show all icons | true |
DEVLOGR_DISABLE_CI_DETECTION |
Disable automatic CI optimization | true |
NO_COLOR , NO_EMOJI , NO_UNICODE |
Global disable standards | 1 |
MIT β Use, modify, and share as you like.
Pull requests welcome! Tests required, style friendly, opinions optional.