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

@eleven-labs/nest-profiler-commander

v1.0.0-alpha.3

Published

CLI command collector for @eleven-labs/nest-profiler (via nest-commander)

Downloads

234

Readme

@eleven-labs/nest-profiler-commander

@eleven-labs/nest-profiler-commander profiles CLI commands built with nest-commander — the console equivalent of Symfony's command profiling. Every command run produces a profile that shows up in the web profiler at /_profiler, in a dedicated Commands table and with a built-in Command tab, plus any HTTP, cache, or database activity the command triggered.

Command tab — a profiled nest-commander run with its arguments, options and exit code

Installation

pnpm add @eleven-labs/nest-profiler-commander nest-commander

Peer dependencies: nest-commander ^3.20.0

Setup

The collector wraps every discovered command automatically — you do not change your command classes. Register it in the module you bootstrap with CommandFactory:

import { Module } from '@nestjs/common';
import { ProfilerModule } from '@eleven-labs/nest-profiler';
import { CommanderCollectorModule } from '@eleven-labs/nest-profiler-commander';
import { AppCommand } from './app.command';

@Module({
  imports: [
    // File storage lets the CLI process and the HTTP server share profiles.
    ProfilerModule.forRoot({ isGlobal: true, storageType: 'file', storagePath: '.profiler' }),
    CommanderCollectorModule.forRoot(),
  ],
  providers: [AppCommand],
})
export class CliModule {}
import { CommandFactory } from 'nest-commander';
import { CliModule } from './cli.module';

async function bootstrap(): Promise<void> {
  await CommandFactory.run(CliModule, { logger: ['error', 'warn'] });
}

void bootstrap();

Run a command, then open /_profiler on your HTTP app (pointed at the same storagePath) to inspect it.

Cross-process storage required. The CLI and the web server are separate processes, so command profiles are only visible in the server when both share the backing store — use storageType: 'file' (or a Redis/DB adapter). In-memory storage is per-process; the profiler logs a warning if you profile a command against it.

What it collects

Each command run sets request.command on the profile:

| Field | Description | | ----------- | ---------------------------------------------- | | name | Command name from @Command({ name }) | | arguments | Positional parameters (passedParams) | | options | Parsed flag options | | exitCode | 0 on success, 1 when the command threw | | success | Whether the command completed without throwing |

Duration and timing come from the profile's standard performance data, and a thrown error appears in the Exceptions tab. Because the command body runs inside the profiler's CLS context, other collectors (e.g. @eleven-labs/nest-profiler-axios, @eleven-labs/nest-profiler-cache) capture the work a command performs and contribute their own panels.

How it works

At application bootstrap the module discovers every provider that is an instance of nest-commander's CommandRunner and wraps its run() method. The wrapper synthesises a profile (request.method = 'CLI', request.url = '<command> <args>', and request.command), opens a CLS context, runs the original command, then runs all collectors and saves the profile through the profiler's shared storage. The profiler UI renders command profiles in a dedicated Commands table and a built-in Command tab — no extra setup in your HTTP app. nest-commander is an optional peer dependency: when it is not installed the module is a no-op.


Part of the nest-profiler toolkit · Powered & maintained by Eleven Labs