unContainer

Reference

CLI reference

Every command and flag accepted by uncontainer.

uncontainer run

uncontainer run [BOOT FLAGS] -- COMMAND [ARGS...]

Boots a guest with a copy of the current worktree, runs the command in /work, returns its exit code and discards the guest.

uncontainer session open

uncontainer session open [BOOT FLAGS]

Opens a session for the current worktree, or reuses the running one. Prints the session ID and worktree path, and published ports to stderr.

Boot flags

Accepted by run and session open.

FlagValueNotes
--profileNAMELoads a profile from uncontainer.json. Explicit flags override it.
--distrodebian · alpine · debian:dockerDefault debian.
--cpus1–16Default 1.
--memory128MiB–4GiBWhole MiB, for example 512MiB or 1GiB.
--networknone · fullDefault none. Cannot be combined with --allow.
--allowHOST:PORTRepeatable. Replaces the profile’s network policy.
--publish, --forward[HOST:]GUESTRepeatable. Omit HOST for an OS-assigned port.
--yesApproves downloading the debian:docker image.
--https[NAME:]GUEST_PORTrun only, once. Serves the app at https://NAME.uncontainer.localhost and copies host edits live. Requires https enable.

uncontainer https

uncontainer https enable uncontainer https disable uncontainer https proxy [--port PORT]

enable creates a private CA with mkcert and trusts it for your account after confirmation. On macOS it also installs a user LaunchAgent listening on port 443. disable stops the listener, deletes the keys and removes trust. proxy runs the listener in the foreground on Linux, on port 8443 by default. See the HTTPS guide.

uncontainer session exec

uncontainer session exec -- COMMAND [ARGS...]

Runs a command in the current worktree’s session, in /work.

uncontainer session list

uncontainer session list [--json]

Shows ID, branch, distro, uptime, host RSS, guest RAM, vCPUs, network policy, published ports and worktree. See JSON output.

uncontainer session close

uncontainer session close [ID]

Closes the current worktree’s session, or the given ID from any directory.

uncontainer session prune

uncontainer session prune [--dry-run]

Closes sessions whose worktree was removed or replaced. --dry-run lists them without closing.

uncontainer profile list

uncontainer profile list --json

Reads uncontainer.json without starting a guest.

uncontainer cache

uncontainer cache stats [--json] uncontainer cache clean

stats reports retained bytes, the limit and each snapshot. clean removes all saved caches of the project.

uncontainer update

uncontainer update [--check] [--yes] uncontainer update cli [--to TAG] [--check] [--yes] uncontainer update image DISTRO [--to vN] [--check] [--yes]

Updates the CLI and cached guest images from the release registry. --check prints the download plan without applying it. --yes applies without prompting and is required without a terminal. DISTRO is debian, alpine or debian:docker; --to vN applies to debian:docker only. See Update.

--version and --help

uncontainer --version uncontainer session --help

--version prints the release tag. --help or -h works at every command level and lists its options and examples.