Skip to main content

Module admin_cli

Module admin_cli 

Source
Expand description

The bamboo health|status|sessions|session|stop|respond|schedules admin CLI: a thin HTTP client over a running bamboo serve for operators (health probe, session list/inspect/stop/respond, schedule management). The bamboo health | status | sessions | session | stop | respond | schedules admin CLI.

A thin HTTP client over a running bamboo serve instance. Each command wraps an endpoint the server already exposes — /api/v1/health, /api/v1/sessions, /api/v1/stop/{id}, /api/v1/respond/{id}, /api/v1/schedules — so an operator can probe and steer the backend without hand-writing curl. The server is the single source of truth; this module only resolves the base URL and pretty-prints responses.

Structs§

ConnArgs
Connection options shared by every admin subcommand.
ScheduleCreateArgs
Flag-based inputs for bamboo schedules create (the common case). The clap layer guarantees exactly one trigger source (cron / every / daily / json) and that name + prompt accompany the flag form.

Functions§

health
bamboo health — liveness probe. Exits non-zero (via the returned Err) when the server is unreachable or reports an unhealthy status.
history
bamboo history <session-id> — print a session’s UI-visible message transcript (a thin read over GET /api/v1/history/{id}). Handy for reviewing what a headless -p run actually did, or an interactive session’s log, without the web UI. Folded in from the retired bamboo-cli history.
mcp_add
bamboo mcp add --json <file|-> — add (or overwrite) a server from a raw JSON payload passed through to POST /api/v1/mcp/servers. The payload may be the internal shape or the mainstream flat shape (command/url), same as the HTTP API.
mcp_connect
bamboo mcp connect <id> — enable + (re)connect a configured server (POST /api/v1/mcp/servers/{id}/connect).
mcp_disconnect
bamboo mcp disconnect <id> — disable + disconnect a server (POST /api/v1/mcp/servers/{id}/disconnect).
mcp_refresh
bamboo mcp refresh [<id>] — re-list tools from one server, or from every enabled server when no id is given (POST /api/v1/mcp/servers/{id}/refresh).
mcp_remove
bamboo mcp remove <id> — stop + delete a server (DELETE /api/v1/mcp/servers/{id}). Destructive (the stored config is gone), though a removed server can be re-added with bamboo mcp add — so it confirms like sessions delete / schedules delete unless --yes.
mcp_status
bamboo mcp status — live view over GET /api/v1/mcp/servers: connection state + tool counts per configured server. --json prints the raw response.
mcp_tools
bamboo mcp tools [<id>] — list the tools one server exposes (GET /api/v1/mcp/servers/{id}/tools), or every server’s tools (GET /api/v1/mcp/tools) when no id is given. --json prints raw JSON.
respond
bamboo respond <id> <answer> — answer a session’s pending question (permission gate / clarification) out-of-band via POST /api/v1/respond/{id}. Answering resumes the blocked run server-side.
respond_pending
bamboo respond <id> --pending — show the question a session is blocked on (GET /api/v1/respond/{id}/pending), pretty or as raw JSON.
schedules_create
bamboo schedules create — POST /api/v1/schedules. Either assembles the request from the common-case flags or posts a raw JSON payload verbatim (--json <file|->) for full schema fidelity.
schedules_delete
bamboo schedules delete <id> — DELETE /api/v1/schedules/{id}. Confirms interactively (after resolving the schedule’s name) unless yes is set.
schedules_list
bamboo schedules list — tabulate schedules on a running server.
schedules_run
bamboo schedules run <id> — POST /api/v1/schedules/{id}/run (trigger now).
schedules_runs
bamboo schedules runs <id> — run history (GET /api/v1/schedules/{id}/runs).
schedules_show
bamboo schedules show <id> — one schedule in detail. The server exposes no single-schedule GET, so this filters GET /api/v1/schedules by id.
session_delete
bamboo session delete <id> — delete a session (DELETE /api/v1/sessions/{id}), cancelling any running execution. Prompts for confirmation unless yes is set.
session_show
bamboo session show <id> — one session’s detail (GET /api/v1/sessions/{id}), pretty or as raw JSON.
sessions_list
bamboo sessions — tabulate sessions on a running server.
status
bamboo status — one-screen overview: address, health, session counts.
stop
bamboo stop <id> — cancel a running session’s loop.