Command-Line Help for hivectl

This document contains the help content for the hivectl command-line program.

Command Overview:

hivectl

Sibling to the hive-c0re daemon binary. Covers host-side admin operations that don't go through the broker — manual user provisioning on the bundled forge + matrix containers, plus future recovery / debugging verbs.

Usage: hivectl [OPTIONS] <COMMAND>

Subcommands:
Options:

hivectl forge

Forgejo user provisioning.

Manual entry point to the same idempotent provisioning c0re runs at boot — for recovery, ad-hoc reprovisioning, or fixing one agent without bouncing the daemon.

Usage: hivectl forge <COMMAND>

Subcommands:

hivectl forge create-user

Create or refresh the Forgejo account + token for <name>.

For an existing agent, persists the token to its state dir; for a human/other account, prints the token to stdout. Set a password to enable forge web-UI login (a random throwaway is used otherwise).

Usage: hivectl forge create-user [OPTIONS] <NAME>

Arguments:
Options:

hivectl forge reconcile-config

Show + reconcile the divergence between an agent's local applied config checkout and its forge agent-configs/<agent> main.

Always prints the diff first. --from forge resets the local checkout to forge main (effective on the next deploy); --from local is not supported yet. With no --from, prompts for the direction.

Usage: hivectl forge reconcile-config [OPTIONS] <AGENT>

Arguments:
Options:

hivectl matrix

matrix-tuwunel user provisioning.

Manual entry point to the same idempotent provisioning c0re runs at boot — for re-registering an agent the boot sweep skipped, or after wiping a token file.

Usage: hivectl matrix <COMMAND>

Subcommands:

hivectl matrix create-user

Create or refresh the matrix account + access token for <name>.

For an existing agent, persists the token to its state dir; for a human/other account, prints the access token to stdout. Set a password to enable matrix web-client login (a random throwaway is used otherwise).

Usage: hivectl matrix create-user [OPTIONS] <NAME>

Arguments:
Options:

hivectl matrix sync-admin

Provision (or re-provision) the hive system admin matrix account.

Runs automatically on startup; run manually to recover a missing admin token.

Usage: hivectl matrix sync-admin

hivectl matrix promote-user

Promote a matrix user to homeserver admin

Usage: hivectl matrix promote-user <NAME>

Arguments:

hivectl matrix reset-password

Reset a matrix user's password via the admin API.

Persists the new password so a later create-user can re-login.

Usage: hivectl matrix reset-password <NAME>

Arguments:

hivectl matrix invite

Invite a matrix user to the hive Space, or a specific room with --room. Idempotent

Usage: hivectl matrix invite [OPTIONS] <USER>

Arguments:
Options:

hivectl github

GitHub account provisioning.

Store an operator-supplied personal access token (PAT) for an agent so its gh and git can authenticate. No account is created — the PAT is for an existing GitHub account.

Usage: hivectl github <COMMAND>

Subcommands:

hivectl github set-token

Store a GitHub PAT for <agent> so its gh and git can authenticate.

Prefer --token-stdin — an inline --token is visible in shell history.

Usage: hivectl github set-token [OPTIONS] <AGENT>

Arguments:
Options:

hivectl gateway

Gateway htpasswd user management.

Add, remove, or list users for the gateway's HTTP Basic auth.

Usage: hivectl gateway <COMMAND>

Subcommands:

hivectl gateway create-user

Add a user or update an existing user's password in the gateway htpasswd.

Use --password-stdin to keep the password out of shell history.

Usage: hivectl gateway create-user [OPTIONS] <USERNAME>

Arguments:
Options:

hivectl gateway delete-user

Remove a user from the gateway htpasswd

Usage: hivectl gateway delete-user <USERNAME>

Arguments:

hivectl gateway list-users

List all gateway htpasswd usernames, one per line

Usage: hivectl gateway list-users

hivectl agents

Agent container management.

Lifecycle actions on managed agent containers. Needs the hive-c0re daemon running.

Usage: hivectl agents <COMMAND>

Subcommands:

hivectl agents list

Show all managed agents with their status and technical state

Usage: hivectl agents list [OPTIONS]

Options:

hivectl agents restart

Stop and start a single agent container without rebuilding config

Usage: hivectl agents restart [OPTIONS] <NAME>

Arguments:
Options:

hivectl agents restart-all

Restart all managed agent containers

Usage: hivectl agents restart-all [OPTIONS]

Options:

hivectl agents pause

Park an agent's turn loop, leaving the container running.

The harness stops driving turns but keeps serving its web UI and MCP daemons, so the container, its mounts and its warm caches stay up while it burns no tokens. Inbox messages queue unacked and the backlog drains on resume. Sticky: it survives a restart, and pausing a stopped agent makes it come up paused.

Usage: hivectl agents pause <NAME>

Arguments:

hivectl agents resume

Resume a paused agent — it drains whatever queued up while parked

Usage: hivectl agents resume <NAME>

Arguments:

hivectl agents spawn

Spawn a new agent container directly, bypassing the approval queue.

Operator-on-the-host only; use request-spawn for an approval-gated spawn.

Usage: hivectl agents spawn <NAME>

Arguments:

hivectl agents request-spawn

Queue a spawn request for operator approval

Usage: hivectl agents request-spawn <NAME>

Arguments:

hivectl agents kill

Stop a managed container (graceful)

Usage: hivectl agents kill <NAME>

Arguments:

hivectl agents destroy

Tear down a sub-agent container, keeping its state by default. No undo

Usage: hivectl agents destroy [OPTIONS] <NAME>

Arguments:
Options:

hivectl agents rebuild

Apply pending config to a managed container

Usage: hivectl agents rebuild <NAME>

Arguments:

hivectl agents set-parent

Move an agent in the topology tree — under a new parent, or to root

Usage: hivectl agents set-parent [OPTIONS] <CHILD>

Arguments:
Options:

hivectl approvals

Operator approval queue: list, approve, or deny pending requests.

Needs the hive-c0re daemon running.

Usage: hivectl approvals <COMMAND>

Subcommands:

hivectl approvals pending

List pending approval requests submitted by agents

Usage: hivectl approvals pending

hivectl approvals approve

Approve a pending request by id; the action runs immediately

Usage: hivectl approvals approve <ID>

Arguments:

hivectl approvals deny

Deny a pending request by id

Usage: hivectl approvals deny <ID>

Arguments:

hivectl wg

WireGuard inter-hive mesh setup helpers.

Generate this hive's mesh key and print the nix to enable the mesh, add a peer, or inspect live interface state.

Usage: hivectl wg <COMMAND>

Subcommands:

hivectl wg init

Generate this hive's WireGuard key (if absent) and print its public key plus the nix to enable the mesh

Usage: hivectl wg init [OPTIONS]

Options:

hivectl wg peer

Print the nix to add a peer hive to the mesh

Usage: hivectl wg peer [OPTIONS] --pubkey <PUBKEY> --address <ADDRESS> <DOMAIN>

Arguments:
Options:

hivectl wg status

Show the live mesh interface state

Usage: hivectl wg status

hivectl peer-config

Generate the federation peer-config block for THIS hive.

Prints the nix a peer operator pastes into their swarm config to trust and reach this hive.

Usage: hivectl peer-config [OPTIONS]

Options:

hivectl choom

Open an interactive Claude session inside an agent container.

A fresh session by default, or resume a prior one. Requires root and a running container.

Usage: hivectl choom [OPTIONS] <NAME>

Arguments:
Options:

hivectl stop

Stop containers hive-wide in one operator action.

Bare hivectl stop stops everything; scope flags narrow it to specific sub-agents or infra containers.

Usage: hivectl stop [OPTIONS]

Options:

hivectl start

Start containers hive-wide — the inverse of hivectl stop.

Bare hivectl start restores the agents stopped by the last broad-scope stop (or starts everything if none); scope flags narrow it.

Usage: hivectl start [OPTIONS]

Options:

hivectl restart

Restart containers hive-wide — stop then start over one scope.

Bare hivectl restart restarts everything; scope flags narrow it.

Usage: hivectl restart [OPTIONS]

Options:

hivectl quota

Per-agent disk accounting + optional quotas via btrfs qgroups.

Opt-in: enable qgroup accounting, then report per-agent usage or cap an agent. No-op on non-btrfs hosts.

Usage: hivectl quota <COMMAND>

Subcommands:

hivectl quota enable

Enable btrfs qgroup accounting on the agent-state filesystem.

Run once before show / limit. No-op on non-btrfs hosts.

Usage: hivectl quota enable

hivectl quota show

Report per-agent disk usage from btrfs qgroups (all agents, or one by name)

Usage: hivectl quota show [NAME]

Arguments:

hivectl quota limit

Set or clear an agent's disk-usage quota

Usage: hivectl quota limit <NAME> <SIZE>

Arguments:

hivectl subvol

btrfs subvolume management for agent state dirs.

Upgrade an existing plain-dir agent's state into a btrfs subvolume so it gains snapshots and per-subvol usage/quota.

Usage: hivectl subvol <COMMAND>

Subcommands:

hivectl subvol upgrade

Convert a plain-dir agent state root into a btrfs subvolume in place, so it gains snapshots and per-subvol usage/quota.

Bounces the agent to migrate its state, so it requires --yes.

Usage: hivectl subvol upgrade [OPTIONS] <NAME>

Arguments:
Options:

hivectl subvol snapshot

Read-only snapshots of an agent's state subvolume

Usage: hivectl subvol snapshot <COMMAND>

Subcommands:

hivectl subvol snapshot create

Create a read-only snapshot (agent must already be a subvolume)

Usage: hivectl subvol snapshot create --label <LABEL> <NAME>

Arguments:
Options:

hivectl subvol snapshot delete

Delete a snapshot created by subvol snapshot create

Usage: hivectl subvol snapshot delete <NAME> <LABEL>

Arguments:

hivectl subvol snapshot send

Export a snapshot to a local file via btrfs send (the local-file half of inter-hive migration transport; the cross-hive ssh ... btrfs receive leg isn't wired up yet). Also useful standalone as a point-in-time backup: a full send with no --parent produces a self-contained archive of the snapshot

Usage: hivectl subvol snapshot send [OPTIONS] --dest <DEST> <NAME> <LABEL>

Arguments:
Options:

hivectl open

Print (and best-effort open in a browser) a hive web surface URL.

Resolves the URL from the running daemon so custom forge / matrix domains work. Bare hivectl open opens the operator dashboard.

Usage: hivectl open [TARGET]

Arguments:

hivectl completions

Generate a shell completion script for hivectl and print it to stdout.

Supports bash, zsh, fish, elvish, and powershell. The NixOS module already installs the zsh script system-wide; this is for ad-hoc or other-shell use.

Usage: hivectl completions <SHELL>

Arguments:

This document was generated automatically by clap-markdown.