Files
devvm/docs/content/docs/cli/devvm_network.md
T
w3cjandClaude Opus 5.5 cd6fc60576 feat(cli): --json on every command that shows or lists
ls, images, tools, size, ports, network (and -g), network log (and
--blocked), ssh-agent, git-protect, secret, history, space, retention and
doctor take --json: one JSON object on stdout with "version": 1 first,
messages on stderr (ui.DataOnly), lists [] when empty. Settings commands
only show with --json and refuse a value (json_shows_only). doctor --json
replaces --fixes: problems with key, fix (null without one) and message,
warnings, docker and every backend's features; it prints nothing else and
succeeds whatever is missing, and install.sh reads its problems with awk.
TestJSONShapes holds each command's field names and types. Each shape is
documented on its command's page, with the contract under Everyday
commands' Output for scripts.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-01 03:06:56 -08:00

2.6 KiB

title, weight
title weight
devvm network 19

Show or change the network policy of this folder's VM

Synopsis

Show the network policy of this folder's VM, on, off or unenforced (on, but not confined: started outside devvm, or before it was turned on), then its allowlist: each policy file that has rules, in order (its image's, yours for every VM, the VM's own, its secrets' hosts), and the rules in it. devvm network on or off changes the VM's network policy from its next start: devvm restart. Secrets the VM got while it was off still work once it's on. With -g, show or change whether new VMs get network policy instead: ask (in a terminal, and on without one), on or off. devvm's --network-policy and --no-network-policy still choose for one new VM.

devvm network [on|off] [flags]

Options

  -g, --global   show or change whether new VMs get network policy instead
  -h, --help     help for network
      --json     print it as one JSON object, for scripts

Options inherited from parent commands

      --backend NAME        the NAME of the backend a new VM or image gets (default: the default backend file's, else lima)
      --cpus N              the N CPUs a new VM gets (default: the size file's, else the image's)
      --disk GiB            a new VM's disk in GiB, at least the image's (default: the size file's, else the image's)
      --from IMAGE          the container IMAGE a new VM's or image's base starts from instead of Ubuntu's cloud image: node:24, debian:13, ghcr.io/org/image@sha256:… (default: $DEVVM_FROM's)
      --memory GiB          a new VM's memory in GiB: 16, 16G or 16GiB (default: the size file's, else the image's)
      --network-policy      create the VM with network policy: it reaches only the hosts you allow, through a proxy on this machine, and your secrets stay on this machine (default: devvm network -g's, else asked in a terminal, and on without one)
      --no-network-policy   create the VM without network policy: it reaches anything this machine can
      --ports PORTS         which PORTS a new VM forwards to this machine's localhost: all, none, or a list like 5173,8000-8010 (default: the ports file's, else all)

See also