A fast, robust process manager, written in Rust.

Keeps your apps alive, restarts them when they crash, aggregates their logs, and tracks the CPU and memory of their whole process tree, with the pm2 workflow you already know.

Install

$ curl -fsSL https://3pm.edgecr4ft.net/install.sh | sh

macOS and Linux, x86_64 and arm64. Run it again to update: a running daemon is handed off to the new binary in place, your apps keep running.

Quick start

$ 3pm start app.js            # node, python, ruby, bash… inferred from the extension
$ 3pm start app.js -i 4       # 4 instances
$ 3pm ls                      # the process table
$ 3pm logs app                # tail the logs
$ 3pm save && 3pm startup     # bring the apps back after a reboot
$ 3pm update                  # new daemon, zero downtime

Why 3pm

One binaryCLI and daemon in one executable, no runtime to install. The first command starts the daemon.
Zero-downtime updateThe daemon re-executes itself in place: same pids, same pipes, no lost log line.
pm2 compatibleSame commands, and your ecosystem.config.js works as is.
Metrics built inProcess trees, host metrics, and app metrics through @3pm/api.

Downloads

SDKs

# Python ≥ 3.9 · threepm-io
$ pip install --index-url https://3pm.edgecr4ft.net/simple/ threepm-io

Application metrics and events from inside your app, read with 3pm show. Node.js, Python, C++ and Rust, every version with its sha256: sdk/sdk.json.

Modules

# automonit · discovers the services this host runs and monitors them
$ 3pm install automonit

Downloaded from this site and checked against its sha256; 3pm update keeps it current, 3pm install automonit@<version> pins one. Released with 3pm, same version, every build: modules/automonit/latest/version.json. A 3pm up to 0.42.0 takes the script: curl -fsSL https://3pm.edgecr4ft.net/modules/automonit/install.sh | sh.

Documentation

Start here

ConceptsDaemon, apps and instances, statuses, metrics, SDKs, the fleet, in one page. CLI referenceEvery command and subcommand with its full help. Environment variablesDaemon, apps, modules, SDKs, installer, backend. Ecosystem fileEvery field, profiles, validate and apply.

SDKs

Node.js · @3pm/apiProgrammatic client, io metrics, actions, profiling, fleet calls. Python · threepm-ioGauges, counters, histograms, events, errors. C++ · threepm_io.hppHeader-only C++17, lock-free metrics. Rust · threepm-ioMetrics, events and custom actions, serde only. Application metricsThe surface all four SDKs share, and its guarantees.

Fleet backend

HTTP APIEvery route: buckets, nodes, tokens, metrics, events, calls, artifacts. 3pm-backend flagsEvery flag with its environment variable and default. 3pm linkThe agent: enrollment, state, data socket. Link protocol3pm.link.v1: ids, tokens, frames, error codes.

Also: features · logs · metrics · host metrics · resource limits · containers · serve · modules · wire protocol · backend features · changelog

For LLMs and agents

Everything above as plain Markdown, indexed for a model to read: