~/msb-manager$docs v0.14.0 github

Configuration

Four TOML files, later ones winning. See How it works for how they merge. The comments in the shipped defaults.toml and in the files the wizard writes are the long-form documentation of every key; this page is the map.

Files and directories#

PathWhat
<install>/defaults.tomlthe shipped defaults. Never edit; an upgrade replaces it
~/.config/msb/config.tomlyour overrides
~/.config/msb/CLAUDE.local.mdyour additions to every sandbox's CLAUDE.md
~/.config/msb/sandboxes/<name>.tomlone registry entry per sandbox
~/.config/msb/secrets/global.envthe Claude token, and an optional GH_TOKEN for version checks (0600)
~/.config/msb/secrets/<name>.envthat sandbox's tokens (0600)
<project>/.msb/sandbox.tomlthe project's portable policy
~/.local/state/msb/policy/<name>/a repo sandbox's .msb/, as fetched from GitHub, and meta.json
<project>/.msb/dev.yamlthe image, and nothing else; read by msbctl, never passed to msb
~/.local/state/msb/claude/<name>/that sandbox's ~/.claude
~/.local/state/msb/profile/the assembled CLAUDE.md, mounted read-only
~/.local/state/msb/agent/the SSH-agent filters' sockets and logs
~/.local/state/msb/versions.jsonthe cached version checks
~/.local/state/msb/policy-approved/<name>.jsonthe project policy last approved for that sandbox

MSB_CONFIG_DIR and MSB_STATE_DIR move the two roots.

Value types#

The tables below name a type for each key. These are what the types mean, and what msbctl checks before it hands a value to msb.

TypeWritten asChecked
size"8G": a whole number and M, G or Tdisk sizes when the disk is made (is not a size like 5G or 512M); memory is passed to msb as it is
rule"allow@github.com:tcp:443", see the rule grammarits shape, before create, naming the file it's in; msb checks the target
groupa name from [rules], shipped or yoursan unknown name stops the create with unknown rule group
guest pathan absolute path inside the sandboxno :; not inside /bin, /boot, /dev, /etc, /lib*, /proc, /run, /sbin, /sys or /usr; not one of /, /home, /media, /mnt, /opt, /root, /srv, /tmp or /var; not over a folder msbctl mounts itself
host pathabsolute, or starting with ~~ is expanded to your home
image referenceregistry/name:tag@sha256:…a path is refused: msb would boot a host folder
lista TOML array, ["a", "b"]

config.toml#

Keep it short: a value copied here from defaults.toml stops following the shipped one. Tables merge with the shipped ones key by key; anything else, including a whole egress group, replaces the shipped value.

[defaults]#

KeyTypeDefaultMeaning
workspaceshost path"~/workspaces"where a bare name given to msbctl add resolves. "" resolves against the current directory
guest_path"/work", "host" or a guest path"/work"where a new sandbox mounts its project. "host" means the host's own path
imageimage referencea pinned devcontainers Ubuntu digestthe image a new sandbox starts from
cpusinteger4
memorysize"8G"a ceiling, not a reservation
root_disksize"16G"the writable root disk
rule_groupslist of groups["github", "claude"]groups a new sandbox gets on top of base
egress_mode"enforce" or "observe""enforce""observe" stops blocking for every sandbox; per sandbox is better (msbctl observe)
private_dns_groupslist of groups[]groups whose names resolve to private addresses; projects using one get allow_private_dns
claude_auth"secret" or "mount""secret""mount" shares the host's real ~/.claude instead of a placeholder token. A fallback only
claude_tokentoken name"main"the stored Claude token a sandbox uses unless its registry entry sets claude_token
agentslist of "claude", "pi"["claude"]the coding agents ticked for a new sandbox in msbctl add; [] for none. pi is ticked too whenever llm names an endpoint. The first-run setup skips the Claude login and model endpoints when no new sandbox would use them
llmlist of endpoint names[]the model endpoints a sandbox with pi gets unless its registry entry sets llm; the first is pi's default
toolslist of tool names[]the agent tools a new sandbox gets unless its registry entry sets tools; each is a folder under ~/.config/msb/tools
identityidentity name""the [identities] entry new sandboxes use
git_push"gh" or "ssh""gh"how a new sandbox's git reaches GitHub: "gh" is https with the GitHub token, "ssh" the filtered agent. See git push
git_checkstatbooleantrueset core.checkStat = minimal in each mounted project's repos on each shell/exec, so a host editor doesn't rewrite .git/index under the sandbox
nested_virtbooleanfalsegive a sandbox /dev/kvm (nested virtualization) unless its project or registry entry says otherwise
workspace_disksize"20G"the clone's disk volume for a sandbox without a folder; fixed when created

[identities.<name>]#

toml
[identities.public]
name        = "yourhandle"
email       = "12345+yourhandle@users.noreply.github.com"
signing_key = "ssh-ed25519 AAAA..."      # optional: sign commits with this key
push_key    = "ssh-ed25519 AAAA..."      # optional: push over ssh with this key

Applied inside the guest with git config --system, the lowest of git's three layers, so a repo's own identity still wins. See commit signing and git push.

[rules]#

Egress groups, name = [rule, …]. Yours are added to the shipped ones; a shipped name redefined here replaces that group entirely. See Network & egress.

[env]#

Environment variables every sandbox gets. The shipped set is DO_NOT_TRACK = "1" and EDITOR = "nano". Projects merge their own over these. Fixed at create time.

[agent_env.claude]#

Environment variables only for sandboxes with Claude Code. The shipped set turns off telemetry, error reporting, feedback prompts and the auto-updater, and sets IS_SANDBOX = "1". Claude Code runs as root in the sandbox, and without that setting it and claude-agent-acp (the adapter Zed uses) don't offer bypass-permissions mode (--dangerously-skip-permissions). Every [env] table, yours or a project's, overrides these. Fixed at create time.

[agent_env.pi]#

The same for sandboxes with pi: PI_OFFLINE = "1", which turns off its update check and install ping.

[llm.<name>]#

A model endpoint for pi: base_url (HTTPS) for your own server, or provider for one pi knows, and default_model, the model pi starts with. Without a fixed models list, pi is offered whatever the server serves at each start. Also api, context_window, max_tokens, reasoning, private_dns, ca_cert and compat. None ship; msbctl setup → "Model endpoints" writes them, and its key goes to secrets/global.env as LLM_KEY_<NAME>. See Your own models.

[versions]#

Component pins for the bootstrap: node (major), npm, gh, gitleaks, bun. A sandbox's own [versions] overrides these. npm is installed over the one node's major line ships (node 24 comes with npm 11); "" keeps that one. npm 12 needs node 22.22.2 or later, so a lower node needs a lower npm too.

[version_check]#

KeyTypeDefaultMeaning
ttl_hoursinteger6how long upstream version checks are cached
use_global_tokenbooleantrueuse GH_TOKEN from secrets/global.env for them, if present

[secrets]#

KeyTypeDefaultMeaning
store"file", "keyring" or "auto""file"where new secret values go. See the keyring; msbctl secret migrate moves the existing ones and sets this

[managed] and [clients.<name>]#

The host-wide keys every managed client shares (the proxy, its address and base_url, the port pools, and optional totals over every client's sandboxes), and one table per client other than Kandev, whose own table is [kandev]. Both are described on the Managed clients page, and msbctl host managed configure sets them.

[secret_presets.<name>]#

What msbctl secret add offers. Shipped: npm, dockerhub, ghcr, pypi, crates.

toml
[secret_presets.mytool]
env   = "MYTOOL_TOKEN"
hosts = ["api.mytool.example"]
help  = "https://mytool.example/settings/tokens"
usage = "mytool login --token \"$MYTOOL_TOKEN\""

.msb/sandbox.toml#

The project's policy. It never contains a host path, a token or a sandbox name, so it's safe to commit.

KeyTypeDefaultMeaning
rule_groupslist of groups[defaults] rule_groupsegress groups, on top of base
extra_ruleslist of rules[]one-off rules, emitted last
allow_private_dnsbooleanfalseaccept DNS answers that point at private addresses
secret_bindslist of "ENV[:OPTIONS]@HOST[,HOST]"[]extra secrets; the values live in secrets/<name>.env or the keyring
cpusinteger[defaults] cpus
memory, root_disksize[defaults]
containers_disksizenonea disk for /var/lib/containers, kept across rebuilds
nested_virtboolean[defaults] nested_virt/dev/kvm in the guest (nested virtualization); the podman feature sets it. Approved like the egress rules, fixed at create time
identityidentity name[defaults] identitythe [identities] entry this project commits as
[env]table of stringsextra environment variables, merged over the machine-wide set
[caches]table of sizesone disk per package manager: npm, bun, python, rust, go
[secrets] githubbooleantrue with a GitHub repobind this project's GH_TOKEN

[bootstrap]#

KeyTypeDefaultMeaning
packageslist[]extra apt packages
claudebooleantrueinstall Claude Code and its ACP adapter, claude-agent-acp
pibooleanfalseinstall pi, the agent for any model. Which endpoints it gets is machine-local
bun, gitleaksbooleanfalseinstall these
containers_storage"fuse-overlayfs"nonefor podman without a container disk
scriptpath inside the projectnonea project script run last, inside the guest, from the project folder

.msb/dev.yaml#

One line msbctl reads: image:, which must be an image reference (registry/name:tag@sha256:…); a path is refused. The file is never passed to msb. msb's own config file can mount host paths, copy host files into the guest and fill in ${VAR} from msb's environment, which holds the bound secrets, and the project folder is writable from inside the sandbox. So a create or rebuild refuses a dev.yaml that sets anything else. The cpus, memory and workdir keys older versions wrote are accepted and ignored. msbctl show warns about a file a rebuild would refuse; a sandbox that already exists keeps starting.

A dev.yaml withmoves to
env:[env] in .msb/sandbox.toml
cpus:, memory:.msb/sandbox.toml
mounts:, ports:msbctl mount, msbctl port (the registry entry)
anything elsea file of your own, named by msb_conf in the registry entry

msb_conf is the operator's escape hatch for msb features msbctl doesn't model (user, rlimits, security, …). It lives in the registry entry only, must be an absolute path, and may not contain ${. The flags msbctl emits win over it.

The policy pin#

These keys in .msb/sandbox.toml are applied only once approved on the host (see the policy pin): rule_groups, extra_rules, allow_private_dns, secret_binds, [secrets], cpus, memory, root_disk, containers_disk, [caches] and, once it is on, [bootstrap] pi, which brings this machine's model endpoints with it. They decide what may leave the sandbox, which host a stored value is sent to, and what the sandbox takes from the host: a committed memory = "256G" is as much a change as a new rule. image, the rest of [bootstrap] and [env] aren't pinned; they act only inside the guest. The approved values are kept in ~/.local/state/msb/policy-approved/<name>.json, and their digest as policy_pin in the registry entry. Keys in the registry entry itself are yours and are never re-approved.

The registry entry#

~/.config/msb/sandboxes/<name>.toml is machine-local and never committed. Any key it sets overrides the project's file.

KeyTypeMeaning
name, projectstring, host paththe sandbox's name and the absolute path of its project folder
source, repo, refstringssource = "repo" for a sandbox without a folder, which has repo and an optional ref instead of project
guest_path"/work", "host" or a guest pathwhere the project appears inside: "/work", "host" (the same path as project) or an absolute path. Absent means the [defaults] value. Needs a rebuild
repoowner/name or a clone URLthe project's repository: owner/name on GitHub, the clone URL (https://, ssh:// or user@host:path) anywhere else. Only a GitHub repo gets the token step and binding; shown in the picker
identityidentity namean [identities] name; applied at every start
claude_tokentoken namea stored Claude token's name; absent means [defaults] claude_token
llmlist of endpoint namesthe model endpoints pi gets, first being its default; absent means [defaults] llm. Needs a rebuild
toolslist of tool namesthe agent tools it gets, by folder name; absent means [defaults] tools. Their rules and environment need a rebuild; the adapter files refresh at every start
git_checkstatbooleanabsent means [defaults] git_checkstat. Applied on each shell/exec; false doesn't remove the value from repos that already have it
autostartbooleanstarted when the picker opens
ssh_keyslist of fingerprintskey fingerprints this sandbox may use. Absent means all, [] means none
mountslistextra folders, as "HOST[:GUEST][:ro|rw]"
extra_rule_groupslist of groupsegress groups only this machine defines (your [rules]), added to the project's rule_groups. msbctl add and edit put yours here. Needs a rebuild
portslistpublished ports, as "PORT", "HOST:GUEST" or "BIND:HOST:GUEST", optionally /udp. msbctl port applies a change without a rebuild
egress_mode"enforce" or "observe""observe" while measuring; only ever set here, never in the project
volumesstringthe disk-volume prefix, set by msbctl rename to keep the old disks
policy_pinstringwritten by msbctl: the digest of the project policy last approved
msb_confabsolute host pathyour own msb config file, passed as --conf: an absolute path, never in a project, no ${ in it. See dev.yaml
image, cpus, memory, root_disk, conf, rule_groups, extra_rulesas aboveper-machine overrides. conf must name a file inside the project
[versions]tablewhat msbctl update installed, so a rebuild reproduces it