Back to directory

Fence

A lightweight, container-free sandbox that wraps commands to block network access by default and restrict filesystem operations by configurable rule, and doubles as a permission manager for AI coding agents.

Fence

Fence wraps a command in a sandbox that blocks all network access by default and restricts filesystem operations according to configurable rules, aimed at running semi-trusted code such as package installs, build scripts, CI jobs or an unfamiliar repository with controlled side effects. Named templates can allow specific categories of network access, such as one that permits common package registries, and command deny rules can block specific dangerous commands outright.

Beyond sandboxing arbitrary commands, Fence works as a permission manager for coding agents, including Claude Code, Codex, Amp, Gemini CLI, GitHub Copilot, OpenCode and Factory's Droid CLI, giving them a layer of defense in depth beyond their own built-in permission systems. Configuration is read from a settings file that can be named explicitly or discovered automatically.

On Linux it additionally needs bubblewrap for sandboxing and socat for network bridging, with optional bpftrace support for observing filesystem rule violations; it also installs through Homebrew or Nix on macOS and Linux. It is written in Go and released under the Apache-2.0 license.

More in CLI tools

See all 181
  • grev

    github.com

    A set of Unix coreutils-style filters — grep, sort, cut and more — that answer a plain-language question about each record instead of matching a pattern, using a small decision model.

  • A Node.js script that exports a Google Doc to HTML and CSS with high fidelity, preserving headings, spacing, alignment, bullet lists, images and right-to-left text.

  • gpusched

    github.com

    A VRAM-aware GPU job scheduler for a single machine: declare how much memory each shell command needs, and it places jobs the moment a GPU has room and reports when a guess was wrong.