You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Star2Β (2)You must be signed in to star a repository
About
process management with advanced features like clustering, load balancing, health checks, hot reload, and remote deployment. Built with TypeScript and Bun for maximum performance and developer experience.
A modern, feature-rich process manager for Node.js and Bun applications. TSPM is a PM2 alternative written entirely in TypeScript.
Overview
TSPM (TypeScript Process Manager) provides robust process management with advanced features like clustering, load balancing, health checks, hot reload, and remote deployment. Built with TypeScript and Bun for maximum performance and developer experience.
β¨ Features
Core Features
Feature
Description
Process Lifecycle
Start, stop, restart, reload, and delete processes
Exponential backoff with configurable restart policies
Log Management
File logging with rotation and structured JSON output
Hot Reload
File watching with automatic process restart
Advanced Features
Feature
Description
Health Checks
HTTP, HTTPS, TCP, and command-based probes
Webhooks
Event notifications for process lifecycle events
Source Maps
Transparent stack trace support
Environment Variables
.env file support with per-process configuration
Lifecycle Hooks
preStart and postStart script execution
Real-time Monitoring
Interactive dashboard with CPU and memory stats
Production Features
Feature
Description
Startup Scripts
Generate systemd/launchd scripts for boot persistence
Save/Resurrect
Persist and restore process lists
Remote Deployment
SSH-based deployment with pre/post hooks
Multi-environment
Staging, production, and custom environments
Resource Limits
Memory limits with OOM detection
π Quick Start
Installation
# Clone the repository
git clone https://github.com/nglmercer/tspm.git
cd tspm
# Install dependencies
bun install
Start Your First Process
# Start from a config file
bun src/cli/index.ts start -c tspm.yaml
# Or use the example configuration
bun src/cli/index.ts start -c examples/config/app.basic.yaml
Rust Crash & Respawn Test
Demonstrate process resilience and restart limits using a Rust application:
bun run example:rust
This example compiles a simple Rust HTTP server, starts it, crashes it repeatedly, and verifies that TSPM stops restarting it after maxRestarts is reached.
Basic Commands
# List all processes
bun src/cli/index.ts list
# View process logs
bun src/cli/index.ts logs
# Monitor processes in real-time
bun src/cli/index.ts monit
# Stop all processes
bun src/cli/index.ts stop --all
π Configuration
Create a tspm.yaml or tspm.json file in your project:
process management with advanced features like clustering, load balancing, health checks, hot reload, and remote deployment. Built with TypeScript and Bun for maximum performance and developer experience.