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

@masuidrive/procman

v0.1.1

Published

A lightweight process management daemon tool for development environments

Readme

@masuidrive/procman

npm version License: MIT Node.js Version

Node.jsベースのプロセス管理デーモンツール。開発環境における複数のサーバープロセスを統合的に管理し、開発者の生産性向上を目的とする。pm2の軽量版として、開発に必要な最小限の機能に絞って実装。

概要

procmanは、開発環境でのプロセス管理を簡単にするためのCLIツールです。Unix Domain Socket(Linux/macOS)またはNamed Pipe(Windows)を使用してデーモンプロセスと通信し、複数のアプリケーションプロセスを効率的に管理します。

主要機能

  • プロセスのライフサイクル管理(起動、停止、再起動)
  • 設定ファイルベースの一括管理
  • 構造化されたログの集約と管理
  • メモリ使用量によるプロセス自動再起動
  • namespaceによるプロセスのグループ管理
  • メモリリーク検出と防止機能

インストール

npmから公開パッケージをインストール

# グローバルインストール(CLIとして使用)
npm install -g @masuidrive/procman

# ローカルプロジェクトにインストール
npm install @masuidrive/procman

使用方法

グローバルインストール後、procmanコマンドが使用可能になります:

# ヘルプを表示
procman --help

# バージョンを表示
procman --version

# プロセス状態を表示
procman status

# 設定ファイルを使ってプロセスを起動
procman start <service-name>

# プロセスを停止
procman stop <service-name>

# ヘルスチェック(メモリ使用状況含む)
procman health

サポートOS

  • Linux(完全サポート)
  • macOS(完全サポート)
  • Windows(基本サポート)

設定ファイル例

procmanは設定ファイルを使用してプロセスを管理します:

// procman.config.js
module.exports = {
  apps: [{
    name: 'my-app',
    script: './app.js',
    max_memory_restart: '500M'  // 500MB超過で自動再起動
  }]
};

メモリ管理機能

procmanはPM2互換のメモリ管理機能を提供し、長期稼働でも安定した動作を実現します:

  • プロセスメモリ制限: max_memory_restart オプションでプロセス毎のメモリ上限を設定
  • 自動再起動: メモリ制限を超えたプロセスを自動的に再起動
  • EventEmitterリーク防止: シンプルなクリーンアップパターンで確実なリスナー解放
  • グレースフルシャットダウン: 状態保存とコネクションドレイニング
  • ヘルスチェック: procman health でメモリ使用状況を監視

詳細は Memory Management Documentation を参照してください。

開発者向け情報

開発環境セットアップ

必要な環境

  • Node.js 18.x LTS

ローカル開発

# リポジトリをクローン
git clone <repository-url>
cd procman

# 依存関係をインストール
npm install

# プロジェクトをビルド
npm run build

# ローカルでテスト使用
npm link
procman --help

利用可能なスクリプト

  • npm run build - TypeScriptをJavaScriptにコンパイル
  • npm run dev - 開発モードでCLIを実行
  • npm run clean - ビルド成果物を削除
  • npm run test - テストをウォッチモードで実行
  • npm run test:run - テストを一度実行
  • npm run test:coverage - カバレッジレポート付きでテスト実行
  • npm run lint - ESLintを実行
  • npm run lint:fix - ESLintで自動修正
  • npm run format - Prettierでコードフォーマット
  • npm run format:check - コードフォーマットをチェック

アーキテクチャ

このCLIツールは以下で構築されています:

  • TypeScript - 型安全性とモダンなJavaScript機能
  • Commander.js - CLIフレームワーク
  • Vitest - テストフレームワーク
  • ESLint + Prettier - コード品質とフォーマット

開発

プロジェクトは厳密なTypeScript設定に従い、コード品質のためESLintとPrettierを使用しています。全てのコミットはリントとフォーマットチェックを通す必要があります。

# 全てのチェックを実行
./bin/test-unit.sh
./bin/test-integration.sh

このプロジェクトは devcontainer を使用して開発します。詳細は ./bin/README.md を参照してください。