Skip to main content

join

Function join 

Source
pub(crate) fn join(
    api: &str,
    invite: Invite<'_>,
    key_file: Option<&str>,
    rest: &[&str],
) -> !
Expand description

choir join <link>, or choir join <api> <invite-file> <key-file>

Admission in one command: mint an actor key, redeem the operator’s invite, store the token where the rest of the CLI reads it, and — for the link form — leave git and ~/.choir/config set up so that the next thing the reader types is git clone and the thing after it is choir propose.

The link is the whole input. It carries the node and the invite, which is why the one thing a person was actually sent is now the one thing they have to paste. It reaches curl over stdin like every other credential here, never on an argv, where ps would show it.

The three-argument form stays because agents and provisioning scripts hold those paths. It answers with JSON, writes the token beside the key rather than into ~/.choir, and touches neither git nor the home directory: a command that edits ~/.gitconfig without being asked is one nobody can run under an automation account twice.

What this does not do is decide admission. The operator issued the invite, and the invite carries the grants; this only spares them the second out-of-band step of pasting a key line into a file. A node started without --invite-binds-keys refuses the key and says so, and admission there still ends with an operator’s edit.