Skip to content

CLI Reference

AfterLink includes a command-line interface (CLI) to trace active frame streams, inspect live connection channels, generate mock frame sequences, and manage package upgrades.

Commands

`ping` — Heartbeat latency check

Sends persistent ping packets to calculate heartbeat round-trip latencies for any active AfterLink server socket.

Usage:

Example:

`call` — RPC invocation

Invokes direct RPC endpoints on the target server and reports matching reply values in real time.

Usage:

Example:

`inspect` — Frame decoder

Decodes raw wire hex buffers into readable, formatted JSON blocks matching the 16-byte Protocol v2 header layout (version, flags, priority queue, routing key, payload length).

Usage:

Example:

`monitor` — Live channel tracer

Listens to real-time pub/sub streams on a specific channel and prints routing traces.

Usage:

Example:

`cluster` — Node cluster manager

Inspects running worker process pools, monitors shared Redis pub/sub node health, and triggers SIGUSR2 rolling restarts.

Usage:

Example:

`metrics` & `trace` — Observability tools

Fetches live Prometheus metrics endpoints and inspects OpenTelemetry context propagation across RPC frame flows.

Usage:

Examples:

`upgrade` — Upgrade AfterLink packages

Upgrades all installed AfterLink packages in the current project (dependencies and devDependencies) to their latest versions. Detects the package manager (npm, pnpm, yarn) automatically from the lockfile.

Usage:

Options:

-g, --global Upgrade AfterLink packages globally

Examples: