dsh-sandbox-tune

Lets build commands run inside the DSH sandbox instead of asking for elevation on every invocation: redirects pure caches (GOCACHE, NPM_CONFIG_CACHE, BUN_INSTALL_CACHE_DIR, PIP_CACHE_DIR) to a temp root, or grants the real cache directories write access in place so they stay shared with the terminal. Dependency stores (GOMODCACHE, CARGO_HOME) are never redirected, only granted. Adds optional user-directory grants (~/.config and friends, all off by default) and a command allowlist that matches exact strings or per-segment after splitting on &&, ||, ; and |, while rejecting redirects that write files (fd duplication like 2>&1 and /dev/null are allowed), command substitution and backgrounding outright. Settings are per-profile or per-session; file edits apply without a restart.

Overview

Lets build commands run inside the DSH sandbox instead of asking for elevation on every invocation: redirects pure caches (GOCACHE, NPM_CONFIG_CACHE, BUN_INSTALL_CACHE_DIR, PIP_CACHE_DIR) to a temp root, or grants the real cache directories write access in place so they stay shared with the terminal. Dependency stores (GOMODCACHE, CARGO_HOME) are never redirected, only granted. Adds optional user-directory grants (~/.config and friends, all off by default) and a command allowlist that matches exact strings or per-segment after splitting on &&, ||, ; and |, while rejecting redirects that write files (fd duplication like 2>&1 and /dev/null are allowed), command substitution and backgrounding outright. Settings are per-profile or per-session; file edits apply without a restart.

Installation

Install from GitHub

dsh plugin --profile web add github:kennethfan/dsh-sandbox-tune

Installing from GitHub runs the project's build script, which pnpm blocks until you allowlist it — run the command once and pnpm prints the exact key to add under `allowBuilds` in ~/.dsh/profiles/web/pnpm-workspace.yaml.

Version compatibility

Compatibility is unconfirmed. Check the project documentation for supported versions.

Installation notes

  • May run terminal commands