The mental model behind Arkor: project layout, trainer, lifecycle callbacks, and Studio.
This section gives you the mental model you need before diving into the SDK reference or CLI reference. Read these in order; each builds on the previous.
src/arkor/index.ts, src/arkor/trainer.ts), what .arkor/ and ~/.arkor/ are for, and what arkor.config.ts does (and does not) do today.createTrainer: required fields, dataset sources, LoRA settings, and the Trainer.start / wait / cancel lifecycle.onStarted, onLog, onCheckpoint, onCompleted, onFailed), their argument shapes, and when each fires. This is where most of the value of doing fine-tuning in TypeScript lives.You define a Trainer with createTrainer({ name, model, dataset, ... }) in src/arkor/trainer.ts and register it through createArkor({ trainer }) in src/arkor/index.ts. arkor dev opens a local Studio in the browser; clicking Run training in Studio spawns arkor start, which calls trainer.start() and trainer.wait(). While wait() is open, callbacks dispatch from the SSE event stream, training streams from Arkor's managed GPUs, and the same view is reflected back into Studio.