Skip to content

Configuration

crib reads settings from two TOML files: a user-level global config at ~/.config/crib/config.toml and a per-project .cribrc from the directory passed via --dir, or the current working directory if --dir is not set. Project-level values override global values on key conflicts.

Respects $XDG_CONFIG_HOME. The file is optional; missing sections fall back to crib’s built-in defaults.

KeyTypeDefaultDescription
repositorystringGit URL for dotfiles repository
targetPathstring~/dotfilesClone destination inside the container
installCommandstringCommand to run after cloning
KeyTypeDefaultDescription
disablearray of stringsPlugin names to skip globally
disable_allbooleanfalseKill switch: skip every bundled plugin

Settings applied to every crib up regardless of project. Lower priority than project-level config: project values win on key conflicts.

KeyTypeDefaultDescription
envmap of string to stringEnvironment variables injected into every container
mountarray of stringsMount specs (target required; type optional; accepts src/source, dst/destination/target, and readonly/ro)
run_argsarray of stringsExtra container runtime arguments (single-container mode only)

Global run_args are honored only for single-container workspaces. For compose-based workspaces, set runtime options directly in the compose YAML.

env values and mount specs support devcontainer-style variable substitution:

VariableExpands to
${localEnv:VAR}Host environment variable VAR; empty string if unset
${localEnv:VAR:fallback}Host environment variable VAR, or fallback if unset
${localWorkspaceFolder}Absolute path of the project root on the host
${localWorkspaceFolderBasename}Basename of the project root
${localWorkspaceParentFolder}Parent directory of the project root
${containerWorkspaceFolder}Workspace path inside the container

Example:

[workspace]
env = { CARTAGE_PATH_MAP = "/workspaces:${localWorkspaceParentFolder}" }
mount = ["type=bind,source=${localEnv:XDG_RUNTIME_DIR},target=/run/host,readonly"]
run_args = ["--cap-add", "SYS_PTRACE"]

Placed in the project root. Merges with the global config; project values override global on conflicts. When --dir is passed, .cribrc is read from that directory; otherwise it comes from the current working directory.

KeyTypeDescription
configstringDevcontainer config directory (same as -C / --config)
cachearray of strings, or comma-separated stringPackage cache providers (e.g. "npm", "pip")
dotfiles.repositorystringDotfiles repo URL (overrides global)
dotfiles.targetPathstringClone destination (overrides global)
dotfiles.installCommandstringInstall command (overrides global)
dotfilesfalse or "false"Kill switch: skip dotfiles for this project
plugins.disablearray of strings, or comma-separated stringPlugin names to skip for this project
pluginsfalse or "false"Kill switch: skip every plugin for this project
workspace.envmapExtra env for this project (overrides global [workspace].env on key conflict)
workspace.mountarrayExtra mounts for this project (merged before global mounts; project wins on target conflicts)
workspace.run_argsarrayExtra runtime args for this project (win over global on flag conflicts; lose to devcontainer.json runArgs)

Both TOML array syntax and the legacy comma-separated string form are accepted for list values:

# TOML array (preferred)
plugins.disable = ["ssh", "dotfiles"]
cache = ["npm", "pip"]
# Comma-separated string (legacy format, still supported)
plugins.disable = "ssh, dotfiles"
cache = "npm, pip"

Example .cribrc:

config = ".devcontainer-custom"
cache = ["npm", "pip"]
[dotfiles]
repository = "git@github.com:user/dots"
[plugins]
disable = ["ssh"]
[workspace]
env = { PROJECT_FLAG = "on" }