id = "fence"
name = "Fence"
homepage = "https://github.com/fencesandbox/fence"
description = "Lightweight sandbox for running commands with filesystem and network restrictions"
executables = ["fence"]
[dotfiles]
paths = [
"[configHome]/fence/fence.json",
"[configHome]/fence/fence.jsonc",
]
secret = []
[commands]
format = 1
label = "Run in sandbox"
description = "Run a command inside Fence's sandbox, optionally with a template or settings file. Monitor logging is included; config subcommands and import are left out."
quality = "ai-draft"
parser = { end_of_options = "--", interleave = "permute", long_equals = false, short_attached = false, short_bundles = false }
[[commands.source]]
id = "readme"
kind = "manual"
url = "https://github.com/fencesandbox/fence/blob/main/README.md"
revision = "HEAD 2026-10-27"
evidence = """
fence -c "echo hello && ls"
fence -d curl https://example.com
fence -t code -- claude # Runs Claude Code using `code` template config
fence -m npm install
fence -m --fence-log-file /tmp/fence.log -- claude
Use `fence --settings ./custom.json` to specify a different config.
fence config show --template code
fence -- claude --dangerously-skip-permissions
"""
[[commands.field]]
id = "template"
label = "Template"
type = "string"
option = ["--template", "-t"]
suggestions = [{ value = "code", label = "code" }]
sources = ["readme"]
[[commands.field]]
id = "settings"
label = "Settings file"
type = "path"
option = ["--settings"]
path = { kind = "file", role = "input", must_exist = true }
sources = ["readme"]
[[commands.field]]
id = "monitor"
label = "Monitor violations"
type = "boolean"
option = ["-m"]
sources = ["readme"]
[[commands.field]]
id = "debug"
label = "Debug logging"
type = "boolean"
option = ["-d"]
sources = ["readme"]
[[commands.field]]
id = "log_file"
label = "Fence log file"
type = "path"
option = ["--fence-log-file"]
path = { kind = "file", role = "output", must_exist = false }
effect = "overwrite"
sources = ["readme"]
[[commands.field]]
id = "shell_command"
label = "Shell command string"
description = "Run this string through a shell (-c). Use instead of the argument list."
type = "string"
option = ["-c"]
effect = "exec"
sources = ["readme"]
[[commands.field]]
id = "args"
label = "Command and arguments"
type = "string"
position = 0
multiple = true
sources = ["readme"]
[[commands.task]]
id = "run"
label = "Run a command sandboxed"
fields = ["template", "settings", "monitor", "debug", "args"]
required = ["args"]
[[commands.task]]
id = "shell"
label = "Run a shell string"
fields = ["template", "settings", "monitor", "debug", "shell_command"]
required = ["shell_command"]
[[commands.group]]
id = "basic"
label = "Basic"
fields = ["args", "shell_command", "template", "monitor"]
[[commands.group]]
id = "advanced"
label = "Advanced"
fields = ["settings", "debug", "log_file"]