hyperhive/hivectl
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas daa6eb96f8 deploy: move the hive CA's knobs to deploy.hive-controller.tls
`services.hyperhive.tls.{stateDir,caValidityDays,leafValidityDays}` sat at
the top of `services.hyperhive`, which is meant to be everything about
hyperhive rather than the settings of one hive. Where the hive CA lives,
how long it lasts and how long the leaves it signs last are decisions of
the host holding the key — `deploy.*`, by the same rule as the switches
that moved before them.

`hive-controller` is hive-c0re's new name (mara on the issue), so the
knobs hang off the daemon that owns the CA rather than off a bare `tls`
at the root. mkRenamedOptionModule entries carry existing configs.

⚠️ Unlike the two switch renames, these names are NOT unique, so this was
swept by ALIAS BINDING rather than by identifier: hive-tls.nix alone holds
two options spelled `stateDir` — its own `cfg.stateDir` and the swarm CA's
`swarmCaCfg.stateDir`, four sites that must not move. Nine files bind an
alias to this config; the rename followed those bindings.

Two sites were invisible to the obvious check, and an unanchored sweep for
`hyperhive\.tls\b` is what found them: the option declaration (`= {` after
the path, so no trailing `.` or `;`) and the alias convention documented in
a comment in lib/hive-ca-trust.nix.

Also renamed the `<tls.stateDir>` shorthand in four docs and two Rust doc
comments, anchored on its delimiters — the new path contains the old one
as a substring, so an unanchored replace would have doubled the prefix.
2026-08-30 20:52:00 +02:00
..
src deploy: move the hive CA's knobs to deploy.hive-controller.tls 2026-08-30 20:52:00 +02:00
Cargo.toml hivectl: migrate dag_progress to hive-jobq-wire's generic GraphNode 2026-08-03 20:35:24 +02:00
README.md hivectl: add start/stop agent verbs, rename spawn to create 2026-08-02 19:42:59 +02:00

hivectl

The operator-facing host CLI. A thin client for the hive-c0re daemon — speaks the host admin socket protocol (hive-host-sock) and does not link the daemon crate. Container lifecycle, the approval queue, and provisioning verbs all forward to the daemon and need it running; a few (wg/peer-config, choom) work off local host state instead.

When to use it

Reach for this crate when adding an operator-run host command — agents talk to the daemon over their own MCP tool surface (hive-agent-mcp), not this binary. hivectl is what a human operator (or a host-side script) runs.

Shape

One module per subcommand family; main.rs is just the clap parse + dispatch:

  • agents.rs — container lifecycle (start/stop/create/kill/rebuild/restart/…).
  • approvals.rs — the config/init-config/meta-input approval queue.
  • dag_progress.rs — rebuild-queue progress rendering.
  • power.rs — restart/start/stop at the container level.
  • choom.rs — drop into an interactive claude session in a container.
  • forge.rs, matrix.rs, github.rs, gateway.rs — per-integration account/token provisioning.
  • wg.rs — WireGuard mesh helpers.
  • subvol.rs — btrfs state-subvolume ops.
  • quota.rs, util.rs, completions.rs, open.rs — shared helpers, shell completions, browser-open.

Full verb reference: docs/tools/hivectl.md.