srest is a TUI (terminal user interface) client for interacting remotely
with the Slurm REST API (the HPC workload manager).
It lets Slurm administrators and users query cluster and job state without
SSH-ing into the master node, using only HTTP requests to slurmrestd.
srest is a terminal user interface (TUI) built with Bubble Tea that turns the Slurm REST API into a live, interactive dashboard. It lets you:
slurmrestd API version automatically
(v0.0.40 – v0.0.45).It is written in Go, styled with
Lip Gloss, and speaks directly to
slurmrestd using JSON Web Token authentication — no SSH, no node login.
srest is under active development. Current features:
X-SLURM-USER-TOKEN, X-SLURM-USER-NAME).data_parser version (v0.0.40 – v0.0.45) or a version pinned via configuration.warnings/errors returned by slurmrestd./).Tabs (navigate with tab/shift+tab or [/], esc returns to Dashboard):
1-5), fill or cycle parameters (enter to edit, ←/→ to cycle options, del to clear), and run (r). The response and request history are shown alongside. Partition and account options are gathered live from the cluster.Key bindings
| Key | Action |
|---|---|
q / Ctrl+C |
quit |
tab / ], shift+tab / [ |
next / previous tab |
esc |
go to Dashboard |
/ |
filter the current table |
r |
refresh (Jobs tab) |
? |
toggle help |
Follows the standard Go layout with a strict separation of responsibilities:
.
├── main.go # Entry point: configuration + Bubble Tea startup
└── internal/
├── config/ # Configuration loading (environment)
├── api/ # Pure HTTP client (no UI)
└── ui/ # Bubble Tea model, view and update
internal/config loads configuration, prioritizing environment variables.internal/api is a pure HTTP client: no UI. It is consumed asynchronously
via tea.Cmd.internal/ui consumes internal/api without blocking the interface.go build -o srest .
srest is configured through environment variables:
| Variable | Required | Description |
|---|---|---|
SLURM_URL |
No | Base URL of slurmrestd. Defaults to http://localhost:6820. |
SLURM_JWT |
Yes* | JWT token for the X-SLURM-USER-TOKEN header. |
SLURM_USER_NAME |
No | User for X-SLURM-USER-NAME. Defaults to the current OS user. |
SLURM_API_VERSION |
No | API version to use (e.g. v0.0.45). If omitted, it is auto-detected. |
* For endpoints requiring authentication. Can be omitted on clusters with a
JWT-less slurmrestd.
SLURM_URL=http://localhost:6820 \
SLURM_JWT=<token> \
SLURM_USER_NAME=slurm \
./srest
Press q (or Ctrl+C) to quit.
To try srest against a real Slurm cluster (with slurmctld,
slurmdbd and slurmrestd) without setting up infrastructure, see:
go test ./... # unit tests (the integration one skips itself)
Integration test against a real slurmrestd (requires SLURM_URL and SLURM_JWT):
SLURM_URL=http://localhost:6820 SLURM_JWT=<token> \
go test ./internal/api -run TestPingIntegration -v