CLI Reference
Synopsis
jailoc [path] [flags]
jailoc [command] [flags]
jl is available as a shorter alias for jailoc when installed via Homebrew or unpacked from the release archive.
Global Flags
| Flag | Short | Default | Description |
|---|---|---|---|
--workspace |
-w |
default |
Target workspace name. Overrides path-based auto-detection where applicable. |
--no-color |
false |
Disable colored output. | |
--config |
$JAILOC_CONFIG, else ~/.config/jailoc/config.toml |
Configuration file to use. See configuration file location. | |
--verbose |
-v |
off | Print diagnostic output to standard error. Repeatable: -v shows major steps, timings, the image builder choice and when VM supervisors start, become ready or begin stopping. -vv adds debug details such as CA stage checks and supervisor reuse, restart or startup failure. -vvv adds trace details such as SIGTERM delivery. Each level includes the lower ones. Standard output and log file levels are unchanged. |
Verbosity doesn't stream detached supervisor or guest output. See jailoc logs for which log files the CLI displays.
Workspace resolution
Commands pick the workspace in this order:
- The
[workspace]argument, for commands that accept one. - The
--workspaceflag. - The workspace whose
pathsentry is the longest prefix of the current directory. If several workspaces tie on the deepest match, the command fails and asks for-w. default.
Exceptions:
--all(-A):up,down,restart,reloadandstatusact on every configured workspace one after another, in name order, and do not take a[workspace]argument or--workspace. A failure in one workspace does not stop the others; the command reports all failures and exits non-zero.jailoc add: matches the path being added instead of the current directory. With--workspace, the added path must lie under one of that workspace's paths.
Commands
jailoc
Open a session of the workspace's coding agent in the workspace VM.
jailoc [path] [flags]
- The target directory is
path(~is expanded) or the current working directory, and must be a directory. - Without
--workspace, the workspace is resolved from the target directory. - When the directory is not under any path of the workspace, jailoc asks whether to add it.
- When several workspaces match the directory at the same depth, jailoc fails and asks for
--workspace. - If the workspace VM is not running, jailoc starts it as
jailoc updoes. - It checks that the agent binary is on
PATHin the VM and runs the agent (see Coding agents) over SSH, in a detachable session whose working directory is the target directory. - Without flags, it attaches to the session already running in the target directory, or starts one.
--sessionand--continuealways start a new session.- The detach keys (
Ctrl-b, thend, by default) or closing the terminal detach; the agent keeps running. TypingCtrl-btwice sends oneCtrl-bto the agent. - Attaching from a second terminal takes the session over and detaches the first one.
| Flag | Short | Description |
|---|---|---|
--new |
Start a new agent session instead of attaching to the one running in the target directory. | |
--attach ID |
Attach to the agent session with this ID (see jailoc sessions). |
|
--continue |
-c |
Start a session that continues the agent's last conversation. |
--session ID |
-s |
Start a session that continues the agent conversation with this ID. |
--detach-keys KEYS |
Key sequence that detaches from the session, for example ctrl-a,d. Overrides detach_keys. Default ctrl-b,d. |
|
--version |
-V |
Print the jailoc version. |
Mutually exclusive flags:
--sessionwith--continue--newwith--attach--attachwith--sessionor--continue
See the sessions how-to.
jailoc up
Start a workspace VM.
jailoc up [workspace] [flags]
- Validates secret sources on the host.
- Builds the workspace image with the host Docker daemon or in a builder VM (see Image Resolution). A selected external
ca_bundlealways builds in a builder VM and fails withbuilder = "docker". - Converts its layers into read-only EROFS images in the VM image cache.
- Boots them as the root file system of the workspace VM behind the host-side network broker.
- Delivers
envand secrets to the guest.
Before building or booting anything, jailoc up of a stopped workspace (also the auto-start of jailoc) refuses to start when a read-write share of the workspace or of a running workspace VM exposes a build input, or when its read-write shares expose the build inputs of another configured workspace. See Build inputs and read-write shares.
When the VM already runs, jailoc up does what jailoc reload does.
| Flag | Short | Description |
|---|---|---|
--all |
-A |
Start every configured workspace, in name order. |
jailoc down
Stop a workspace VM.
jailoc down [workspace] [flags]
- Shuts down the workspace VM and its network broker. All agent sessions end.
- Keeps the persistent home directories (the agent's state directories and
~/.cache).
| Flag | Short | Description |
|---|---|---|
--all |
-A |
Stop every configured workspace. Combined with --purge, purges every workspace. |
--purge |
Also delete the workspace state listed below. Fails while another jailoc process starts the workspace or its VM processes still run. |
--purge deletes
- The VM state.
- The persistent home directories.
- The Docker data disk of the workspace VM.
- Any cached
from_commandsecrets in the system keychain. The command fails if an entry can't be deleted; the next purge retries it. - The workspace's inspection CA. The next start creates a new one.
- With
isolated_build, the workspace's builder VM and build cache.
--purge keeps named agent profiles.
jailoc restart
Stop and start a workspace VM with the current configuration.
jailoc restart [workspace] [flags]
- Equivalent to
jailoc downfollowed byjailoc up: rebuilds the workspace image and ends running sessions. A rebuild applies a changed or disabledca_bundleto the image's trust. - If the workspace is not running, starts it.
- Refuses to start, before building or booting anything, when a read-write share exposes a build input (see
jailoc up).
| Flag | Short | Description |
|---|---|---|
--all |
-A |
Restart every running workspace. Stopped workspaces stay stopped. |
jailoc reload
Apply configuration changes to a running workspace VM without restarting it.
jailoc reload [workspace] [flags]
Updated live
- Network policy:
allowed_hosts,allowed_networks,network.filtered_dns,network.dns_upstream,network.dns_blocked_zones, and turningnetwork.ipv6off (turning it on needsjailoc restart) - Upstream proxy:
network.upstream_proxy; acommandhelper runs again withJAILOC_UPSTREAM_EVENT=reload, and a failed run keeps the previous result (seeupstream_proxy) - Published
ports - SSH agent:
ssh_auth_sock, with the socket read again from$SSH_AUTH_SOCK - GPG agent:
gpg_agent, with the socket looked up again withgpgconfand the public keys imported again ca_bundle, for the VM's trust store. A change that affects the image's trust (a changed bundle, orca_bundle = false) is listed as needingjailoc restart; reload doesn't rebuild the image or interrupt sessions. See Image builds with a CA bundle.snapshots, including the Git configuration andknown_hosts: every reload copies the sources again, adds new entries and removes dropped onesenv,env_fileand secretstimezone, or the host's current zone when it is unsettmp_ttl
Needs a new VM
jailoc reload lists these changes, and jailoc restart applies them:
pathsandmounts, includingagents.<name>.mounts- the agent's
profile
jailoc reload never rebuilds and cannot change shares. When the running VM's read-write shares expose the build inputs of any configured workspace, it prints a WARNING; the affected builds are refused until the shares change and the workspace is restarted. See Build inputs and read-write shares.
- cpu, memory
- enable_docker, the desktop table (enable, chrome, chrome_version), the set of guest ports the proxy routes use (renaming a route, changing auth, or adding one on a port already in the set is applied by jailoc reload), protect_git
- tmp_storage, tmp_size
- the working directory (first entry of paths, or /home/agent when paths is empty)
- the jailoc guest, after a jailoc upgrade that changed the protocol between jailoc and the guest
| Flag | Short | Description |
|---|---|---|
--all |
-A |
Reload every running workspace. Stopped workspaces are skipped. |
--purge-cache |
Evict cached from_command secrets with a ttl from the system keychain and run their commands again. Fails if an entry can't be deleted; the next purge retries it. |
Caveats
- Fails when the workspace is not running.
- Running sessions keep running with their old environment; sessions started afterwards get the updated
env,env_fileentries and env secrets. - Files opened before a reload keep their old snapshot content.
- Concurrent reloads of one workspace, including those
jailoc upstarts, wait for each other and run one at a time. - Changes to
proxyroutes apply on reload. A VM started by a jailoc release that predates live proxy reloads keeps the guest ports of itsproxyroutes reserved until a restart, even when the configuration droppedproxy; a reload whosehost_portsorportsuse one of them fails and asks forjailoc restart. - A running VM keeps its desktop port (6080) and, with Chrome, its debugging port (9222) reserved until a restart, even when the configuration dropped
desktop. If a newhost_ports,ports, orproxyentry uses such a port, reload asks forjailoc restart.
jailoc status
Show the agent of the workspace (with the package version jailoc installs and extra args) and whether its VM is running.
jailoc status [workspace] [flags]
Shown for a running VM
- Uptime, CPUs, memory and Docker disk.
- The storage mode, configured size, cleanup TTL, and used, free and total capacity of
/tmp(Tmpwarns when/tmpis 90% full or more, and showsunknownwhen the guest can't be reached). - Where the agent's persistent home directories live: the named profile,
workspace, ornoneforprofile = false. - The number of agent sessions.
- With
network.upstream_proxy: the state of the proxy and its last error. - Whether the VM runs the current configuration:
jailoc restartis needed when a setting that needs a new VM changed (cpu,memory,tmp_storage,tmp_size,agent,profile,enable_docker,desktop,protect_git,proxyroutes of a VM started by a jailoc release that predates live proxy reloads, or a jailoc upgrade that changed the guest protocol).jailoc reloadis needed when the configuration file changed after the VM started or was last reloaded. Shown for a stopped VM: when it stopped and the last error.
Data is the VM state directory on the host.
| Flag | Short | Description |
|---|---|---|
--all |
-A |
Show the status of every configured workspace. |
Workspace: myproject
Backend: vm
Agent: claude (@anthropic-ai/claude-code@2.1.318)
State: running (supervisor pid 4242)
Started: 2026-10-31T09:12:44+01:00 (up 2h5m)
Resources: 2 CPUs, 4096 MiB memory
Profile: workspace
Tmp: ram, 1 GiB, cleanup after 8h;
12 MiB of 1 GiB used (1%), 1012 MiB free
Sessions: 2 (1 attached); `jailoc sessions myproject` lists them
Config: changed since the VM started; `jailoc reload myproject` applies it
Data: ~/.cache/jailoc-vm/workspaces/myproject
jailoc list
List every configured workspace.
jailoc list
Alias: jailoc ls.
Columns: workspace and its agent, whether its VM is running, the agent sessions of a running VM (and how many have a terminal attached), and its paths. * marks the workspace of the current directory.
WORKSPACE AGENT STATE SESSIONS PATHS
default opencode running 0 ~/projects
* myproject claude running 2 (1 attached) ~/projects/myproject
scratch opencode1 stopped - -
SESSIONS shows ? when jailoc cannot reach a running VM within 5 seconds.
jailoc logs
Print the workspace logs and the supervisor log for its selected builder VM, if present.
jailoc logs [workspace] [flags]
Prints these logs, in this order:
- The log of the workspace's last
jailoc up(up.log): its steps with their durations, Docker pulls, builds and build steps, image size and conversion. - The builder VM supervisor log, when the builder has one. Each line starts with
[shared builder]for the shared builder or[builder]for the workspace'sisolated_buildbuilder. - The workspace VM supervisor log.
- The workspace guest console log.
The shared builder serves every workspace, so its log can come from an earlier build or another workspace's. A shared builder log alone doesn't count as workspace logs: without the workspace's own logs the command reports that there are none. An isolated builder's log does count. The builder's guest console log isn't included; see Builder VM disk is full for its path.
When jailoc up fails before the workspace VM starts, check up.log for the error even if there are no supervisor or console logs for that attempt.
| Flag | Short | Description |
|---|---|---|
--follow |
-f |
Follow log output until interrupted. |
With --follow:
- It keeps printing what is added to all of these logs, from a running
jailoc upand its image build through the VM boot. - A log that the next
jailoc upor VM start begins afresh is printed again from its start.
jailoc traffic
Print the network activity of a workspace VM from the network broker's log. The log persists after the VM stops.
jailoc traffic [workspace] [flags]
The output covers:
- Allowed and denied connections, with the DNS name they were looked up by.
- For allowed TCP connections: the TLS server name and ALPN, or the HTTP method, host and path (without query string).
- DNS answers.
- Names blocked by
network.filtered_dns. - Failed dials.
- Connections to published ports.
- Connections relayed to
host_ports, with their host target.
| Flag | Short | Description |
|---|---|---|
--follow |
-f |
Keep printing new events until interrupted. |
--lines N |
-n |
Number of past events to print. Default 100; 0 prints none, -1 all. |
--json |
Print the shown events as their JSON log lines, unchanged. | |
--all |
Also show DHCP, NIC, SSH agent forwarding, jailoc's own SSH connections and the events of rules with log = false. |
Output without --json
- Control characters in logged values are escaped.
- DNS answers are sorted and deduplicated.
- Consecutive addresses that fill exactly one aligned block print as a CIDR prefix (
1.2.3.4/30). - IPv4 addresses that differ only in one octet print as a pattern listing the values of that octet (
104.16.{0-11}.34,10.0.0.{1,3,5-9}). - Both compact forms stand for exactly the answered addresses;
--jsonkeeps the original list.
TLS and HTTP inspection
- TLS connections are identified from the unencrypted ClientHello only. Their content is not decrypted, except for connections covered by a rule with an
httptable. - For those connections
jailoc trafficprints one line per request, after the response status is known, or when the request is denied (JSON eventl7). The line shows protocol (httpsorhttp), method, host, path without query string, status and the deciding rule. - A denied request adds the reason and has status
403or421. Reasons:http-no-match,bad-path,connect-denied,host-mismatch, orrule <name>. - A request the broker could not forward has status
502and the error. For a failed upstream certificate check a hint says that the broker trusts only the host system roots andca_bundle.
inspect-error lines
- They report a TLS handshake the guest rejected, or traffic denied after decryption because it isn't HTTP.
- They carry the connection, destination, server name, error and a hint.
- For a rejected handshake the hint says that the client doesn't trust the workspace inspection CA and that removing the
httptable from the rules matching the host passes the connection through undecrypted. - See Certificate error on an inspected host.
jailoc strace
Print the processes started in a workspace VM.
jailoc strace [workspace] [flags]
The output has two kinds of records:
- Started processes: time, PID, parent PID, user, working directory and command line.
- Failed processes: time, PID, exit status (
exit N) or the signal that killed them, and command line.
The guest records every process start from boot and the exit of each recorded process. The log of the previous boot is kept as exec.prev.jsonl in the VM state directory.
| Flag | Short | Description |
|---|---|---|
--follow |
-f |
Keep printing new lines until interrupted. |
--lines N |
-n |
Number of past lines to print. Default 100; 0 prints none, -1 all. |
--json |
Print the shown records as JSON lines, unchanged. | |
--all |
Also show jailoc's own guest processes and processes that exit with status 0. |
- Without
--json, control characters in logged values are escaped. - The record is written inside the VM: root in the VM (
sudo) can stop or alter it. - Processes that exit before the guest reads their details show only their name.
- When the guest misses process events during a burst, failures of the processes running at that moment are not recorded.
jailoc exec
Run a command as the agent user in a running workspace VM.
jailoc exec [flags] -- COMMAND [ARG...]
- The command runs with the session environment and secrets.
- Its working directory is the current directory when a workspace path contains it, otherwise the first workspace path.
- When standard input is a terminal, the command gets one, including window size changes.
- The command's exit status becomes jailoc's exit status.
Flags must come before the command.
jailoc shell
Open a login shell as the agent user in a running workspace VM.
jailoc shell [workspace] [flags]
- The shell starts in the same directory as
jailoc exec. - It is not a detachable session: closing the terminal ends it.
jailoc auth
Print or re-open a pending browser login link that a tool in a workspace VM passed to xdg-open or $BROWSER. Retry and recovery only: jailoc opens the browser on its own, so a normal login needs no command.
jailoc auth [workspace] [flags]
- The workspace must be running. The command reads the link from the network broker and doesn't boot the VM.
- The broker keeps a link only when its
redirect_uriis an explicithttploopback URL (localhost,127.0.0.1or[::1], port 1024-65535) and a guest listener exists on that port. Each link expires after 3 minutes; at most 8 are pending. - When the tool calls the opener, jailoc binds the host callback listener and opens the exact captured URL in the default browser of the host:
/usr/bin/openon macOS,xdg-openfromPATHon Linux, without a shell and with the environment thatjailoc upinherited. The opener in the guest exits 0 only when the host accepted the launch; a window opening or the login completing isn't guaranteed. It exits non-zero when the launch fails,xdg-openis unsupported or the URL isn't loopback. After a failed launch of an eligible login, the callback and link stay available for 3 minutes. - A workspace running the binary of an older jailoc needs
jailoc restartto get automatic opening. Recovery works only if a pending link is available. - By default the exact URL is printed to stdout and guidance to stderr. Nothing is launched.
- With
--open, the URL opens in the default browser of the host with the same fixed opener, in the environment of the invoking terminal. Only its origin, the callback port and the time left are printed. - With several pending links, the command lists the port, origin and time left of each, without the URL, and fails until
--portselects one. - A
portsentry for the same callback port also opens the browser automatically, but its login isn't listed as pending.
| Flag | Default | Description |
|---|---|---|
--open |
false |
Re-open the link in the default browser of the host instead of printing it. |
--port N |
Select the pending link with this callback port (1-65535). |
The URL is a credential: jailoc keeps it only in memory and doesn't log it or store it on disk. Recognized OAuth queries are redacted in guest exec logs, but the printed output, terminal capture, host browser history and the opener's arguments are outside jailoc's control. The guest picks the origin of the URL that is opened automatically; see the warning in OAuth link handoff. For the walkthrough and Linux desktop requirements, see Complete browser login and Browser login link is missing.
jailoc proxy
Serve the proxy routes of running workspaces over HTTPS, and redirect plain HTTP to HTTPS, on loopback addresses. Also sets up the host for them.
jailoc proxy [workspace...] [flags]
jailoc proxy install [flags]
jailoc proxy uninstall [flags]
jailoc proxy status
jailoc proxy stop
- Without workspace arguments, the proxy serves every running workspace that has
proxyroutes. Naming a workspace that is not running, has no routes, or whose running VM does not match its configuration is an error. - By default the proxy runs in the background. When it already runs, the command keeps existing browser sessions and prints the active routes.
- It starts no VM, opens no browser and changes no host setting. Host setup is
jailoc proxy install. - Each route is served at
https://<route>.<workspace>.jailoc.local, with:<https_port>appended whenhttps_portisn't 443. A plain-HTTPGETorHEADto the route's host onhttp_portis redirected (307) to that URL unless the route setshttps_redirect = false. The workspace itself answersGETandHEADof/athttps://<workspace>.jailoc.local/with200 OKand the bodyOK. - The proxy refuses to run as root.
- With the listener broker (
jailoc proxy install), the proxy serves the broker'shttp_portandhttps_port(80 and 443 by default); the broker binds the reserved ports as root. Without it, the proxy binds127.0.0.1on the samehttp_port(redirect) andhttps_port(HTTPS) as your user, so it needs ports your user can bind, such ashttp_port = 8080andhttps_port = 8081. It fails to start when it can't bind them. No forwards are needed; see set up the host manually. - The proxy also answers DNS for
jailoc.localand every name below it on127.0.0.1:<dns_port>(5399 by default), as your user. The resolution thatjailoc proxy installsets up sends onlyjailoc.localqueries there, so the names resolve while the background proxy runs. When the port is in use, the proxy warns and keeps serving HTTP and HTTPS. - The ports are set in
[proxy]. After changinghttp_port,https_portordns_port, runjailoc proxy installagain when the listener broker is installed, and restart the proxy withjailoc proxy stopandjailoc proxy. jailoc up,jailoc restart,jailoc reloadandjailoc downstart, update and stop the background proxy for the workspaces they handle. See the proxy routes how-to.
| Flag | Short | Default | Description |
|---|---|---|---|
--foreground |
-f |
false |
Run the proxy in the foreground instead of the background. |
--listen ADDR |
127.0.0.1:<https_port> |
Loopback address of the standalone HTTPS listener, host:port. It overrides only the HTTPS bind address: http_port still sets the redirect listener, and https_port still sets the port in route URLs and the accepted origin. Port 0 picks a free port. Can't be combined with --listener-broker. |
|
--listener-broker |
false |
Serve through jailoc-listener-broker on 127.0.0.1 and [::1] at http_port and https_port instead of opening listeners. Only one proxy can attach to the broker at a time. |
jailoc proxy install
Set up the host once so browsers reach the proxy routes over HTTPS on https_port (443 by default) and plain HTTP on http_port (80 by default).
jailoc proxy install [flags]
- Installs the
jailoc-listener-brokerembedded in jailoc as a root-owned service on127.0.0.1and[::1]athttp_portandhttps_port(80 and 443 by default). The broker hands each connection to the proxy over a Unix socket, with no TCP hop. On macOS the binary is/Library/PrivilegedHelperTools/jailoc-listener-broker, run by thecz.seznam.jailoc.listener-brokerLaunchDaemon. On Linux it is/usr/local/libexec/jailoc-listener-broker, run by thejailoc-listener-broker.servicesystemd unit. - Sets up resolution of
jailoc.localnames once, in one of three modes. See name resolution.- macOS: writes
/etc/resolver/jailoc.local(nameserver 127.0.0.1,port <dns_port>) and flushes the DNS cache. The names reach the proxy's DNS responder. - Linux with systemd-resolved (every
nameserverin/etc/resolv.confis the stub127.0.0.53, with at least one, and an explicitnsswitch.confhostsline containsdnsorresolveand has nomdns4_minimal [NOTFOUND=return]before it): ajailoc0dummy link with address169.254.53.53/32and the interface aliasjailoc-proxy-dns, managed by the root listener broker service. Ajailoc0without that alias is never changed or removed. It routes only~jailoc.localto the responder and hasDefaultRoute=no, so other lookups never reach jailoc. - Other Linux: syncs
/etc/hostsso<workspace>.jailoc.localand<route>.<workspace>.jailoc.localresolve to loopback. jailoc owns only the block between# BEGIN jailoc proxy hostsand# END jailoc proxy hosts.
- macOS: writes
- Trusts the proxy CA certificate
ca.crtin the system trust store (the keychain on macOS; the Debian, Fedora or Arch store on Linux) and in the NSS databases of Chrome, Chromium and Firefox. NSS databases needcertutilonPATH; without it, importca.crtinto Firefox by hand. - Lists the planned changes and asks once for confirmation before making them.
- Configures
jailoc up,jailoc restartandjailoc proxyto attach to the listener broker by default. - Running it again rewrites the broker service and the resolver file or link for the current
http_port,https_portanddns_port, and replaces the trusted CA ifca.crtwas regenerated. Run it after changing any of the three ports. With the/etc/hostsblock it also updates the block to the current workspaces and proxy routes; with the resolver file or thejailoc0link, new workspaces and routes need no reinstall. - Uses the
jailoc-listener-brokerembedded in release builds, or ajailoc-listener-brokerbinary next tojailoc. The embedded bytes are installed as they are, not read back from a cache copy. - Imports
ca.crtfrom a copy of the validated certificate and refuses aca.crtwith extra PEM data. A matching system store or NSS entry thatinstall.jsondoesn't record is left as it is and not recorded. | Flag | Short | Description | |------|-------|-------------| |--yes|-y| Accept every confirmation. |
jailoc proxy uninstall
Remove what jailoc proxy install added.
jailoc proxy uninstall [flags]
- Stops the background proxy, then removes the listener broker service and binary, the name resolution that install set up (the
/etc/resolver/jailoc.localfile, thejailoc0link, or the jailoc block of/etc/hosts), and the CA certificate from the system trust store and the NSS databases. - Lists the planned changes and asks once for confirmation before making them.
- Removes the service files only after launchd or systemd confirms the service is stopped or absent. If it can't, the command fails and keeps
install.jsonand the installed files for a retry. - Leaves a system store or NSS certificate that
install.jsondoesn't record. - Keeps the CA directory
~/.local/share/jailoc/proxy.
| Flag | Short | Description |
|---|---|---|
--yes |
-y |
Accept every confirmation. |
jailoc proxy status
Show the background proxy and the host setup.
jailoc proxy status
- Shows the running proxy, its listener and its route URLs.
- Checks the listener broker, the CA certificate and the name resolution. It reports the resolution mode (resolver file,
jailoc0link or/etc/hostsblock) and, in/etc/hostsmode, the entries of the configured workspaces and proxy routes. - Reports the CA trust as
verified(the Linux system store, confirmed by its certificate file) orrecorded by jailoc proxy install, not verified(the macOS keychain and the NSS databases, whichinstall.jsonrecords but status doesn't look into).
jailoc proxy stop
Stop the background proxy.
jailoc proxy stop
- Closes every route and browser session of the proxy.
- Leaves the host setup of
jailoc proxy installin place.
jailoc sessions
List the agent sessions running in a workspace VM, or stop one.
jailoc sessions [flags]
jailoc sessions stop ID [flags]
- Lists each session's ID, state (
attachedordetached), start time, directory and command, most recently attached first. stopends the session's agent; an attached terminal is disconnected.- Sessions end when the workspace VM stops.
jailoc config
Print the resolved configuration of a workspace.
jailoc config [workspace] [flags]
- Reads the configuration file and resolves
[defaults], agent settings and~expansions for the selected workspace (from the argument,--workspace, or the current working directory). - Prints the effective workspace configuration together with its
Computed Paths:Config File,Workspace Config Dir,Workspace Cache Dir,VM State Dir, andProfile Dir. - Lists secrets under
Secrets:asNAME (<destination> from_<source> <reference>), for exampleGH_TOKEN (env from_env HOST_GITHUB_TOKEN),NPM_TOKEN (env from_command "op read op://dev/npm/token", ttl 1h0m0s)ordb_cert (file from_file /home/you/.config/db.pem). - Prints only the source reference: secret values are never read, commands are never run.
| Flag | Short | Description |
|---|---|---|
--all |
-A |
Show the resolved configuration of every configured workspace. |
jailoc add
Add a directory to a workspace's paths list.
jailoc add [path] [flags]
- Appends
path(default: the current working directory) toworkspaces.<name>.pathsin the configuration file. - The path must be one
pathsaccepts: not a guest-internal directory, the home directory, the host root or a protected path such as~/.ssh; see the configuration reference. - Secret sources of the target workspace are validated before the configuration changes.
- If the workspace VM is running, it is restarted so the new share takes effect.
- Without
--workspace, the workspace is resolved from the path being added (longest prefix). - If
--workspaceis set and the path is not under any configured path of that workspace,jailoc addreturns an error.
jailoc setup
Interactive onboarding and workspace setup wizard (jailoc wizard is an alias).
jailoc setup [path] [flags]
jailoc wizard [path] [flags]
| Flag | Short | Description |
|---|---|---|
--dry-run |
Print the generated or updated config.toml without writing it. |
|
--yes |
-y |
Accept the default answer to every question. Required when standard input is not a terminal. |
jailoc setup operates in two modes depending on the state of config.toml:
- First-time onboarding (when
config.tomldoes not exist or still matches the unmodified default template): asks for[defaults]settings and configures the initial workspace forpath(default: the current working directory). The settings areagent, model providers for OpenCode, OmO and pi (agent_endpoints),git_config,ssh_auth_sock,gpg_agent, network egress policydev-depsvsinternetplus optional extra hostnames/CIDRs,enable_docker,cpuandmemory, followed by a review summary before writingconfig.toml. - Add-workspace mode (when a customized
config.tomlalready exists): asks for a workspace name (default: sanitized basename ofpathor--workspace), workspace directory path, optional agent override, Docker inside the VM, workspace network rules, and model providers whenagent_endpointsis needed, then shows a review summary and patches[workspaces.<name>]while preserving existing comments inconfig.toml. Answeringinheritremoves the workspace's ownagent,enable_dockerornetwork.rules. - Interactive prompts run inline in the terminal (
Shift+Tabmoves back to previous fields or steps). SettingACCESSIBLE=1orTERM=dumbswitches to accessible plain-text prompts. - A workspace directory that
pathsrejects, such as/, the home directory or~/.ssh, is refused; seepaths. - When standard input and standard output are terminals and
config.tomlis missing or unmodified default, runningjailocorjailoc upoffers to runjailoc setupfirst. jailoc up <workspace>uses<workspace>as the default workspace name, and the command then starts the workspace the wizard created.
jailoc migrate
Update an existing configuration to the current format.
jailoc migrate [flags]
| Flag | Short | Description |
|---|---|---|
--dry-run |
Print the planned changes and the resulting config.toml without changing anything. |
|
--yes |
-y |
Accept the default answer to every question. Required when standard input is not a terminal. |
When no scope sets network.agent_endpoints, jailoc migrate asks which model providers OpenCode and OmO may reach (all selected by default; --yes takes all) and adds their endpoints to [defaults.network] (when the default agent is one of them) and to each OpenCode or OmO workspace that needs other endpoints; see rule=agent.
jailoc migrate asks for optional internal_zones (comma- or whitespace-separated DNS zones) when no non-empty internal_zones exists in [defaults] or any workspace and explicit allow rules include hostnames, including wildcard hostnames. The answer is stored in defaults.network.internal_zones and applies to every workspace. A blank answer leaves the zones unset; --yes skips the question. --dry-run asks the question and previews the result without writing it. Names in a zone and its subdomains may resolve to private addresses, but a zone alone grants no access; see Internal zones.
For configuration changes, data transfer and migration troubleshooting, see Upgrade an existing installation.
jailoc self-update
Replace the running jailoc binary with a release from GitHub.
jailoc self-update [flags]
| Flag | Description |
|---|---|
--check |
Report the release that would be installed and the installation type. Installs nothing. |
--version <tag> |
Install the given release tag, including a prerelease or an older release. Bypasses the 24-hour cooldown. |
--no-cooldown |
Install the most recent stable release even if it was published less than 24 hours ago. |
--force |
Skip the development-build and Homebrew guards. Does not skip verification and does not override the Nix guard. |
Without flags, jailoc self-update installs the highest stable release that was published at least 24 hours ago. When a newer stable release is still inside the 24-hour window, the command prints a notice and does not install it. The cooldown delays adoption of a new release; it is not evidence that the release is safe.
Installation guards. The command resolves the path of the running executable with symlinks evaluated (the jl alias resolves to jailoc), and acts on the resolved file:
| Installation | Behavior |
|---|---|
Path under /nix/store |
Never written, not even with --force. Update through Nix. |
| Homebrew | Refused; run brew upgrade --cask jailoc. --force skips the guard. |
Development build (dev or (devel)) |
Refused; pass --force or --version. |
--check reports these installations without writing the executable. It can still write the update-check state file.
Verification. Before installing, the command:
- Requires the archive's SHA-256 in
checksums.txtto match the asset digest that the GitHub API reports. - Looks up that digest's attestation through the GitHub API and requires the exact subject and release workflow metadata to match.
- Downloads the archive with a size limit and checks its SHA-256 before decompressing it.
- Runs
gh attestation verifywhenghis installed. This checks the signature, timestamp, repository and release workflow cryptographically. Any failure stops installation, including an unsupportedghversion. Withoutgh, the command warns that the signature was not verified locally. - Extracts only the exact
jailocfile after the preceding checks pass.
The attestation metadata from the GitHub API is what GitHub reports over HTTPS. It is not an independent cryptographic verification; without gh, the install relies on trust in GitHub and the TLS connection.
Replacement. The new binary is written to a temporary file next to the executable with mode 0755, synced to disk, and, on macOS, stripped of the com.apple.quarantine attribute. It then replaces the executable by rename, which gives the path a fresh inode. The jl alias is not rewritten.
Running workspaces
Running workspace VMs keep using the guest, network broker and supervisor of the old version until you run jailoc restart <workspace>.
jailoc self-update never runs automatically, and the update notifier does not run during it.
jailoc completion
Generate a shell completion script.
jailoc completion bash|fish|powershell|zsh
Update Checks
jailoc checks GitHub Releases for newer versions when a command runs. The check runs in the background and does not block the command.
- Cache: the HTTP response is cached for 24 hours. The cache stores the candidate releases with their publication timestamps, and jailoc evaluates the cooldown locally on each run. A state file in an older format is discarded and fetched again.
- Notice: when a stable release at least 24 hours old is newer than the running version, a notice is printed to stderr. A newer release inside the 24-hour window produces no update notice, and a later run reports it once it ages out. The check runs only when stderr is a TTY; otherwise it is skipped entirely and nothing is printed.
- Color: respects
--no-color. - Install: the notice does not install anything; run
jailoc self-update.
Update checks are skipped when:
- the build version is
devor(devel)(localgo buildwithout release ldflags), - the
CIenvironment variable is set to any non-empty value, - the
JAILOC_NO_UPDATE_NOTIFIERenvironment variable is set to any non-empty value, - the command is
jailoc self-update.
| Variable | Default | Description |
|---|---|---|
JAILOC_NO_UPDATE_NOTIFIER |
(unset) | Set to any non-empty value to disable update checks. |