Understand

API and CLI

Entry points for local tools and future integrations.

The browser and CLI use the same local runtime and guarded repository/ownership services. Start with the browser for ordinary work; use CLI diagnostics and reviewed operations when appropriate.

Common commands

CommandPurpose
lorecrew serveStart the service and browser listener
lorecrew doctor --jsonInspect the stopped instance and host capabilities
lorecrew init --vault PATHExplicit CLI vault initialization
lorecrew session modelsInspect configured model metadata
lorecrew session create/submit/status/cancelDeliberate local conversation operations
lorecrew repository status/clone/checkpoint/publish/confirm-remoteGuarded native repository workflows
lorecrew sharing enable/join/statusExplicit sharing/authority configuration
lorecrew project handoff/handoff-status/preflight/acceptCheckpoint-aware stopped transfer
lorecrew backup, restore, restore-verifyStopped, fenced recovery
lorecrew service print --platform systemdPrint a template for review

In a source checkout, use node dist/cli.js instead of the managed command. --state-dir PATH selects a separate instance. Offline CLI operations require stopping the service that holds its state lock. Keep your selected LORECREW_AUTH_FILE in the command environment.

Repository/sharing/transfer mutations take reviewed JSON input through --input FILE and a stable --request-id. Inspect the actual operation schema/diagnostic before confirming; do not invent missing ownership or retry uncertain work under a new identity.

HTTP API

The versioned service base is /api/v1. Browser pairing uses /auth/login and /auth/session; writable browser actions require authenticated sessions, correct Origin and CSRF. Scoped API tokens are separate from browser sessions. Do not disable browser-only restrictions to automate private setup/recovery routes.

Key resources include /startup, /snapshot, /agents, /groups, /sessions, /tasks, /projects, /project-catalog and /project-workflows. Responses are schema-validated; mutable operations retain revision/idempotency requirements. See the route schemas in the source for exact request/response types before building an integration.

Local events use server-sent events with cursors. A reset means fetch a fresh canonical snapshot and reconnect at its sequence. Private API/history responses are not service-worker cache content. A public static website cannot control a running instance without its explicit authenticated API access.

The API is an extension seam for future clients. It does not imply MCP connectors, remote command delivery or automatic cross-host control are already implemented.

Read or improve this guide on GitHub

Find your way

Browse all guidesEsc to close