donmai is in 0.x preview. APIs may change between minor releases. See the changelog.

The donmai daemon is configured via ~/.donmai/daemon.yaml (YAML format). Run donmai daemon setup to generate an initial file interactively, or create the file manually using the schema described below.

The authoritative Go struct is daemon/config.go.

Top-level fields

KeyTypeRequiredDefaultDescription
apiVersionstringnodonmai.dev/v1Schema version.
kindstringnoLocalDaemonResource kind. Must be LocalDaemon.
machineobjectyesMachine identity block.
capacityobjectyessee belowResource envelope.
orchestratorobjectyesOrchestrator URL and auth token.
projectsarrayno[]Allowlisted project definitions.
autoUpdateobjectnosee belowAuto-update preferences.
observabilityobjectnoLog and metrics tuning.
workareaobjectnosee belowWorkarea surface settings.
kitobjectnosee belowKit scan path settings.
trustobjectnosee belowSignature-verification policy.

machine

KeyTypeRequiredDescription
idstringyesUnique identifier for this machine. Used in session attribution and logs.
regionstringnoOptional region hint (e.g. us-west-2). Informational only.

capacity

KeyTypeDefaultDescription
maxConcurrentSessionsint8Maximum number of agent sessions that may run in parallel on this daemon.
maxVCpuPerSessionint4vCPU budget granted to each session.
maxMemoryMbPerSessionint8192Memory budget (MiB) granted to each session.
reservedForSystem.vCpuint4vCPUs reserved for the host OS and daemon process.
reservedForSystem.memoryMbint16384Memory (MiB) reserved for the host OS.
poolMaxDiskGbint0Trigger LRU eviction of the workarea pool when total disk usage (GiB) exceeds this. 0 means no limit.

orchestrator

KeyTypeRequiredDescription
urlstringyesBase URL of the orchestrator (e.g. https://platform.donmai.dev).
authTokenstringnoBearer token used to authenticate with the orchestrator. Supports ${ENV_VAR} substitution. Can also be set via the DONMAI_DAEMON_TOKEN environment variable.

projects

Each entry in the projects array declares a repository that this daemon is allowed to run sessions for.

KeyTypeRequiredDescription
idstringyesProject identifier (matches the orchestrator project ID).
repositorystringyesGit remote URL or URL pattern for this project.
cloneStrategystringnoOne of shallow (default), full, or reference.
git.credentialHelperstringnoGit credential helper override for this project.
git.sshKeystringnoPath to the SSH key to use when cloning.

Example:

projects:
  - id: my-project-id
    repository: github.com/myorg/myrepo
    cloneStrategy: shallow

autoUpdate

KeyTypeDefaultDescription
channelstringstableUpdate channel. One of stable, beta, or main.
schedulestringnightlyWhen to apply updates. One of nightly, on-release, or manual.
drainTimeoutSecondsint600How long (seconds) to wait for sessions to drain before applying an update.

observability

KeyTypeDefaultDescription
logFormatstringLog output format. One of json or text.
logPathstringOverride for the daemon log file path.
metricsPortintPort to expose Prometheus-compatible metrics. Omit to disable.

workarea

KeyTypeDefaultDescription
archiveRootstring~/.rensei/workareasDirectory the daemon scans for archived workareas.
diffStreamingThresholdint1000Entry count above which the diff endpoint switches to NDJSON streaming.

kit

KeyTypeDefaultDescription
scanPathsstring[][~/.donmai/kits]Ordered list of directories the kit registry walks to discover installed kits. Leading ~/ is expanded to the user home directory.

trust

KeyTypeDefaultDescription
modestringpermissiveSignature-verification policy. One of permissive, signed-by-allowlist, or attested.

Minimal example

apiVersion: donmai.dev/v1
kind: LocalDaemon

machine:
  id: my-macbook

orchestrator:
  url: https://platform.donmai.dev
  authToken: ${DONMAI_DAEMON_TOKEN}

capacity:
  maxConcurrentSessions: 4

projects:
  - id: my-project-id
    repository: github.com/myorg/myrepo

See also: Environment variables