opschain academy register
packs:academy
opschain academy register [flags]
Performs the first-start registration on its own: generates the agent's
deployment key into the data directory (owner-only permissions), exchanges
the single-use registration grant named by --grant-file for the agent's
bearer credential and pins the Academy Server's signing key in the store.
academy serve does the same on its first start when a grant file is
given; register is for preparing a deployment before it serves. The
grant is consumed; delete the file afterwards.
The launcher wires the product in before the agent starts: the targeted
OpsChain server (--server, OPSCHAIN_SERVER or the active context —
never local mode) becomes the agent's OPSCHAIN_SERVER, and your stored
opschain login session for that server — or OPSCHAIN_ACADEMY_TOKEN
when set — becomes its OPSCHAIN_ACADEMY_TOKEN. The agent only ever reads
with it. Without an installed agent, a server target, a credential or an
Academy Server (--academy-server, or ACADEMY_AGENT_SERVER) the command
refuses by name. The agent runs in the foreground on this command's
streams; an interrupt, a termination or a hangup is relayed so it ends on
its own terms (see opschain docs cli/academy-serve), and its exit status
becomes this command's.
Flags
Every flag maps onto the agent's own flag of the same meaning and its
ACADEMY_AGENT_* environment variable (a flag wins over the environment;
only flags you set are passed). --academy-server is the Academy Server,
distinct from the global --server, the OpsChain server the agent reads.
| Flag | Meaning |
|---|---|
--academy-server <url> | the Academy Server base URL (ACADEMY_AGENT_SERVER) |
--listen <addr> | address the learner pages listen on (default 127.0.0.1:8070; ACADEMY_AGENT_LISTEN) |
--data-dir <dir> | directory for the agent's store, deployment key and pack cache (default <opschain home>/academy; ACADEMY_AGENT_DATA_DIR) |
--grant-file <path> | file holding the registration grant, read at first run (ACADEMY_AGENT_GRANT_FILE) |
--key-file <path> | file holding the deployment key seed; default <data-dir>/deployment.key (ACADEMY_AGENT_KEY_FILE) |
--single-learner | the learner-local lane: one learner signing evidence with their own key (ACADEMY_AGENT_SINGLE_LEARNER) |
--label <text> | label shown to Academy administrators for this agent (ACADEMY_AGENT_LABEL) |
--session-ttl <duration> | browser sign-in lifetime, e.g. 12h (ACADEMY_AGENT_SESSION_TTL) |
--sync-interval <duration> | offline queue push and pack refresh interval, e.g. 30s (ACADEMY_AGENT_SYNC_INTERVAL) |
| `--tutor-provider anthropic | openai` |
--tutor-model <id> | the tutor model id; the provider's default when empty (ACADEMY_AGENT_TUTOR_MODEL) |
--tutor-base-url <url> | the tutor provider base URL; the provider's default when empty (ACADEMY_AGENT_TUTOR_BASE_URL) |
--tutor-key-env <name> | the environment variable holding the tutor model key (default ACADEMY_AGENT_TUTOR_KEY; ACADEMY_AGENT_TUTOR_KEY_ENV) |
--secure-cookies | mark the learner session cookie Secure, behind TLS (ACADEMY_AGENT_SECURE_COOKIES) |
Examples
$ opschain academy register --academy-server https://academy.limepoint.com --grant-file /var/lib/academy/grant --label lab-east
Exit codes: the agent's own exit status (128 plus the signal number when a signal ended it); 2 when no agent is installed, no server is targeted, no credential is available or no Academy Server is named (the message names the fix).
See also
opschain docs cli/academy— the command family and a first session.opschain docs packs-academy— the lanes, the evidence model and the tutor.