TheDocumentation Index
Fetch the complete documentation index at: https://arkor-92aeef0e-eng-635.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
arkor CLI is the command surface around an Arkor project. The scaffolder installs arkor as a local devDependency, so the commands below are intended to be run from inside that project, where the arkor binary is available via your package manager. Snippets below ship as tab groups, so pick the package manager you use and the rest of the page follows.
Commands
| Command | What it does |
|---|---|
arkor init | Scaffold src/arkor/index.ts + arkor.config.ts in the current directory. |
arkor dev | Launch Studio on http://localhost:4000 (configurable). |
arkor build | Bundle src/arkor/index.ts to .arkor/build/index.mjs. |
arkor start | Run the build artifact (auto-builds when missing). |
arkor login | Sign in. With no flags, prompts interactively (default selection: Anonymous). Pass --oauth for the loopback Arkor Cloud OAuth (PKCE) flow or --anonymous to skip the picker. |
arkor logout | Delete ~/.arkor/credentials.json. |
arkor whoami | Print the current identity and reachable orgs. |
Conventions across commands
--help/-his available on every command;arkor <command> --helpprints the flag list and usage.arkor --version/-Vprints the installed SDK version (the sameSDK_VERSIONthe package exports).- Exit codes. Successful commands exit 0. Most commands exit non-zero on failure (uncaught throws, build errors, etc.).
arkor whoamiis a deliberate exception: it prints the failure to stdout but still exits 0 for ordinary cloud-api errors (Failed to fetch /v1/me (<status>)), and only setsprocess.exitCode = 1when the cloud-api responds with 426 (SDK too old). Wrapper scripts that need to detect awhoamifailure should grep stdout, not rely on the exit code. - Telemetry. Every command runs through a small instrumentation wrapper so usage events can be sent to PostHog. See Environment variables below for the full opt-out / debug knobs.
- Deprecation notices. When the cloud-api response carries
Deprecation: true, the CLI prints a one-line warning at the end of the run with the suggested upgrade command. TheWarningandSunsetheaders (when present) format the message; they do not trigger the warning on their own.
Environment variables
| Variable | Effect |
|---|---|
DO_NOT_TRACK=1 | Disable telemetry across every command. The persistent telemetry-id file is not created or read. |
ARKOR_TELEMETRY_DISABLED=1 | Same as DO_NOT_TRACK. Provided as an Arkor-specific alias for setups that already gate other tools on DO_NOT_TRACK and want a separate switch. |
ARKOR_TELEMETRY_DEBUG=1 | Enable verbose internal logging from the telemetry module (init failures, identity-file read/write errors, capture failures, shutdown errors). Telemetry is still sent when this flag is on; this is a diagnostic aid, not a dry-run switch. To stop sending events, use DO_NOT_TRACK=1 or ARKOR_TELEMETRY_DISABLED=1. |
CI=1 (or any non-TTY stdout) | Force non-interactive mode. arkor init skips its prompts and uses the values you passed via flags (or built-in defaults under --yes); git init runs without asking when --git or --yes is set, and is skipped silently otherwise. See arkor init § In CI / non-interactive shells. |
On the roadmap
The CLI does readARKOR_CLOUD_API_URL and uses it as the cloud-api endpoint when set (packages/arkor/src/core/credentials.ts’s defaultArkorCloudApiUrl), but pointing at a non-default endpoint (self-hosted or staging) is not yet a stable user-facing knob: the env var is internal-only and may change without notice, and there are no compatibility guarantees on alternate endpoints. First-class support for self-hosted / staging deployments is on the roadmap.
Programmatic invocation
Thearkor package re-exports runTrainer so you can drive a training run from your own TypeScript code instead of going through arkor start:
runBuild, runStart, runDev, etc.) are intentionally not part of the public surface and may change without notice. If you want to wire training into your own code, prefer runTrainer or call trainer.start() / trainer.wait() directly.
Project versus user state
Two locations matter, and the CLI reads / writes both:.arkor/(per-project, gitignored):state.json(project routing) andbuild/index.mjs(the bundled trainer).~/.arkor/(per-user):credentials.json(auth) andstudio-token(per-launch CSRF token, transient).