{
  "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
    },
    "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\"\nfence -d curl https://example.com\nfence -t code -- claude  # Runs Claude Code using `code` template config\nfence -m npm install\nfence -m --fence-log-file /tmp/fence.log -- claude\nUse `fence --settings ./custom.json` to specify a different config.\nfence config show --template code\nfence -- claude --dangerously-skip-permissions\n"
      }
    ],
    "field": [
      {
        "id": "template",
        "label": "Template",
        "type": "string",
        "option": [
          "--template",
          "-t"
        ],
        "suggestions": [
          {
            "value": "code",
            "label": "code"
          }
        ],
        "sources": [
          "readme"
        ]
      },
      {
        "id": "settings",
        "label": "Settings file",
        "type": "path",
        "option": [
          "--settings"
        ],
        "path": {
          "kind": "file",
          "role": "input",
          "must_exist": true
        },
        "sources": [
          "readme"
        ]
      },
      {
        "id": "monitor",
        "label": "Monitor violations",
        "type": "boolean",
        "option": [
          "-m"
        ],
        "sources": [
          "readme"
        ]
      },
      {
        "id": "debug",
        "label": "Debug logging",
        "type": "boolean",
        "option": [
          "-d"
        ],
        "sources": [
          "readme"
        ]
      },
      {
        "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"
        ]
      },
      {
        "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"
        ]
      },
      {
        "id": "args",
        "label": "Command and arguments",
        "type": "string",
        "position": 0,
        "multiple": true,
        "sources": [
          "readme"
        ]
      }
    ],
    "task": [
      {
        "id": "run",
        "label": "Run a command sandboxed",
        "fields": [
          "template",
          "settings",
          "monitor",
          "debug",
          "args"
        ],
        "required": [
          "args"
        ]
      },
      {
        "id": "shell",
        "label": "Run a shell string",
        "fields": [
          "template",
          "settings",
          "monitor",
          "debug",
          "shell_command"
        ],
        "required": [
          "shell_command"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "args",
          "shell_command",
          "template",
          "monitor"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "settings",
          "debug",
          "log_file"
        ]
      }
    ]
  }
}
