Instance lifecycle
Create, start, inspect, stop, and destroy project VMs.
up
Ensure an environment exists and is running for a project directory.
iso up [DIR] [FLAGS]
DIR defaults to the current directory. isolate canonicalizes it and uses it as
the project identity for instance naming, devcontainer discovery, GitHub PAT
lookup, and future iso up DIR affinity. If a matching instance is already
running, up reports success without creating another VM. If a matching
instance is stopped, up restarts it. If no matching instance exists, up
creates one. Pass --new-instance with --name to skip the lookup and create
a second, separately named instance for the same directory or --git-repo
URL. That leaves the project with two matching instances, so later iso up
runs report the ambiguity instead of choosing one — address the instances by
name (iso start <name>, iso shell <name>) from then on.
By default, up copies/syncs the project into /workspace. Pass --mount
to use the mount transport for the project at /workspace instead. The Apple
backend has no host mounts, so this is a one-time sync at creation; use
iso push / iso pull afterwards. --copy is accepted as an explicit spelling of the default.
Use --git-repo <url> instead of DIR to clone a remote repository into
/workspace inside the guest.
| Flag | Description |
|---|---|
DIR |
Project directory (default: current directory) |
--name <name> |
Instance name to use when creating the project environment |
--new-instance |
Create a separate instance even when the project already has one (requires --name) |
--copy |
Copy/sync DIR into /workspace (default) |
--mount |
Mount DIR at /workspace instead of using --copy |
--extra-mount <spec> |
Additional host directory to mount into the guest (HOST_PATH[:GUEST_PATH], repeatable; specify a guest path other than /workspace when using --copy) |
--git-repo <url> |
Clone a git repository into /workspace instead of copying a local project directory |
--vcpus <N> |
Number of vCPUs when creating a new instance |
--mem <MiB> |
Memory in MiB when creating a new instance |
--disk <GiB> |
Instance disk size when creating a new instance |
--no-agents |
Skip injecting Claude Code and Codex credentials/config into the VM |
--no-github |
Use github = "off" for this invocation and suppress the PAT setup prompt. See scope and limitations. |
--image <name> |
Named image to use when creating a new instance (default: default) |
--profile <list> |
Build or reuse a profile-derived image when creating a new instance, named from the sorted profiles (for example node-python). Repeatable or comma-separated; an empty name (a,,b) is refused |
--exclude-git |
Deprecated, no effect: transfers into the guest never carry .git (a --git-repo clone keeps its own) |
--no-prompt |
Suppress the interactive prompt to set up a scoped GitHub PAT when one is missing for the resolved repo |
--forward-port <spec> |
Forward a guest port to the host (GUEST[:HOST], repeatable) |
--post-start <cmd> |
Shell command to run inside the guest after boot |
--env KEY=VALUE |
Env var to set in the guest (repeatable). A whole value {vault:NAME} is resolved from iso secrets for each session |
--env-file <path> |
A .env file of guest env vars (KEY=value, quoted values, export, comments; {vault:NAME} references). Parsed strictly, never by a shell. --env wins over it |
--devcontainer <path> |
Explicit path to a devcontainer.json to use (skips discovery and prompt) |
--no-devcontainer |
Ignore any discovered devcontainer.json for this invocation |
--dry-run |
Translate devcontainer.json and print the report, then exit before any VM work |
--json |
With --dry-run, emit the resolved plan as JSON on stdout ({ report, profiles, guest_user, vm }) instead of the text report on stderr |
iso up .
iso up ~/code/my-project --mount
iso up . --profile python,node
iso up . --copy --forward-port 3000
iso up . --extra-mount ~/data:/data
iso up --git-repo https://github.com/chr33s/iso.git
Creation options such as --vcpus, --mem, --disk, --image,
--profile, --extra-mount, --git-repo, and --devcontainer are applied only when up creates a new instance. iso up --profile <list>
derives an image name from the sorted profile list, runs the same stale-image
check as iso setup, and builds or rebuilds that image if needed. Explicit
named images are unchanged: use iso setup --image <name> --profile ...
followed by iso up --image <name> when you want to choose the image name
yourself. If a matching project instance already exists, destroy it first to
recreate it with different creation options. Runtime startup options such as
--forward-port, --post-start, and --env can be used when up creates or
restarts an instance; if the matching instance is already running, stop it
first so those options can take effect. Likewise, --egress or --allow-host
that differs from a running instance’s boot policy is refused rather than
ignored: stop the instance to apply a new allowlist, or destroy it to change
the egress mode. A running filtered instance whose readiness proof fails is
not reused: up fails with the readiness error (INSTANCE_UNHEALTHY in
machine output); iso stop then iso start re-establishes it.
When a local devcontainer.json was applied while creating the instance, isolate stores
its path and content hash. Later iso up reconnects or restarts warn if that
file changed, but the existing VM is not mutated automatically. Destroy and
recreate the instance to apply creation-time devcontainer changes such as
features, hostRequirements, mounts, image/build, or remoteUser.
With the global --output json, prints one iso.machine/v1 document instead; see machine-interface.md.
start
Restart a stopped VM.
iso start [NAME] [FLAGS]
start normally restarts existing stopped instances. Use iso up [DIR] to
create or reconnect to a project environment. Without NAME, start restarts
the only stopped instance if exactly one exists; with multiple stopped
instances, pass the instance name.
| Flag | Description |
|---|---|
NAME |
Stopped instance name (optional only when exactly one stopped instance exists) |
--workspace <dir> |
Restart the stopped instance associated with this project path |
--no-agents |
Skip injecting Claude Code and Codex credentials/config into the VM |
--no-github |
Use github = "off" for this invocation and suppress the PAT setup prompt. See scope and limitations. |
--forward-port <spec> |
Forward a guest port to the host (GUEST[:HOST], repeatable). Lives for the lifetime of the VM; torn down on iso stop. |
--no-prompt |
Suppress the interactive prompt to set up a scoped GitHub PAT when one is missing for the resolved repo (see iso github setup-pat). |
--post-start <cmd> |
Shell command to run inside the guest after boot. Overrides the post_start configuration field. Failure is logged but does not fail the start. |
--env KEY=VALUE |
Env var to set in the guest (repeatable); a whole value {vault:NAME} is resolved from iso secrets. Overrides --env-file, guest_env config entries and any forwarded values with the same name. |
--env-file <path> |
A .env file of guest env vars, as for up. |
--devcontainer <path> |
Dry-run translation aid; normal restarts reject devcontainer creation options. |
--no-devcontainer |
Ignore any discovered devcontainer.json for this invocation (escape hatch for CI). |
--dry-run |
Translate devcontainer.json and print the report, then exit before any VM work. |
--json |
With --dry-run, emit the resolved plan as JSON on stdout instead of the text report on stderr. |
Normal start restarts an existing VM without re-reading or re-applying
devcontainer.json. If the instance was created with a devcontainer file, isolate
warns when the recorded file path now has different contents. See
docs/devcontainer.md for the supported keys, discovery
rules, and recreate guidance.
iso start
iso start my-project
iso start my-project --no-agents
iso start my-project --no-github
iso start --env RUST_LOG=info --env MY_FLAG=1
iso start --forward-port 3000 --forward-port 8080:18080
With the global --output json, prints one iso.machine/v1 document instead; see machine-interface.md.
stop
Gracefully stop a running VM. The instance disk is preserved. Use start to relaunch or destroy to remove it.
iso stop [NAME]
| Flag | Description |
|---|---|
NAME |
Instance name (required if multiple instances exist) |
iso stop
iso stop my-project
With the global --output json, prints one iso.machine/v1 document instead; see machine-interface.md.
destroy
Stop the VM and remove its resources: disk, config, and SSH entries. Images are preserved unless you pass --all.
iso destroy [NAME] [FLAGS]
| Flag | Description |
|---|---|
NAME |
Instance name (required if multiple instances exist) |
--all |
Destroy every instance, then remove every image and the VM access key. Cannot be combined with NAME |
iso destroy my-project
iso destroy --all
With the global --output json, prints one iso.machine/v1 document instead; see machine-interface.md.
list
Print every instance with its state: running, stopped, unhealthy, or unknown when the backend cannot determine it (shown with a warning, for example an Apple sandbox instance with an unfinished operation). It never connects to a guest over SSH, so it does not wait on unreachable VMs; the state comes from the runtime (iso-sandbox inspect). For a running egress: "filtered" instance it also checks the host side of the readiness proof (boot, policy, owner, companion, broker and tunnel processes, and their signed host-loopback replies) and lists a failure as unhealthy with a warning naming it. Use status instead when you need resource usage, per-instance detail, or the guest-loopback proofs.
iso list
iso ls
Alias: ls.
| Flag | Description |
|---|---|
--json |
Emit the legacy unversioned JSON array ([{ "name", "state" }, …]) instead of the text table. Cannot be combined with --output json |
With the global --output json, prints one iso.machine/v1 document instead; see machine-interface.md.
status
Print instance status. Without a name, lists every instance with its state, image, backend, and resource usage (for running instances). An instance whose state cannot be probed is listed as unknown with a warning, rather than failing the whole listing. With a name, prints detailed status for that instance. A running filtered instance whose live readiness proof fails, including the guest-loopback proofs, is reported as unhealthy (with the failed proof as its reason in the named text report and machine output); the command still succeeds, while commands that need the guest refuse it.
iso status [NAME]
| Flag | Description |
|---|---|
NAME |
Instance name (shows all if omitted) |
--json |
Emit the legacy unversioned JSON instead of the text output. Cannot be combined with --output json |
iso status
iso status my-project
With --json, a bare iso status emits a JSON array and iso status NAME
emits a single object. Each carries the common fields — name, state
(running/stopped/unhealthy, or unknown in the bare-status array), image, backend
(always apple-container), and usage
(raw MiB / load, or null when stopped or the query fails). The rich
single-instance text report (guest IP, PID, SSH port, …) is text-only. JSON goes
to stdout; tracing stays on stderr, so iso status --json | jq stays clean.
$ iso status my-project --json
{
"name": "my-project",
"state": "running",
"image": "default",
"backend": "apple-container",
"usage": { "load_1m": 0.12, "mem_used_mib": 512, "mem_total_mib": 2048,
"disk_used_mib": 8192, "disk_total_mib": 20480 }
}
With the global --output json, prints one iso.machine/v1 document instead; see machine-interface.md.
logs
Stream the VM serial console output.
iso logs [NAME] [FLAGS]
| Flag | Description |
|---|---|
NAME |
Instance name (required if multiple instances exist) |
-f, --follow |
Follow log output (like tail -f) |
iso logs
iso logs my-project -f