Push numeric key-value pairs to a statb.io board with a single curl call.
The user opens the board URL in a browser and sees live-updating cards —
no signup, no API key, no SDK required.
curl -s 'https://statb.io/b/{board_id}/push?key1=value1&key2=+1&key3=-0.5'
Board viewer: https://statb.io/board.html?board={board_id}
a-z, 0-9, -).acme-deploy-x7k9m, agent-training-4feb).| Syntax | Meaning | Example |
|---|---|---|
| -------- | --------- | --------- |
42 | Set to this value | ?cpu=72.5 |
+N | Increment by N (starts at 0 if key missing) | ?steps=+1 |
-N | Decrement by N | ?errors=-1 |
Only numeric values (int or float). Non-numeric values are silently skipped.
Multiple keys in one request are fine.
When the user asks you to run a multi-step or long-running task:
suffix: e.g. migrate-db-k8r2q or scrape-run-20260414. Tell the user:
> You can monitor progress live at:
> https://statb.io/board.html?board={board_id}
```bash
curl -s 'https://statb.io/b/{board_id}/push?status=1&total_steps=10&completed=0&errors=0'
```
Use status=1 for running, status=0 for finished.
```bash
curl -s 'https://statb.io/b/{board_id}/push?completed=+1'
```
Push changed values only — no need to resend unchanged keys.
```bash
curl -s 'https://statb.io/b/{board_id}/push?status=0&completed=10&duration_sec=47'
```
Choose keys that let the user understand progress at a glance:
completed, total, remaining, percentitems_per_sec, tokens_per_secerrors, warnings, success_ratecpu, mem_mb, gpu_tempelapsed_sec, eta_sec, duration_secloss, accuracy, rows_processed, files_convertedKeep key names short, lowercase, underscore-separated.
The #1 mistake is pushing once at the start and never again. The board
then shows stale numbers for the entire run, which defeats the purpose.
Push calls must be placed inside the actual work — not just before it:
for / while body, not above it.first batch.
push call after each major stage, not just at the top.
boundary, register a recurring timer (e.g. every 15–30 seconds) that
pushes the latest metrics.
Self-check before executing: Look at your plan. If there is only one
curl …/push call at the beginning, you are doing it wrong. There must be
at least one push inside the loop or between stages, plus a final push at
the end.
Bad:
curl -s 'https://statb.io/b/board/push?total=100&done=0' # ← only push
for f in *.csv; do process "$f"; done # board stays at 0
Good:
curl -s 'https://statb.io/b/board/push?total=100&done=0'
for f in *.csv; do
process "$f"
curl -s 'https://statb.io/b/board/push?done=+1' # ← push inside loop
done
curl -s 'https://statb.io/b/board/push?status=0' # ← final push
step, batch, or every 10–30 seconds for continuous work.
+N) for counters so concurrent pushes don't clobber.not access-controlled. Never push passwords, tokens, PII, or secrets.
curl -s to suppress output. Push failures arenon-fatal — do not let a failed push stop the actual work.
# Start
curl -s 'https://statb.io/b/convert-imgs-a9x2/push?total=200&done=0&errors=0&status=1'
# After each file
curl -s 'https://statb.io/b/convert-imgs-a9x2/push?done=+1'
# On error
curl -s 'https://statb.io/b/convert-imgs-a9x2/push?errors=+1'
# Finish
curl -s 'https://statb.io/b/convert-imgs-a9x2/push?status=0'
curl -s 'https://statb.io/b/migrate-v3-kq82/push?files_total=48&files_done=+1&tests_pass=142&tests_fail=3'
curl -s "https://statb.io/b/train-bert-e4p1/push?epoch=+1&loss=${LOSS}&acc=${ACC}&lr=${LR}"
共 1 个版本