[object Object]

← back to build-pages

Makefile: add 'make stats' target — pretty-print fleet stats from /api/fleet/all

fafcc1718a6dc5737325607ce41497ea754c9353 · 2026-05-13 19:52:51 -0700 · SteveStudio2

Files touched

Diff

commit fafcc1718a6dc5737325607ce41497ea754c9353
Author: SteveStudio2 <stevestudio2@SteveStacStudio.lan>
Date:   Wed May 13 19:52:51 2026 -0700

    Makefile: add 'make stats' target — pretty-print fleet stats from /api/fleet/all
---
 Makefile | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index cf0254d..9ef29ee 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 # build-pages — common dev targets.
 # Run: make <target>
 
-.PHONY: help start dev smoke smoke-quiet smoke-json fleet-smoke fleet-status audit restart logs
+.PHONY: help start dev smoke smoke-quiet smoke-json fleet-smoke fleet-status audit stats restart logs
 
 help:
 	@printf 'Targets:\n'
@@ -13,6 +13,7 @@ help:
 	@printf '  fleet-smoke   — full asim+sod+build-pages smoke (~215 checks)\n'
 	@printf '  fleet-status  — at-a-glance health digest\n'
 	@printf '  audit         — fleet-status + fleet-smoke in one call\n'
+	@printf '  stats         — pretty-print /api/fleet/all (projects, velocity, top skills, recent)\n'
 	@printf '  restart       — pm2 restart build-pages\n'
 	@printf '  logs          — pm2 logs --nostream\n'
 
@@ -42,6 +43,15 @@ audit:
 	@echo
 	@~/Projects/_shared/scripts/fleet-smoke.sh
 
+stats:
+	@curl -s http://127.0.0.1:9700/api/fleet/all | jq '{ \
+	  projects: [.projects[] | "\(.slug) — \(.commits) commits (\(.last_24h)/24h, \(.last_7d)/7d)"], \
+	  velocity, \
+	  top_skills: .top_skills[0:8], \
+	  top_agents: .top_agents[0:5], \
+	  recent: [.recent[0:5] | .[] | "\(.hash) \(.date | .[0:10]) — \(.project): \(.subject)"] \
+	}'
+
 restart:
 	pm2 restart build-pages
 

← 9419dd0 favicon: /favicon.svg + /favicon.ico routes serve real brand  ·  back to build-pages  ·  api: /api/fleet/longest — top commits by body length (the de 5ffc20a →