Command reference
fend <command> is the default — anything that isn’t a known subcommand is
dispatched to fend run <command>.
fend <cmd> (alias: fend run)
Section titled “fend <cmd> (alias: fend run)”Run an arbitrary command inside the sandbox.
fend npm installfend bun run devfend python train.pyfend --env DATABASE_URL=postgres://… npm run seedfend --env-file .env.local npm test| Flag | Description |
|---|---|
-e, --env KEY=VALUE | Inject one env var into the sandbox. Repeatable. |
--env-file PATH | Load env vars from a .env-style file. Repeatable; later files win. |
If the command is a known package-manager install (npm install, bun add, …),
fend audits the lockfile against OSV.dev first. See [audit] in .fend.toml
for policy.
fend audit
Section titled “fend audit”Audit the current project’s package-lock.json against OSV.dev.
fend audit # report onlyfend audit --fix # apply safe in-range upgrades + npm overridesfend audit --fix --force # also apply major-version bumpsfend audit --json # structured output for CI| Flag | Description |
|---|---|
--fix | Apply the safe portion of the upgrade plan. |
--force | When fixing, also apply major-version bumps. |
--include-prerelease | Consider RC / pre-release fix versions. |
--dry-run | Print the plan without applying it. |
-y, --yes | Skip prompts (CI-friendly). |
--json | Emit structured JSON instead of a human-readable report. |
--update-db | Re-query advisories even if the local cache is fresh. |
fend claude [cmd]
Section titled “fend claude [cmd]”Run a command with the Anthropic OAuth token from your macOS Keychain injected into the sandbox.
fend claude # runs `claude` with the token injectedfend claude my-script.sh # runs anything else with the same envThe default fend <cmd> path never injects Anthropic credentials. This
is opt-in by design.
fend init
Section titled “fend init”Generate a .fend.toml for the current project. Detects the project kind
(Node, Bun, pnpm, yarn, Python, generic) and writes a sensible default.
| Flag | Description |
|---|---|
--force | Overwrite an existing .fend.toml without prompting. |
fend hook <shell>
Section titled “fend hook <shell>”Print shell integration code for eval-ing in your shell config.
echo 'eval "$(fend hook zsh)"' >> ~/.zshrcecho 'eval "$(fend hook bash)"' >> ~/.bashrcAfter installing the hook, use fend on / fend off to toggle the sandbox
in the current shell session.
The hook shims: npm, npx, bun, bunx, yarn, pnpm, pnpx, node,
python, python3, uv, uvx, deno.
fend on / fend off
Section titled “fend on / fend off”Activate or deactivate the shell hook in the current session. These exist as
shell functions installed by fend hook — invoking them as a binary
subcommand prints a hint to install the hook first.
fend status
Section titled “fend status”Show running VMs across all projects.
$ fend statusPROJECT STATE UPTIME PORTSmy-app running 12m 4s 3000api paused 5m 30sfend stop
Section titled “fend stop”Stop the VM for the current project. The VM will cold-boot again on the next command.
fend clean
Section titled “fend clean”Destroy the VM and per-project state for the current project, including the rootfs clone.
fend doctor
Section titled “fend doctor”Check prerequisites and print system compatibility:
$ fend doctorfend doctor macOS version: 14.5.0 Architecture: Apple Silicon (arm64) Kernel: ~/.fend/runtime/vmlinuz Initrd: ~/.fend/runtime/initrd Rootfs: ~/.fend/runtime/rootfs.img Docker: available Config: node=auto bun=auto cpus=2 mem=2048MB
All checks passed.fend log
Section titled “fend log”Tail the per-command audit log written to ~/.fend/log/. Each entry contains
the command, args, env keys (not values), duration, exit code, audit summary,
and any project-dir filesystem changes.
fend daemon start | stop
Section titled “fend daemon start | stop”Manage the background daemon. fend <cmd> auto-starts the daemon on first
use; you rarely need to run these directly.
| Subcommand | Description |
|---|---|
daemon start | Start the daemon (defaults to detached). --foreground keeps it attached. |
daemon stop | Send SIGTERM to the daemon and clean up the pid/socket files. |
.fend.toml configuration
Section titled “.fend.toml configuration”Generated by fend init. Every field is optional:
[runtime]node = "22" # pin Node.js inside the VMbun = "1.1" # pin Bun inside the VM
[vm]cpus = 2memory = "2GB"
[audit]level = "strict" # strict | warn | offrebuild = true # run `npm rebuild` after a clean auditauto_approve_in_ci = false # skip prompts when $CI is setblock = ["malware", "critical"] # severities that halt the installprompt = ["high"] # severities that require y/N confirmationfix_on_install = true # offer to apply safe fixes before installinclude_prerelease = false # consider pre-release versions when fixing