Skip to content

Releases: javimosch/machin-tinystats

v1.1.0 — remotecmd sidecar

Choose a tag to compare

@javimosch javimosch released this 11 Aug 15:32

What's new

Remotecmd sidecar (v1.1.0)

New tinystats sidecar subcommand — provisions remotecmd connections without SSH access.

tinystats sidecar --port 9096

Exposes POST /__rcmd/pair endpoint that:

  1. Downloads the rcmd binary from GitHub releases (cached in $TMPDIR/.rcmd-cache/)
  2. Runs rcmd pair accept --code <code> --activation-key <key>
  3. Spawns rcmd daemon start -daemon detached (survives the HTTP request)

Security

  • Relay URL allowlist (RCMD_ALLOWED_RELAYS env, default *.intrane.fr) — sidecar validates relay URL before doing anything
  • Activation key — enforced by the relay
  • Pair code — single-use, 300s TTL
  • Rate limiting — 1 valid request per minute

Binary size

79 KB stripped (was 71 KB in v1.0.1 — +8 KB for the sidecar logic).

Files

  • tinystats-linux-amd64 — 79 KB stripped binary
  • SHA256SUMS.txt — checksums

Generated with Devin

v1.0.1 — WSS fix for HTTPS/Traefik

Choose a tag to compare

@javimosch javimosch released this 11 Aug 13:16

v1.0.1 — WSS fix for HTTPS/Traefik

Fixed

  • WebSocket scheme now auto-detects ws:// vs wss:// based on location.protocol — fixes SecurityError when the dashboard is served behind HTTPS (Traefik, Caddy, nginx TLS)

Changed

  • Bumped version to 1.0.1

Assets

  • tinystats-linux-amd64 — 71 KB stripped native binary
  • tinystats_checksums.txt — SHA256 checksums

Install

curl -fsSL https://raw.githubusercontent.com/javimosch/machin-tinystats/master/scripts/install.sh | bash

TinyStats v1.0.0 — MiniStats rewritten in Machin, 71 KB binary

Choose a tag to compare

@javimosch javimosch released this 11 Aug 08:02

A rewrite of MiniStats in Machin/MFL.

The pitch

MiniStats is a real-time multi-machine metrics dashboard. The original is built with Bun/TypeScript and compiles to a 99 MB binary because it bundles the entire Bun runtime.

TinyStats is the same app rebuilt in Machin — a language that compiles through C to native code. The binary is 71 KB. That's a 1400× reduction.

MiniStats (Bun) TinyStats (Machin)
Binary size 99 MB 71 KB
Runtime bundled yes (Bun) no (pure C output)
Source lines ~300 TS ~250 MFL

What it does

  • Real-time CPU/memory/disk/inode metrics via WebSocket
  • Multi-machine dashboard (2-column grid, IBM Plex Mono, scanline overlay)
  • Stale client detection and pruning
  • HTTP POST for clients (works behind firewalls that block WebSocket)
  • Zero-config: one static binary, no runtime to install

Install

curl -fsSL https://raw.githubusercontent.com/javimosch/machin-tinystats/master/scripts/install.sh | bash
tinystats server --port 9094

Then on each machine:

tinystats client --name my-box --server http://YOUR_SERVER:9094

Open → http://localhost:9094

How

The server uses Machin's machweb framework (HTTP) + ws framework (WebSocket RFC 6455) — both pure MFL, no external libraries. The client uses http_request() to POST JSON. A single hub goroutine owns all state, race-free by design. No database, no persistence — just what's happening now.