Skip to content

Command reference

fend <command> is the default — anything that isn’t a known subcommand is dispatched to fend run <command>.

Run an arbitrary command inside the sandbox.

Terminal window
fend npm install
fend bun run dev
fend python train.py
fend --env DATABASE_URL=postgres://… npm run seed
fend --env-file .env.local npm test
FlagDescription
-e, --env KEY=VALUEInject one env var into the sandbox. Repeatable.
--env-file PATHLoad 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.

Audit the current project’s package-lock.json against OSV.dev.

Terminal window
fend audit # report only
fend audit --fix # apply safe in-range upgrades + npm overrides
fend audit --fix --force # also apply major-version bumps
fend audit --json # structured output for CI
FlagDescription
--fixApply the safe portion of the upgrade plan.
--forceWhen fixing, also apply major-version bumps.
--include-prereleaseConsider RC / pre-release fix versions.
--dry-runPrint the plan without applying it.
-y, --yesSkip prompts (CI-friendly).
--jsonEmit structured JSON instead of a human-readable report.
--update-dbRe-query advisories even if the local cache is fresh.

Run a command with the Anthropic OAuth token from your macOS Keychain injected into the sandbox.

Terminal window
fend claude # runs `claude` with the token injected
fend claude my-script.sh # runs anything else with the same env

The default fend <cmd> path never injects Anthropic credentials. This is opt-in by design.

Generate a .fend.toml for the current project. Detects the project kind (Node, Bun, pnpm, yarn, Python, generic) and writes a sensible default.

FlagDescription
--forceOverwrite an existing .fend.toml without prompting.

Print shell integration code for eval-ing in your shell config.

Terminal window
echo 'eval "$(fend hook zsh)"' >> ~/.zshrc
echo 'eval "$(fend hook bash)"' >> ~/.bashrc

After 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.

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.

Show running VMs across all projects.

$ fend status
PROJECT STATE UPTIME PORTS
my-app running 12m 4s 3000
api paused 5m 30s

Stop the VM for the current project. The VM will cold-boot again on the next command.

Destroy the VM and per-project state for the current project, including the rootfs clone.

Check prerequisites and print system compatibility:

$ fend doctor
fend 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.

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.

Manage the background daemon. fend <cmd> auto-starts the daemon on first use; you rarely need to run these directly.

SubcommandDescription
daemon startStart the daemon (defaults to detached). --foreground keeps it attached.
daemon stopSend SIGTERM to the daemon and clean up the pid/socket files.

Generated by fend init. Every field is optional:

[runtime]
node = "22" # pin Node.js inside the VM
bun = "1.1" # pin Bun inside the VM
[vm]
cpus = 2
memory = "2GB"
[audit]
level = "strict" # strict | warn | off
rebuild = true # run `npm rebuild` after a clean audit
auto_approve_in_ci = false # skip prompts when $CI is set
block = ["malware", "critical"] # severities that halt the install
prompt = ["high"] # severities that require y/N confirmation
fix_on_install = true # offer to apply safe fixes before install
include_prerelease = false # consider pre-release versions when fixing