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

@nodedesk/core

v0.1.0

Published

Node.js project management engine behind NodeDesk.

Readme

@nodedesk/core

Node.js project management engine behind NodeDesk.

@nodedesk/core es el corazón técnico del ecosistema NodeDesk: un motor independiente de React, Tauri y de cualquier interfaz gráfica para descubrir proyectos Node.js, gestionar sus variables de entorno y controlar el ciclo de vida de sus procesos.

Instalación

pnpm add @nodedesk/core
# o
npm install @nodedesk/core

Requiere Node.js >= 18.

Uso rápido

Cargar y descubrir proyectos

import { ProjectManager } from "@nodedesk/core";

const project = await ProjectManager.load("./my-project");
console.log(project.name);            // de package.json
console.log(project.scripts);          // { dev: "...", start: "..." }
console.log(project.packageManager.id); // "pnpm" | "npm" | ...

const projects = await ProjectManager.discover("./mis-proyectos");

Gestión de procesos

import { ProcessManager } from "@nodedesk/core";

const manager = new ProcessManager("./my-project");

manager.on("stdout", (line) => console.log(line));
manager.on("stderr", (line) => console.error(line));

const info = await manager.start({ script: "dev" }); // npm/pnpm/yarn/bun run dev
console.log(info.pid);

await manager.stop();   // SIGTERM al grupo completo → gracia → SIGKILL
await manager.restart();

Cada proceso arranca en su propio grupo/sesión (POSIX), de modo que el apagado nunca afecta al proceso padre. stop() envía SIGTERM al grupo completo, espera un periodo de gracia y aplica SIGKILL solo si es necesario.

Variables de entorno (.env)

import { EnvManager } from "@nodedesk/core";

const env = new EnvManager("./my-project");

await env.set("PORT", "3000");
await env.set("DEBUG", "verbose");

const port = await env.get("PORT");     // "3000"
const all = await env.all();            // { PORT: "3000", DEBUG: "verbose" }

await env.delete("DEBUG");

Los comentarios y el orden del .env se preservan al escribir.

Logging

import { MemoryLogger } from "@nodedesk/core";

const logger = new MemoryLogger(300); // buffer circular
logger.pushProcessLine("Server ready", "stdout");
logger.entries(); // LogEntry[]

Detección de package manager

import { detectPackageManager } from "@nodedesk/core";

const pm = await detectPackageManager("./my-project");
// { id: "pnpm", name: "pnpm", lockFile: "pnpm-lock.yaml", detected: "lockfile" }

API principal

| Exportación | Descripción | | --- | --- | | ProjectManager | load() / discover() / isValid() | | NodeProject | metadatos, createEnvManager(), createProcessManager() | | ProcessManager | start() / stop() / restart() / wait() + eventos | | ProcessRegistry | registro persistente de procesos en background | | EnvManager | get/set/delete/all/has/keys sobre .env | | detectPackageManager | npm/pnpm/yarn/bun vía lockfiles o packageManager | | MemoryLogger / ConsoleLogger / CompositeLogger | logging | | slugify, findFreePort, shortUid, hashId, nowIso | utilidades | | parseEnv / serializeEnv | parser/serializador de .env | | classifyLine | clasificación de logs (info/warn/error/system) | | terminateProcessGroup | apagado seguro de grupos de procesos |

Desarrollo

pnpm install
pnpm build
pnpm test
pnpm typecheck

Licencia

MIT License.