Skip to content

crabbox

Recipe card from the charly-check plugin (Commands — runtime CLI verbs).

crabbox: probes the Crabbox CLI and its optional local Node.js/PostgreSQL coordinator, served out-of-process over go-plugin gRPC by opencharly/plugin-crabbox. Install the CLI with /charly-tools:crabbox (opencharly/layer-crabbox) and the coordinator with /charly-crabbox:crabbox-coordinator (opencharly/pod-crabbox).

  • Endpoint resolution. cc.ResolveEndpoint turns the in-venue coordinator port into a host-reachable address, so one authored step works unchanged against a pod’s published port and a VM’s forwarded one.
  • Domain semantics. Methods map to the CLI’s real surface and return real verdicts, with json_path: to assert one field.
  • In-venue CLI. The CLI methods run the crabbox binary inside the venue over the reverse channel — http: cannot reach the CLI at all.
Group Methods
In-venue CLI — credential-free version (crabbox --version) providers (crabbox providers) config (crabbox config show) doctor (crabbox doctor — needs NO broker configured, or a REACHABLE one)
Coordinator HTTP probe (host-side, port 8080) health (/v1/health) ready (/v1/ready)
In-venue CLI — broker-backed (requires crabbox login in the venue) leases (crabbox status --all) usage (crabbox usage) events (crabbox events <run_id>) logs (crabbox logs <run_id>)

All methods are read-only — there are no mutating methods in this first cut.

Field Meaning
method the operation (also the scalar-sugar primary: crabbox: version)
port coordinator port for health/ready probes (default 8080)
timeout HTTP probe timeout (default 10s)
json_path dotted path into the response; stdout becomes that value
run_id run identifier for the events/logs methods
crabbox: version # scalar sugar
crabbox: # map form — identical meaning
method: version

The sugar is enabled by this candy’s plugin.primary: {crabbox: method}, which charly reads in a PRE-CONNECT prescan — so the plugin candy must be composed into the box that authors the step.

version/providers/config/doctor work with no coordinator and no login (fresh HOME). leases/usage/events/logs talk to the configured broker — the venue must hold a prior crabbox login (shared-token: crabbox login --url http://127.0.0.1:8080 --token-stdin). doctor exits nonzero when a broker is configured but unreachable — gate it on coordinator readiness first.