For AI agents: the complete documentation index is available at https://enclo.nstlopez.com/llms.txt, the full documentation bundle is available at https://enclo.nstlopez.com/llms-full.txt, and this page is available as Markdown at https://enclo.nstlopez.com/reference/configuration.md.

Configuration

enclo config reads and updates persistent defaults stored in $ENCLO_HOME/config.json.

enclo config                                    # lists every key, its value and where it comes from
enclo config get sandbox.defaults.memory
enclo config set sandbox.defaults.memory 1024MiB
enclo config unset sandbox.defaults.memory

Keys

KeyValueDefault
sandbox.defaults.cpusNumber of vCPUs2
sandbox.defaults.memory2048MiB, 2GiB, or a bare number of MiB2048 MiB
sandbox.defaults.idle_timeout90s, 15m, 2h, 1d, or a bare number of seconds (0 disables timeout)15 minutes
session.baseName or ID of an existing sandbox to clone for every new sessionNone, so sessions start empty
prune.older_than14d, or a bare number of days14 days

Example configuration file:

{
  "sandbox": { "defaults": { "cpus": 2, "memory": "2048MiB", "idle_timeout": "15m" } },
  "session": { "base": "dev" },
  "prune": { "older_than": "14d" }
}

Unknown keys inside any of these sections cause an error naming the file and key, since they are usually typos. enclo config unset operates on the raw file, so you can use it to remove a bad key from a file that fails to load.

Environment

VariableWhat it sets
ENCLO_HOMEDirectory for sandboxes and configuration (default ~/.enclo)
ENCLO_CPUSsandbox.defaults.cpus
ENCLO_MEMORY_MIBsandbox.defaults.memory, in MiB
ENCLO_IDLE_TIMEOUT_SECSsandbox.defaults.idle_timeout, in seconds
ENCLO_KRUN_LOGSet to debug to show libkrun's own log

Precedence

Command-line flags override environment variables, and environment variables override config.json. For example, enclo new --memory 4096 allocates 4096 MiB regardless of ENCLO_MEMORY_MIB or config.json.

Regardless of configuration, a single sandbox is capped at your host's core count for vCPUs and half of host memory.