Expand description
choir — the agent-facing command line for a choir node.
Everything the templates teach an agent to do by hand (mint a key,
provision a workspace, sign and submit ops, run a review round) as
one binary. All HTTP shells out to curl; the daemon base URL is a
positional argument (no crate reads environment variables).
choir [--auth-file <path>] [--auth-user <name>] <command> ...
choir key <key-file> [name]
choir git-credential <auth-file> [--auth-user <name>] get|store|erase
choir invite <api> <name> <owner/repo> [read|write]
choir asks <api>
choir grant <api> <request-id> <owner/repo> [read|write]
choir decline <api> <request-id>
choir join <link> | <api> <invite-file> <key-file> [--user <name>] [--channel <name>] [--key-file <path>] [--ssh-key <path>] [--token-file <path>]
choir workspace <api> <owner/repo> <name> [--base <git-oid> --owner <channel> --key-file <path> --change <id> --idempotency-key <key>]
choir checkpoint <api> <key-file> <channel> <change-id> <workspace-id> <git-oid>
choir propose [reviewer]... [--key-file <path>] [--channel <name>] [--api <url>] [--repo <owner/repo>] [--onto <branch>]
choir workspace-archive <api> <key-file> <channel> <owner/repo> <name> <change-id> <idempotency-key>
choir submit <api> <key-file> <channel> '<op-json>'
choir review <api> <key-file> <channel> <id> <git-oid> [--ref <repo:ref>] [reviewer]...
choir verdict <api> <key-file> <reviewer> <id> approve|request-changes [note]
choir slash <api> <node-key-file> <id> <reviewer> '<reason>'
choir bind <api> <node-key-file> <operator> <key-hex> [channel]
choir revoke <api> <node-key-file> <key-hex> '<reason>'
choir appeal <api> <attempt-id>
choir intent <api> <key-file> <channel> <subject> <kind> '<body>'
choir check <api> <key-file> <channel> <git-oid> <name> passed|failed|running|errored [evidence] [--ref <repo:ref>]
choir checks <api> <git-oid>
choir reviews <api> <reviewer>
choir acl render <api> <acl-file>
choir view <api>
choir triage <api>
choir funnel <api>
choir state <api> <channel>
choir skill install [--into <dir>]
choir repair <log-file> --verify | --truncate-tailExit codes: 0 = the node accepted, 1 = the node rejected (the JSON
error body is printed), 2 = usage error. choir checks adds 3 = the
answer is not decided yet and 4 = a check could not be run at all,
which is our fault rather than the commit’s and wants a re-run
rather than a rewrite; see check_exit.
choir doctor reads the same two codes as everything else — 0
nothing required is missing, 1 something is — so that choir doctor && choir propose … means what it looks like it means. A degraded
but working machine exits 0; see choir_cli::doctor.
Structs§
- Auth
Options 🔒 - Node
Options 🔒 - The node URL configured for this directory, if any.
- Propose
Options 🔒 - Flags of
choir propose, after parsing.
Enums§
- Invite 🔒
- Where the credential that redeems an invite came from.
Statics§
- DEFAULT_
AUTH 🔒 - The credential
choir initwrote, found once.
Functions§
- acl_
render 🔒 - Rewrites an ACL file’s trailing comments from the node’s roster (D46).
- actor_
id_ 🔒from_ hex - Derives the actor id from a 64-character ed25519 public key hex.
- asks 🔒
choir asks <api>— the queue, oldest first.- batch 🔒
- Signs every op in
sourceon one channel and submits them as one batch (D17). - binding_
json 🔒 - The binding an adapter echoes back so its orchestrator can store it.
- check_
exit 🔒 - Prints the checks on
subjectand exits with the trichotomy. - checked_
level 🔒 - Refuses a level that is not one, before the node has to.
- configure_
git_ 🔒credential - Points git at the token for one node, and returns the file it wrote.
- configured 🔒
- One key out of the nearest
.choir/config. - configured_
in 🔒 - One key out of one
.choir/configfile. - configured_
node 🔒 - current_
binding 🔒 - The binding
/api/viewcurrently reports foractor_id, if any. - current_
change_ 🔒revision - decline 🔒
choir decline <api> <request-id>- derived_
view 🔒 - Fetches
/api/viewand applies a pure derivation to it, pretty-printed. - discovered_
auth_ 🔒file ~/.choir/authif it exists, or whatever.choir/confignames.- ensure_
state_ 🔒dir - Creates
~/.choirat 0700 if it is not there. - finish 🔒
- Prints the response body and exits nonzero unless the status is 2xx.
- git_
capture 🔒 - Runs
gitindirand returns its trimmed stdout. - git_
credential 🔒 choir git-credential <auth-file> [--auth-user <name>] <operation>- git_run 🔒
- Runs
gitindirfor effect, streaming its output to this process’s own. - grant 🔒
choir grant <api> <request-id> <owner/repo> [read|write]- grant_
line 🔒 - A repository argument as the ACL spells one.
- handover 🔒
choir hoststopping to hand one thing back to the person running it.- hash_
from_ 🔒hex - Parses a
<codec>-<digest>content hash as served by the node. - hex_
encode 🔒 - home_
dir 🔒 - The home directory the service manager keeps its units under.
- home_of 🔒
- One account’s home directory, out of the password database.
- host 🔒
choir invite <api> <name> <owner/repo> [read|write]- host_
failed 🔒 choir hostgiving up, having said what it got through.- http 🔒
- One HTTP round trip through the shared endpoint and auth adapter.
- install_
unit 🔒 - Renders the supervision file and hands the node to the service
manager, returning the unit written and the
choirit runs. - invite 🔒
- invoked_
command 🔒 - The command word this invocation was reaching for, if any.
- is_help 🔒
- Both spellings of the request for help.
- join 🔒
choir join <link>, orchoir join <api> <invite-file> <key-file>- latest_
snapshot 🔒 - The log identity to sign a scope against:
(node, head)from/api/view. - load_
key 🔒 - Loads the 32-byte secret key file, creating it (0600) if absent.
- load_
registry 🔒 - The trusted keys this client holds, in the operator’s own file format: one key per line, hex, with an optional channel name before it.
- log 🔒
- log_
scope 🔒 - main 🔒
- may_
hold_ 🔒credential - Whether a bearer token may be sent to this node without being asked for by name.
- node_
options 🔒 - Parses the options both node-starting commands take.
- node_
tls 🔒 choir node tls— obtain the certificate and wire up its renewal.- note 🔒
- A short human summary on stderr, when a person is looking.
- operator_
call 🔒 - One authenticated call to the node, for the operator-side commands that are a request and a printed answer and nothing else.
- parse_
auth 🔒 - parse_
content_ 🔒hash_ hex - parse_
propose 🔒 - positional_
propose 🔒 - Splits off the deprecated
<key-file> <channel>prefix, if this invocation carries one. - propose 🔒
choir propose [flags] [reviewer]...- propose_
abort 🔒 - Aborts a proposal, naming the step that failed.
- redeem_
next 🔒 - The repair for a refused redemption, worked out from the node’s message.
- refusal_
next 🔒 - The
nextline out of a node’s structured rejection. - repair 🔒
choir repair <log-file> --verify | --truncate-tail.- require_
node_ 🔒key_ file - Refuses to sign an operator-only op with a key file that does not already exist.
- rerun_
line 🔒 - The same
choir hostinvocation, to print as the thing to run next. - revocations 🔒
- Reads log entries from a cursor and, with
--verify, checks them the waySYNC.mdsays a client should (D17). - run_
step 🔒 - Runs one service-manager command, reporting the ones that matter.
- runner 🔒
- One lifecycle step for an orchestrator adapter.
- runner_
finish 🔒 - Emits a runner result and exits, data on stdout and nothing else.
- runner_
json 🔒 - Reads a JSON document, mapping every failure to a typed refusal.
- signed_
body 🔒 - Signs
opon attribution channelchanneland builds its submission body. - signed_
payload_ 🔒body - Signs raw
payloadbytes onchannel. Owner authorizations travel inside a request body rather than the op log, so unlikesigned_bodythis carries no log scope. - state_
dir 🔒 ~/.choir, the layoutchoir initwrites.- step 🔒
- One line of
choir host’s progress. - submit 🔒
- supervisor 🔒
- The service manager, or a refusal naming what this machine is.
- tls_
line 🔒 - The
sudolinechoir hostasks for, spelled out. - usage 🔒
- Refuses an invocation, saying the smallest true thing about it.
- with_
configured_ 🔒node - Fills in the node URL for a command that takes one and was not given one.
- workspace_
body 🔒 - write_
home_ 🔒config - Records the node, channel and key in
~/.choir/config.