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

@tailcove/node

v0.1.5

Published

Node.js client for shipping application logs to Tailcove — batches, ships NDJSON, with pino and winston transports.

Readme

Install

npm install @tailcove/node

Requires Node.js 18 or newer.

Quick start

1. Get a token. Create a source in your Tailcove dashboard and copy its ingest token. It is shown only once, so save it somewhere safe (an environment variable is ideal).

2. Send your first log.

import { Tailcove } from '@tailcove/node';

const tailcove = new Tailcove({ token: process.env.TAILCOVE_TOKEN! });

tailcove.info('user signed up', { userId: 42 });
tailcove.error('payment failed', { orderId: 99, reason: 'card_declined' });

3. Open Tailcove. Your lines appear in search and live tail within a couple of seconds.

Level helpers are debug, info, notice, warning, error, critical, alert and emergency. You can also call log(level, message, context) directly.

Short-lived scripts: a script that exits right after logging can call await tailcove.flush() to send what is buffered. Long-running servers do not need this. See Shutdown.

Options

| Option | Default | What it does | |---|---|---| | token | — | Your source's ingest token. Required. | | endpoint | https://ingest.tailcove.dev/api/v1/logs | The ingest URL. Only change this if you self-host. | | batchSize | 50 | Send once this many lines are buffered. | | batchIntervalMs | 2000 | Send once this many milliseconds have passed since the first buffered line. | | timeoutMs | 2000 | How long a delivery attempt may take before giving up. | | context | {} | Fields added to every line. Per-call context wins if keys clash. | | enabled | true | Set false to turn the client off. Nothing is buffered or sent. | | onError | — | Called with the error when a batch fails to send. Without it, failures are dropped silently. | | flushOnShutdown | true | Flush automatically on beforeExit and SIGTERM. Set false to handle shutdown yourself. |

What gets added automatically

Every line is enriched with:

| Field | Value | |---|---| | hostname | os.hostname() | | pid | process.pid | | env | process.env.NODE_ENV (defaults to development) |

Add your own fields to every line with the context option, for example service or region.

Pino

import pino from 'pino';

const logger = pino({
    transport: {
        target: '@tailcove/node/pino',
        options: { token: process.env.TAILCOVE_TOKEN },
    },
});

logger.error({ orderId: 99 }, 'payment failed');

The transport runs in pino's worker thread and keeps your existing logger. Pino levels map as: trace and debug → debug, info → info, warn → warning, error → error, fatal → critical.

Winston

import winston from 'winston';
import { TailcoveTransport } from '@tailcove/node/winston';

const logger = winston.createLogger({
    transports: [new TailcoveTransport({ token: process.env.TAILCOVE_TOKEN })],
});

logger.warn('disk almost full', { volume: '/data' });

Winston levels map as: error → error, warn → warning, info and http → info, verbose, debug and silly → debug.

Shutdown

A real timer enforces batchIntervalMs, so lines are sent on time even when nothing else is logging. When the process ends, beforeExit and SIGTERM flush whatever is left, so a partial batch is not lost.

If you already manage your own shutdown, create the client with flushOnShutdown: false, then call await tailcove.flush(), or await tailcove.shutdown() to flush and detach, at the right point in your sequence.

When delivery fails

Network errors and non-2xx responses never throw into your code. They are passed to onError if you set one, and dropped otherwise. Logging is best-effort by design.

const tailcove = new Tailcove({
    token: process.env.TAILCOVE_TOKEN!,
    onError: (error) => console.warn('Tailcove delivery failed', error),
});

Help and feedback