Reference

Configuration, layer by layer.

Every setting is optional. Start with the defaults, keep personal preferences global, and add a small project file only where the workspace needs to differ.

Configuration files

LayerLocationPurpose
Built-inEmbedded in SiloUsable defaults for every option
Global$XDG_CONFIG_HOME/silo/config.tomlUser-wide preferences
Global fallback~/.config/silo/config.tomlUsed when XDG_CONFIG_HOME is unset, empty, or relative
Project<project>/.silo.tomlProject-specific overrides and an explicit root marker
Invocation--cpus, --memory, --sudoContainer overrides for one run

Precedence is built-in defaults → global file → project file → CLI flags. A missing global file leaves the filesystem unchanged and uses built-in defaults. Run silo config edit --global when you want to edit the global config file.

silo config list and silo config list --json omit settings that still match the built-in default. The workspace table is always printed, including the default read-only list. With no other settings, the TOML result is:

[workspace]
read_only = [
    ".git",
    ".jj",
]
silo config path   # list active configuration sources
silo config list   # print the merged result
silo config check  # validate the merged result

How layers merge

Project scalars and arrays replace global values, omitted values inherit, and tables merge recursively by key:

  • Host ports replace as a collection. A project host_ports array replaces the global array; an empty array disables inherited host ports.
  • Environment names replace as a collection. A project env_vars array replaces the global array; an empty array inherits no environment names.
  • Binds and state merge by name and field. Reusing a name under a different bind or state category is an error.
  • Read-only paths replace as a collection. A project workspace.read_only array replaces the global array; an empty array disables inherited read-only workspace overlays without changing bind permissions.
  • Quick commands merge by name. A project may add commands or replace the complete argument array for an inherited name. An empty project table changes nothing.

TOML has no null value that removes an inherited optional scalar. If the global file sets image.dockerfile, container.cpus, or container.memory, a project may replace that value but cannot reset it to Silo's automatic default. Keep these settings out of the global file when some projects need the runtime default. A project can override an inherited shell with shell = "zsh" to select Silo's default shell. Booleans can be reset explicitly with false, and inherited arrays can be reset with an empty array.

Complete example

# Every setting shown here is optional.
# Use exactly one stage starting with a literal FROM silo-base:latest.
# image.dockerfile = "containers/Dockerfile"
# image.dockerfile = "~/silo/Dockerfile"
container.cpus = 4
container.memory = "6G"
container.sudo = false
shell = "zsh"
env_vars = ["OPENAI_API_KEY", "AWS_PROFILE"]
workspace.read_only = [".git", ".jj"]
host_ports = [5432]

[binds]
docs = { source = "~/Documents/docs", target = "~/docs", access = "read-only" }
output = { source = "./output", target = "./output", access = "read-write" }

[state.project]
cargo = { target = "~/.cargo" }
cargo-target = { target = "./target" }

[state.user]
codex = { target = "~/.codex" }

[quick]
test = ["cargo", "test"]
agent = ["codex"]

Do not copy the whole example by default. Include only the settings that express an actual workspace decision.

Image and container options

KeyType and defaultBehavior
image.dockerfilePath; default extrasBuild this single-stage Dockerfile as the tool layer above a literal FROM silo-base:latest. Relative paths resolve from the project root when used. ~/… expands from the host home directory when used. Absolute paths are unchanged. silo config list prints the path as configured. silo image edit opens this path. When the key is unset, it prints a message and does not open an editor.
container.cpusPositive integer; runtime defaultPasses the CPU limit to containers at creation time.
container.memoryNon-empty string; runtime defaultPasses Apple's accepted memory syntax, such as 4G.
container.sudoBoolean; falseGrants the base image's silo user passwordless sudo access in default and custom derivatives.
shellbash, zsh, fish, or nu; default zshSelects an interactive shell supplied by the base image. Silo uses Zsh when omitted and does not read or set the $SHELL environment variable.
workspace.read_onlyRelative directory array; [".git", ".jj"]Overlays each usable existing workspace directory read-only. Paths may be nested. Missing paths are skipped; present files, broken symlinks, and paths that leave the project are skipped with a warning. Malformed entries are errors. Use [] to disable these overlays.

CPU, memory, sudo access, and resolved read-only paths are creation-time settings. A changed value applies after the shared workspace stops and is recreated; Silo joins an already-running workspace with its existing settings without comparing them. A read-only entry is effective only when it is a well-formed relative path to an existing directory that resolves inside the project. Missing paths and duplicates are skipped. A present file, broken symlink, or path that resolves outside the project is skipped and warned about at container creation and on silo config check. Malformed entries fail validation. workspace.read_only = [".git", ".jj", ".github"] additionally protects a project directory, while workspace.read_only = ["."] protects the entire project.

The base image contains the sudo command, but its locked silo user cannot elevate unless container.sudo = true or silo run --sudo enables passwordless access.

Custom Dockerfile contract

FROM silo-base:latest

USER silo
# Add the project-specific tools you need here.
RUN brew install go
USER root

The Dockerfile must contain exactly one stage, and its FROM silo-base:latest spelling must be literal; build-argument forms are rejected. Silo composes that reference into the generated Dockerfile as an internal stage, so silo-base:latest is never sent to a registry resolver. Because the embedded base uses backslash continuations, derivatives must keep Docker's default backslash escape directive. Apple's current builder also requires the composed Dockerfile to remain below 16 KiB. The configured directory remains the build context, including a Dockerfile-specific .dockerignore file. External images remain available through instructions such as COPY --from=registry.example/tools:latest.

Before publication, Silo starts the candidate through its normal entrypoint and checks the silo identity, home, core lifecycle helpers, and supported shells. This is intentionally a small compatibility check. A custom Dockerfile is trusted project input, and its author is responsible for permissions, links, packages, and other root-level changes that may break Silo behavior.

Environment

env_vars = ["OPENAI_API_KEY", "AWS_PROFILE"]

Each entry is the name of a variable to inherit from the silo process that creates the container. Silo passes that name to Apple's runtime as --env NAME. The value stays in the process environment. It is not written into Silo's arguments, into either configuration file, or into silo config list.

RuleBehavior
DefaultNo host variables are inherited. Sessions still have HOME=/home/silo, plus the image environment and Silo's own contract variables.
Name syntaxASCII. The first character is a letter or _. The rest are letters, digits, or _.
Reserved namesHOME, PATH, SHELL, BREW_PREFIX, and any name beginning with SILO_ are rejected.
DuplicatesRepeated names collapse. silo config list prints the set in sorted order.
MergeA project array replaces the global array. env_vars = [] clears names inherited from the global file.
When it appliesContainer creation, for both shared and isolated runs. Joining a running container does not re-read the host environment.

There is no command-line flag for this setting. Export the values in the shell that runs silo run, silo start, or a quick command when that invocation creates the container. After a shared container exists, silo stop it and start the workspace again to capture new names or new values.

Store names in configuration and values in the environment. A value written into .silo.toml becomes an ordinary project file.

Host ports

host_ports = [5432, 8080]

Each value is a host loopback TCP port from 1024 through 65535, with at most 256 ports configured at once. Duplicate values have no effect, and the project array replaces the global array.

In a shared container, each configured port is available on the same IPv4 loopback port, so the example services are reachable at 127.0.0.1:5432 and 127.0.0.1:8080.

Silo establishes an authenticated SSH reverse tunnel for only the configured ports. Each guest listener binds to 127.0.0.1 and connects to the same 127.0.0.1 port on the host; other host services remain inaccessible through the tunnel.

The process that creates a shared container also establishes its tunnel. Joining an already-running container deliberately does not inspect or repair that host process; recreate the container if its tunnel has failed or its configured ports changed.

Host-port access requires the shared lifecycle. Silo warns and ignores host_ports for --isolated runs, regardless of which derivative image is selected.

Host binds

[binds]
reference = { source = "~/Documents/reference", target = "~/reference", access = "read-only" }
artifacts = { source = "./artifacts", target = "./artifacts", access = "read-write" }
FieldDefaultBehavior
sourceRequiredAn existing host directory. ~ expands from host home when used; relative paths resolve from the project root when used. silo config list prints the path as configured.
targetRequiredDestination inside the container.
accessRequiredExplicitly selects read-only or read-write.

Sources are canonicalized when a session starts. Missing paths, broken symlinks, and non-directory sources fail loudly instead of creating an unexpected bind. Silo expands a bare ~ or ~/… for the current user. A ~otheruser path is rejected. Relative sources from both the global file and the project file resolve from the project root.

Managed state

[state.project]
dependencies = { target = "~/.cache/dependencies" }
build = { target = "./target" }

[state.user]
agent-state = { target = "~/.agent" }

A complete state entry requires target. Silo creates private writable host storage:

  • Project state is keyed by canonical project path and entry name.
  • User state is keyed by entry name and is intentionally reused across this user's projects.

Project-state targets beginning with ./ are mounted only when the corresponding directory already exists in the project. Missing paths are silently ignored so configuration shared across projects does not create unrelated directories.

Bind and state names must start with an ASCII letter or digit and then contain only letters, digits, _, or -. One logical name cannot appear in more than one bind or state category, including across global and project configuration.

Target path rules

FormResolves toExample
./…The mounted project working directory./target
~/…/home/silo in every compatible image~/.cargo
/…An absolute container path/output

Mount paths must be non-empty UTF-8. Colons are ordinary path characters; commas and equals signs are reserved by the runtime's structured mount syntax, and newlines are rejected. Targets also may not contain ... Mounts may not replace /home/silo, Silo's lifecycle helper files, or its runtime state and configuration directories. These focused checks prevent direct startup breakage without trying to validate the full filesystem of a trusted custom image.

Runtime mounts are ordered from parent to child. Two configured entries may not resolve to the same target, and a read-write bind or managed-state target may not overlap a configured read-only workspace path as either its ancestor or descendant.

Quick commands

[quick]
check = ["just", "check"]
cx = ["codex", "--model", "gpt-5"]

Each key is the token typed after silo. Each value is a TOML array containing the executable and any fixed arguments. Invocation arguments are appended without shell interpolation.

Global and project quick commands merge by name. A project array replaces only the inherited command with the same name.

Names must contain a non-whitespace character. Names beginning with - or colliding with built-in commands are invalid because built-in subcommands always win. The command array must contain a non-whitespace executable as its first value; later values may be empty when an intentional empty argument is required.

Validation and diagnostics

silo config check is the full, side-effect-free preflight for the effective global and project configuration. An ordinary directory does not need a .silo.toml; defaults and any global configuration still form a complete configuration. The filesystem root / is rejected because it cannot be mounted as a Silo workspace.

The command does not start Apple's container runtime, build an image, create a container, or create managed-state directories. It checks:

  • TOML structure, field types, unknown keys, and quick-command definitions.
  • CPU, memory, host ports, environment names, bind and state names, required fields, access modes, and path syntax.
  • The complete custom-Dockerfile contract, including its resolved file, stage shape, base instruction, escape directive, and composed size.
  • Bind sources after home expansion and canonicalization; each source must already exist as a real directory.
  • Managed-state path derivation, mount targets, duplicate targets, protected runtime paths, and writable overlap with effective read-only workspace paths.

Resolved Dockerfile and bind-source host paths must be valid UTF-8. silo run repeats the relevant validation and filesystem resolution because the configuration or filesystem can change after a successful check. Unknown config keys are errors naming the source file and parser location.