Skip to main content
Version: v5.7.0

opschain academy sync

packs:academy

opschain academy sync [flags]

Runs one sync round on demand: pushes the evidence bundles queued while the Academy Server was unreachable and refreshes the cached packs, exactly as the serving agent does on its --sync-interval. Useful after a long offline stretch, or from a scheduled job beside a co-located agent.

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 its OPSCHAIN_ACADEMY_TOKEN is a scoped API token minted under your stored opschain login session for that server (the session proved first, an expired login refused by name, the token revoked when the agent exits — "The credential" in opschain docs cli/academy-serve) — or the OPSCHAIN_ACADEMY_TOKEN you set, handed over as given. 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.

FlagMeaning
--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-learnerthe 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 anthropicopenai`
--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-cookiesmark the learner session cookie Secure, behind TLS (ACADEMY_AGENT_SECURE_COOKIES)

Examples​

$ opschain academy sync --academy-server https://academy.limepoint.com

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.