npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@snailicid3/logger

v0.1.0

Published

Unified Node logger with Ansis terminal output and a shell adapter

Downloads

370

Readme

@snailicid3/logger 🐌

npm license code style: prettier

Structured logging, terminal helpers, tables, spinners, and a shell adapter for Node.js CLIs.


TypeScript Node.js Zod

Repository

Author

👤 Gillian Tunney

Recommended package manager: pnpm

pnpm

@snailicid3/logger 🐌


Structured logging, terminal presentation helpers, tables, spinners, and the snail-sh adapter for Node.js command-line tools.

Release status: npm currently serves @snailicid3/[email protected]. The implementation and ownership migration in this checkout are complete but have not been released yet; this repository consumes the local workspace package until the next release is prepared.

Installation

pnpm add @snailicid3/logger

The root entry point supports ESM imports and CommonJS require. The package also exposes a demo entry point and one executable:

| Entry | Format | Purpose | | ------------------------- | ---------------- | -------------------------------------------------------- | | @snailicid3/logger | ESM and CommonJS | Logger, formatting, spinner, table, and terminal helpers | | @snailicid3/logger/demo | ESM | Runnable presentation demos | | snail-sh | Node executable | Shell-friendly adapter over the terminal helpers |

Level logger

getLogger() returns a functional logger with trace, debug, info, warn, error, and fatal methods. Set level: 'silent' to suppress output.

import { getLogger } from '@snailicid3/logger'

const log = getLogger({
  colors: {
    error: '#ff4d6d',
    info: 'cyan',
    warn: 'yellow',
  },
  level: 'debug',
  name: 'release',
  time_stamp: true,
})

log.info('Preparing packages')
log.debug({ packageCount: 8 })
log.warn('Workspace is dirty')
log.error('Publish failed')

Color values are ordinary strings. Ansis palette names, valid CSS color names, and hex colors are accepted. parseHexColor() is available when strict color parsing is useful.

Terminal presentation

The named terminal helpers build strings instead of writing implicitly, so callers decide where and when output is displayed.

import { header, section, statusPair, table } from '@snailicid3/logger'

console.log(header('Release check', { style: 'cyan', width: '80%' }))
console.log(section('Packages'))
console.log(statusPair('logger', 'passed', { level: 'success' }))
console.log(
  table(
    [
      ['logger', '0.0.6', 'ready'],
      ['workspace', '0.0.0', 'private'],
    ],
    { head: ['Package', 'Version', 'Status'], preset: 'header' },
  ),
)

The presentation surface includes:

  • layout helpers: block, rule, line, spacer, header, section, subheader, and step
  • report helpers: kvPair, statusPair, table, kabob, and its kebab alias
  • color helpers: styleText, GREY, GRAY, greyRamp, and grayRamp
  • width helpers: resolveWidth, visibleLength, and stripAnsi
  • value formatting: fmt, formatArgs, formatValue, and prettify

Spinners

import { createSpinner } from '@snailicid3/logger'

const spinner = createSpinner('Building packages')
spinner.start()
spinner.setText('Packing artifacts')
spinner.persist('Artifacts ready')

A spinner can finish with succeed(), fail(), warn(), info(), or persist(). Its status property records the last state. createProgressBar() remains as a compatibility alias for createSpinner().

Shell adapter

snail-sh normalizes hyphenated and underscored action names, then validates positional arguments with Zod.

pnpm exec snail-sh success "Build passed"
pnpm exec snail-sh status-pair "lint-staged" "passed" "success"
pnpm exec snail-sh kabob "🐌 Running tests" "90%" "magenta" "true"
pnpm exec snail-sh gray-ramp " " 3

Supported actions include created, critical, die, error, gray-ramp, header, info, kabob, kv-pair, line, log, rule, section, skipped, spacer, status-pair, step, subheader, success, and warning.

Known Doctor fixtures

The runtime ESM and CommonJS named exports currently load successfully. Some declaration and package-contract drift is deliberately retained as input for the read-only Doctor:

  • the root export map has import and require branches but no explicit types condition
  • API Extractor reports forgotten supporting exports used by public types
  • both bundled declarations in dist/ and the separate types/ tree are packed
  • the root build is classified as universal even though the current implementation reaches node:util

These are expected findings, not an invitation for Doctor to mutate the package. Do not normalize them incidentally; the fixture IDs and retirement rules live in the architecture/refactor plan. They do not keep the logger implementation phase open. Unregistered export problems remain ordinary bugs.

The current Doctor MVP reports EXP-LOGGER-001. API-report, packed-declaration, and runtime-intent collectors remain later slices for the other three logger fixtures.

Release rehearsal

The shared candidate baseline is 68ab0564b2dc0f23b3ce3424beeb12225941c13d. Before releasing the completed checkout changes:

  • record a logger changeset/version decision
  • pack from the candidate SHA and inspect both declaration trees
  • load the installed package through ESM and CommonJS
  • run the installed snail-sh binary in a clean consumer
  • treat the registered Doctor fixtures as expected findings and every other failure as a blocker

Publish logger only after @snailicid3/node-utils is available to the release-test registry. The full dependency order is recorded in the repository architecture/refactor plan.

Development

Run package tasks from the monorepo root:

pnpm --filter=@snailicid3/logger build:nx
pnpm --filter=@snailicid3/logger test:nx
pnpm --filter=@snailicid3/logger demo
pnpm --filter=@snailicid3/logger demo:levels
pnpm --filter=@snailicid3/logger demo:spinner

The package build emits ESM and CommonJS root entries, an ESM demo, and the ESM snail-sh executable.