Adds swarmctl markdown-docs (a hidden Verb, same clap-markdown + hide=true shape as hivectl markdown-docs) and generates docs/tools/swarmctl-cli.md from it. Wires a swarmctl-docs freshness check into nix/checks.nix, same shape as hivectl-docs, diffing against packages.swarmctl. One real gotcha: PathArgs::resolve() reads required SWARMCTL_AUTHELIA_* deployment env vars and errors if unset - swarmctl markdown-docs must not go through that path (it needs none of those vars, and the docs build runs it outside any real deployment). Restructured main() so resolve() only runs for the User arm, not unconditionally before the match. Also links the new doc from docs/tools/README.md (new 'for the swarm operator' section), CLAUDE.md's swarmctl bullet, and docs/conventions.md's flake-check list. Verified: cargo check/clippy -D warnings/test/fmt -p swarmctl all clean; swarmctl markdown-docs diffs clean against the committed doc (checked against both a plain cargo build and the actual nix build. #swarmctl output); scripts/check-issue-refs.sh clean.
42 lines
1.9 KiB
Markdown
42 lines
1.9 KiB
Markdown
# Tools
|
|
|
|
`hivectl` is *your* tool — the operator's own host CLI. Everything
|
|
else here documents the tool surface your **agents** get inside their
|
|
containers (the MCP tools an agent's own claude session can call).
|
|
You never call these directly, but they're the reference for what an
|
|
agent can actually do — useful when you're trying to understand or
|
|
debug agent behavior.
|
|
|
|
## For the operator
|
|
|
|
- **[hivectl](hivectl.md)** — the curated guide: provisioning forge
|
|
and matrix accounts, gateway htpasswd management, container
|
|
lifecycle shortcuts, interactive agent shell access.
|
|
- **[hivectl-cli](hivectl-cli.md)** — the exhaustive, auto-generated
|
|
flag-by-flag reference, kept in lockstep with the binary by CI.
|
|
|
|
## For the swarm operator
|
|
|
|
- **[swarmctl-cli](swarmctl-cli.md)** — the exhaustive, auto-generated
|
|
flag-by-flag reference for `swarmctl`, kept in lockstep with the
|
|
binary by CI the same way `hivectl-cli.md` is. `swarmctl` itself
|
|
runs as root on the swarm-controller host, not through `hivectl` —
|
|
see `swarmctl/README.md` for why. No curated guide yet (one verb,
|
|
`user add`, doesn't need one); add one here if/when that grows.
|
|
|
|
## What your agents can do
|
|
|
|
- **[bash](bash.md)** — background shell execution (`mcp__bash__*`),
|
|
available on every agent unconditionally.
|
|
- **[forge](forge.md)** — the `hive-forge` Forgejo CLI every agent has
|
|
for issues, PRs, and comments. Not an MCP tool — a binary agents
|
|
shell out to instead of ad-hoc curl.
|
|
- **[lifecycle](lifecycle.md)** — kill/start/restart/update for an
|
|
agent's own direct children, plus the approval-gated config-change
|
|
tools.
|
|
- **[matrix](matrix.md)** — the matrix MCP tool surface
|
|
(`mcp__matrix__*`) for agents with a matrix account, multiple
|
|
accounts per agent, and declaring extra MCP servers generally.
|
|
- **[scheduling](scheduling.md)** — scheduled prompts (operator
|
|
approval required) and the diagnostics tools (`get_logs`,
|
|
`get_host_journal`).
|