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

@auto-engineer/dev-server

v1.7.0

Published

Development server commands for starting and managing client/server processes with file watching.

Readme

@auto-engineer/dev-server

Development server commands for starting and managing client/server processes with file watching.


Purpose

Without @auto-engineer/dev-server, you would have to manually manage process spawning, file watching for auto-restart, and process cleanup when developing client/server applications.

This package provides command handlers that integrate with the CLI pipeline system to start development processes with optional file watching for automatic restarts on code changes.


Installation

pnpm add @auto-engineer/dev-server

Quick Start

Register the handlers and start a development server:

1. Register the handlers

import { COMMANDS } from '@auto-engineer/dev-server';
import { createMessageBus } from '@auto-engineer/message-bus';

const bus = createMessageBus();
COMMANDS.forEach(cmd => bus.registerCommand(cmd));

2. Send a command

const result = await bus.dispatch({
  type: 'StartServer',
  data: {
    serverDirectory: './server',
    watch: true,
  },
  requestId: 'req-123',
});

console.log(result);
// → { type: 'ServerStarted', data: { serverDirectory: './server', pid: 12345, watching: true } }

The server starts with file watching enabled, automatically restarting on code changes.


How-to Guides

Run via CLI

auto start:server --server-directory=./server
auto start:client --client-directory=./client

Run with Watch Mode

auto start:server --server-directory=./server --watch --watch-directories=./server,./shared

Run with Custom Command

auto start:server --server-directory=./server --command="pnpm dev"
auto start:client --client-directory=./client --command="npm run dev"

Handle Errors

if (result.type === 'ServerStartFailed') {
  console.error(result.data.error);
}

Enable Debug Logging

DEBUG=auto:dev-server:* auto start:server --server-directory=./server

API Reference

Exports

import {
  COMMANDS,
  startServerCommandHandler,
  startClientCommandHandler,
} from '@auto-engineer/dev-server';

import type {
  StartServerCommand,
  StartClientCommand,
  ServerStartedEvent,
  ServerStartFailedEvent,
  ClientStartedEvent,
  ClientStartFailedEvent,
} from '@auto-engineer/dev-server';

Commands

| Command | CLI Alias | Description | |---------|-----------|-------------| | StartServer | start:server | Start development server with optional file watching | | StartClient | start:client | Start development client process |

StartServerCommand

type StartServerCommand = Command<
  'StartServer',
  {
    serverDirectory: string;
    command?: string;        // default: 'pnpm start'
    watch?: boolean;         // default: true
    watchDirectories?: string[];
    debounceMs?: number;     // default: 2000
  }
>;

StartClientCommand

type StartClientCommand = Command<
  'StartClient',
  {
    clientDirectory: string;
    command?: string;        // default: 'pnpm start'
  }
>;

ServerStartedEvent

type ServerStartedEvent = Event<
  'ServerStarted',
  {
    serverDirectory: string;
    pid: number;
    port?: number;
    watching: boolean;
  }
>;

ClientStartedEvent

type ClientStartedEvent = Event<
  'ClientStarted',
  {
    clientDirectory: string;
    pid: number;
    port?: number;
  }
>;

Architecture

src/
├── index.ts
└── commands/
    ├── start-server.ts
    └── start-client.ts

The following diagram shows the server watch flow:

flowchart TB
    A[StartServer] --> B[Spawn Process]
    B --> C{Watch Mode?}
    C -->|Yes| D[Start Watcher]
    C -->|No| E[ServerStartedEvent]
    D --> E
    D --> F[File Change]
    F --> G[Kill Process]
    G --> B

Flow: Command spawns process, optionally starts file watcher which restarts on changes.

Dependencies

| Package | Usage | |---------|-------| | @auto-engineer/message-bus | Command/event infrastructure | | chokidar | File system watching | | execa | Process execution | | debug | Debug logging |