Skip to content
Pages

CLI reference

parcela [GLOBAL OPTIONS] COMMAND acts on the current checkout unless another target is selected. With no command, it shows checkout status or the next setup step. parcela <command> --help lists its public options.

Global options

Option Meaning
-C, --path DIR Checkout directory. Configuration lookup walks from this directory to its parents. Defaults to the current directory.
-w, --workspace ENV A registered environment, from any directory: one of its URLs or hostnames, with or without .localhost or .local and the port, its name when only one environment has it, or its ID from parcela ls --json. Conflicts with --path.
--state-dir DIR State directory. Precedence is this option, PARCELA_STATE_DIR, $XDG_STATE_HOME/parcela, then ~/.local/state/parcela.
--json JSON output even in a terminal.
--help, -h Help.
--version, -V Version.

Output

Commands print text in a terminal and one JSON document when stdout is piped or --json is given. Exceptions are url, logs, trust --print, trust --export, trust --fingerprint, skill and completion, which print plain text, and task and run, which pass through command output. Errors go to stderr with the prefix parcela:. up --detach shows a progress line on stderr while it waits, in a terminal outside CI.

Colors appear only in a terminal. CLICOLOR_FORCE=1 or FORCE_COLOR=1 keeps them when output is piped, for less -R or CI logs; NO_COLOR turns them off and wins over both. Forcing colors never switches a piped command from JSON to text.

For example, parcela status --current --json | jq -r .state reads the environment state.

Exit code Meaning
0 Success.
1 Command failure, failed doctor check, no proxy for proxy status, an unset key for config get, or an environment that down --all or --all-projects could not stop.
2 Invalid arguments.
124 A task exceeded timeout_seconds.
Other Exit code from the command executed by task or run.

Environment variables

Parcela reads these from the shell that runs it. Variables it gives your processes are in Configuration.

Variable Effect
PARCELA_STATE_DIR State directory, like --state-dir.
XDG_STATE_HOME State directory is $XDG_STATE_HOME/parcela when neither --state-dir nor PARCELA_STATE_DIR is set. Must be absolute.
PARCELA_CONFIG Host config file, instead of $XDG_CONFIG_HOME/parcela/config.yaml or ~/.config/parcela/config.yaml.
PARCELA_HTTPS_PORT Proxy port when neither proxy.port nor a saved port is set.
PARCELA_LAN, PARCELA_TAILSCALE 1 works like --lan or --tailscale for up and restart.
PARCELA_DOMAIN, PARCELA_DOMAIN_PORT Like --domain, comma-separated, and --domain-port.
PARCELA_NO_TRUST Any value but empty or 0 stops up from offering CA trust.
PARCELA_NO_UPDATE 1 turns off release checks and update prompts.
DO_NOT_TRACK, PARCELA_TELEMETRY_DISABLED Any value but empty, 0, false or no turns off telemetry.
PARCELA_TELEMETRY_DEBUG Prints the telemetry event instead of sending it.
NO_COLOR, CLICOLOR_FORCE, FORCE_COLOR Color control; see Output.
CI Hides the up --detach progress line.
BROWSER The browser open runs, instead of open on macOS or xdg-open on Linux.

Parcela removes every PARCELA_ variable, and PORT, from the environment of the commands it runs, so a variable meant for the CLI never reaches your app.

init

parcela init [--name NAME] [--command CMD]

Writes a minimal parcela.yaml with one HTTP service, web, without replacing an existing file. The command is guessed from a dev script in package.json (run with pnpm, yarn, bun or npm by lockfile), a Rails app (Gemfile and bin/rails) or Django (manage.py), with a Python file server as fallback. --command overrides the guess. The project name defaults to the main checkout's directory name; --name sets it, turned into a DNS label.

create

parcela create NAME [--directory DIR] [--revision REV] [--from SNAPSHOT]

Creates and registers a preview without starting services or running setup. Git repositories get a detached worktree at HEAD by default. jj repositories get a named workspace based on @, including the changes jj snapshots from the source checkout. --revision chooses another revision. jj takes precedence in colocated repositories; a jj failure never falls back to Git. Other VCS backends are unsupported.

The default directory is a sibling named <repository>-<NAME>, or <repository>-<NAME> in worktrees.directory, which is created if missing. --directory chooses a new directory whose parent already exists. Existing directories, workspace names, and registered environment names are refused. Git checkout hooks are disabled. Ignored files are not copied; files already committed to Git or tracked by jj follow that VCS's rules.

--from restores a data snapshot before the first start. It does not restore source history, secrets, setup markers, or running processes. JSON includes checkout with the path, VCS and source revision, workspace with the environment ID, and state: stopped. A creation failure retains any checkout already created and names it in the error.

snapshot

parcela snapshot NAME

Saves the selected environment's declared data under <state>/snapshots/<project>/<NAME>. The environment must be stopped with no owner, restart, or task operation holding its locks. Each SQLite database uses SQLite's backup API, including committed WAL contents. Snapshot names are immutable. There is no automatic seeding, retention limit, or snapshot deletion command.

restore

parcela restore NAME

Restores a snapshot into a fresh registered environment whose data directory does not exist. Existing data is never replaced, including an empty data directory. Project and data declarations must match. Files are staged and checksummed before publication, and a failed restore publishes no partial data. Snapshot and restore require macOS or Linux with atomic no-replacement directory rename support.

Restore does not start services or mark setup complete. The next up runs the normal setup and prestart hooks. Those commands must preserve restored data. Seed and external database export/import commands remain explicitly configured tasks.

up

parcela up [--detach] [--setup] [--name NAME | --primary] [--backend-port N] [--lan] [--lan-ip IP] [--tailscale] [--domain DOMAIN ... [--domain-port N]] [--no-share]

Registers the checkout on first use and starts the configured services. If HTTP services are configured, it starts the proxy as needed and opens routes after readiness. Without HTTP services, it supervises processes without a proxy or URL. A ready environment is reused. If the owner process died but services survived, up adopts the recorded processes instead of starting duplicates.

Option Effect
--detach, -d Returns after readiness and leaves services running. Without it, process output streams in the foreground and Ctrl-C stops the run.
--setup Runs hooks.setup again. Otherwise setup runs only until its first success per environment.
--name NAME Chooses a preview name on first registration. Conflicts with --primary and --workspace.
--primary Gives a checkout the project's main URL if available. Conflicts with --workspace.
--backend-port N Sets the default HTTP service's backend port. Minimum 1024. Other ports are leased automatically.
--lan Shares this run at .local names on the LAN, to paired devices only. Also set by PARCELA_LAN=1.
--lan-ip IP Chooses the LAN IPv4 address and turns on --lan. It must belong to a network interface and be private or link-local.
--tailscale Shares this run through tailscale serve. Also set by PARCELA_TAILSCALE=1. Never uses Funnel.
--domain DOMAIN Also serves each service at <name>.DOMAIN, in plain HTTP on loopback for your own HTTPS proxy. Repeat it for more domains; they share --domain-port. Also set by PARCELA_DOMAIN, comma-separated.
--domain-port N The loopback port for --domain, 1480 by default, minimum 1024. Also set by PARCELA_DOMAIN_PORT.
--no-share Disables all sharing for this run, including host defaults and environment variables. Use restart --no-share for an already shared run.

hooks.prestart runs on every new start after setup. A hook failure, an HTTP service exit, or a nonzero process exit before first readiness stops startup. A non-HTTP process may finish with code 0.

After readiness, ordinary services are not restarted automatically. Exits are reported. If an HTTP service stops listening for longer than the readiness timeout, readiness_timeout_seconds in parcela.yaml (60 seconds by default), the environment stops. Sharing publishers have a separate retry policy.

--backend-port, --lan, --lan-ip, --tailscale and --domain need an HTTP service. Share with another device covers each kind of sharing.

For an HTTP environment, the first up in a terminal may offer system CA trust. It is offered once per CA. PARCELA_NO_TRUST=1 or trust false suppresses it. Nonterminal runs never change trust.

down

parcela down [--all | --all-projects]
parcela stop [--all | --all-projects]

Stops the selected environment in reverse dependency order. Once nothing that depends on a service is running, its stop command runs, if it has one, then its process group receives SIGTERM, then SIGKILL after 10 seconds if needed. If a stop command fails, down says so; run it again. Repeated stops are harmless. Source, data, and registered names remain.

--all stops this project's environments. --all-projects stops environments across projects. Both conflict with --workspace and with each other.

restart

parcela restart [--detach] [--setup] [--backend-port N] [--lan] [--lan-ip IP] [--tailscale] [--domain DOMAIN ... [--domain-port N]] [--no-share]

Checks the replacement configuration, then stops and starts the whole environment. New URL reservations happen after the old run stops. Options have the same meanings as for up. The new run does not keep the old run's sharing flags: pass them again. Host sharing applies as for up. restart refuses an environment started with run.

status

parcela status
parcela status --current
parcela --workspace ENV status

With no selection, shows an overview of registered environments across projects, including their state, URL, and source path. The current checkout has a * marker and its project appears first. Inside a project, unregistered sibling worktrees also appear as not started. The overview works outside a project and never registers or starts environments.

--current shows the current checkout's registered URLs, live HTTP health, process state, and named ports. --workspace ENV selects that detailed view from any directory. Bare parcela keeps the detailed checkout view.

Overview JSON uses the same envelope as ls: {runtime_verified, workspaces, unregistered}. Overview rows have a current marker and a urls map. Registered rows also include processes. Scripts that previously read .state from plain status --json must use status --current --json or select --workspace ENV.

Environment state Meaning
ready The configured processes have started, hooks have completed, and explicit readiness checks pass.
starting Startup is in progress.
unhealthy A live health check fails.
stopping Shutdown is in progress.
stopped The environment is stopped.
interrupted The supervisor died and left processes running. parcela up takes them back. A dead supervisor that left nothing running shows as stopped.
unknown The supervisor cannot be contacted reliably.

Process states are pending, running, stopping, restarting, completed, exited, and skipped. completed means exit code 0. skipped means a dependency stopped before the process could start. The JSON response includes a diagnostic field for failures.

ls

parcela ls

Lists registered environments across projects. Inside a project, it also lists unregistered sibling jj workspaces and Git worktrees as not started. Listing creates no registrations.

ui

parcela ui

Prints the local dashboard URL, https://parcela-dashboard.localhost:1443 with the default proxy port. JSON output is {url}. The proxy must already be running; this command starts nothing and opens no browser. After upgrading, the next regular command refreshes an older running proxy automatically. The hostname parcela-dashboard.localhost is reserved for the dashboard.

The dashboard groups registered environments by project and discovers unregistered worktrees of known projects. Running environments come first, with those that need attention on top and stopped ones collapsed. Each row shows its URL, state and process count, with Open, Logs, Start, Restart and Stop where they apply; an environment with several services opens each by name. The filter narrows the list and opens the stopped ones. Logs open at /logs. Status refreshes in the background; a failed connection or an old timestamp shows a warning. Apps open at their own URLs, never in a frame.

While nothing serves a registered .localhost name, a browser page load there shows the environment's state with Start or Restart, a link to its logs and a link to the dashboard. Starting always takes a click. The page reloads into the app once it is ready. Other requests to the name get 503.

Pages on .localhost, domain and LAN names get Parcela's debug menu without any change to the app: the proxy adds its script to each top-level page load. parcela config set badge false turns that off. Everything else, including assets, API calls, frames and curl, reaches the app unchanged. See The badge on app pages for what a tagged response changes.

A CSP that allows neither same-origin scripts nor a nonce blocks the menu; Parcela never relaxes it. One that blocks same-origin images shows the word parcela in place of the icon. One that blocks same-origin fetch leaves the badge without data. An app that compresses even when asked not to passes through without the badge. If the extra script upsets a framework's hydration, turn the badge off.

With badge off, an app can still include the script itself, from its own host:

<script defer src="/_parcela/widget.js"></script>

Every .localhost app host answers /_parcela/ for its own environment, so the script loads from the app's own origin. LAN names pass /_parcela/ to the app like any other path, except /_parcela/certificate and /_parcela/ca.crt (see devices) and, while badge is on, the menu's /_parcela/widget.js, /_parcela/badge.png and /_parcela/lan.

On a domain name the menu is read-only, since other people may reach that name. It shows this environment's state and links to the project's other running environments, with no actions, logs or opened files. With badge off, a domain name passes /_parcela/ to the app.

On a LAN name only an approved device gets the menu, and its paths sit behind the same device gate as the app. It shows that environment's name and state and a Certificate section: a button that downloads /_parcela/ca.crt and a link to /_parcela/certificate. It has no actions, logs, opened files, links to other environments or to the dashboard, and its script does not know the dashboard's address.

A Parcela icon sits in the page's top-right corner. Drag it to any edge of the window, or focus it and press the arrow keys; each host remembers its place per browser. On a .localhost name it shows a count of new items your app opened and opens a panel with two tabs:

  • Environments, on an app page, shows only that page's environment, with Restart, Stop and Logs. The grid button opens parcela-dashboard.localhost, which lists every project and worktree Parcela knows, stopped and unregistered ones included, and gives registered ones Open, Start, Stop, Restart and Logs. Run parcela up in a checkout once to register it. Actions ignore PARCELA_LAN, PARCELA_TAILSCALE and PARCELA_DOMAIN, but host sharing applies. Actions run parcela up --detach, down or restart --detach in the background; the row shows progress and the last error line.
  • Logs tails each process of the chosen environment and follows new output. It keeps the program's own terminal colors and highlights timestamps, HTTP methods and statuses, durations, and error and warning lines. Filter narrows to matching lines; Wrap toggles line wrapping, on by default on narrow screens.

When a process asks a browser to open something, such as a mail preview (see browse), it appears in Opened by your app above the environments, only while there is something to show. Remove items one by one or clear them all; removal is kept per browser.

The expand button grows the panel to nearly the whole window, and the open button shows the same menu as a full page at /_parcela/ in a new tab.

Escape, the close button or a click outside closes the panel. Actions accept only same-origin requests that carry X-Parcela-Action. A script on an app page can see, start, stop and read the logs of that page's own environment only; other environments need the dashboard's own name.

browse

parcela browse TARGET...

Offers http(s) URLs, file:// URLs or absolute file paths to the browsers showing this environment. Processes get it as BROWSER, through a shim at bin/browser in the runtime directory, so a mail preview, an OAuth helper or a rails command that opens a browser reaches the person instead of the machine running the server. It only runs inside an environment and starts nothing.

Each .localhost page running the debug menu script shows a toast with an Open link for requests made from 15 seconds before the page loaded onward, once per tab. A URL on the environment's own host becomes a path, so it opens on the name the browser is using. A file opens at /_parcela/files/ID/NAME; page assets beside it (HTML, CSS, images, icons and fonts, but never dotfiles) resolve too, so relative links work. Opened files are served with a sandbox policy and never run scripts on the app's origin. Parcela keeps the last 20 requests per environment.

What the environment opened, such as mail previews with sign-in links, is offered only on .localhost names. LAN, domain and Tailscale names do not serve /_parcela/.

logs

parcela logs [SERVICE] [--tail N] [--follow]

Prints output from the latest run's services, workers, and hooks. Without a name, lines carry process-name prefixes. --tail defaults to 100 lines per process and accepts 1 through 10000. --follow, or -f, streams until interrupted or the environment stops.

Logs remain after shutdown until the next start. Files are under log/processes/<name>.log in the runtime directory, with one rotated <name>.log.1 after 16 MB. Detached owner output is in log/owner.log.

url

parcela url [SERVICE]

Prints the default service's URL or the named HTTP service's URL. Registered URLs remain available while stopped. Environments without HTTP services have no URL, so url and open return an error.

open

parcela open [SERVICE]

Opens the default service's URL, or the named service's, in the browser set in $BROWSER, or the system's default browser. Refuses a stopped environment.

doctor

parcela doctor

Checks Caddy, lsof, ps, configuration, the state directory, and the proxy without changing them. Each failure includes a fix. Exit code 1 means at least one check failed. Watcher-only projects skip Caddy and lsof, but check compatibility with any live shared proxy. HTTP protocol differences are warnings, as for up; watcher-only starts refuse an incompatible proxy. Browser trust and application readiness are not checked.

It also lists problems from the last day's logs, without failing on them: errors from the proxy's log and what each environment's supervisor reported, such as a process that exited, with how often each happened and the log to read.

It also notes runtime directories that no registered environment owns, with their total size, and points at rm --orphans.

JSON has the shape {ready, checks: [{name, ok, detail, fix}], notes, orphaned_data: {directories, bytes}, recent_problems: [{source, detail, count, log}]}. orphaned_data is null when the registry cannot be read.

rm

parcela rm [--prune] [--data]
parcela rm --orphans [--data]

Forgets a stopped environment and releases names and ports. Refuses a running environment. A configured hooks.teardown runs first. Then, for a compose service, Parcela removes the environment's containers and network and lists the volumes it keeps. If either fails, registration remains. Parcela itself retains source and, without --data, the runtime directory.

--prune applies to stopped environments whose checkout directory no longer exists. It conflicts with --workspace.

--data also deletes each forgotten environment's runtime directory, PARCELA_RUNTIME_DIR, with its data, logs and cache. It deletes only after the registration is gone, so a running environment's directory is never touched, and it refuses a directory that is not a private directory you own or that a process still holds. If the deletion fails, the environment stays forgotten, the directory is reported as kept, and the exit code is 1. JSON reports deleted: {runtime_dir, bytes} for each, or null when there was no directory.

--orphans lists the runtime directories that no registered environment owns, such as those a plain rm kept, with their size, last modification, and the name and checkout of their last run when known. It changes nothing. With --data, it deletes them. It considers only directories directly under environments/ that are named by an environment ID, never follows symlinks, and refuses when the registry cannot be read, since ownership cannot then be proved. JSON has the shape {environments_dir, orphans: [{id, path, bytes, modified, project, role, name, source}], bytes}, or {environments_dir, deleted, failed, bytes} with --data; modified is in seconds since the epoch. --orphans conflicts with --prune and --workspace.

task

parcela task NAME [-- ARGS...]

Runs a configured task with the environment's variables. The environment must be registered, through create or up, and may be stopped. Arguments after -- are appended to the task command. Output and exit status pass through, except a timeout exits 124.

run

parcela run [--name NAME | --primary] [--backend-port N] -- COMMAND...

Runs a foreground command as the project's HTTP service. Requires a parcela.yaml with exactly one HTTP service. Only the command runs: no other services and no hooks. Sharing flags are not accepted, and restart refuses a run started this way. The command must listen on 127.0.0.1:$PORT.

Arguments execute without a shell. Shell expansion requires an explicit shell, for example:

parcela run -- sh -c 'exec python3 -m http.server "$PORT" --bind 127.0.0.1'

proxy

parcela proxy start [--port N]
parcela proxy stop
parcela proxy restart [--port N]
parcela proxy status

One background Caddy serves all environments. Owners recover an unexpected proxy exit. An explicit proxy stop keeps it stopped until proxy start or the next up.

Subcommand Effect
start Starts the proxy. --port chooses and saves its port. An occupied port causes an error naming its owner. A --port other than the host's proxy.port, or any move while the relay is installed, is refused.
stop Stops routing for every environment. App processes keep running.
restart Replaces the proxy, including after an upgrade. Briefly interrupts URLs. Takes --port like start.
status Shows the port, PIDs, version, and log path. Exits 1 if stopped.

The port is the host's proxy.port, else the port saved by proxy start --port, else PARCELA_HTTPS_PORT, else 1443. Port 443 omits the port from URLs and requires permission to bind it; relay is the usual way to get URLs without a port. The proxy redirects plain HTTP on its listener to HTTPS.

devices

parcela devices [list | approve ID | revoke ID | revoke --all]

Decides which devices may open runs shared with --lan. A device that opens a .local name without approval gets a page saying it waits for approval on this machine, with its device id, and Parcela lists it as pending. The page asks again every 3 seconds without reloading, or reloads every 3 seconds when scripts are off, and opens the app once the device is approved. Requests that are not page loads, such as images or fetch, get a plain 403 and ask for nothing.

Subcommand Effect
list The default. Lists pending and paired devices with their id, .local name, address and browser. JSON is {devices}, each with id, standing (pending or approved), host, address, user_agent, requested_at_unix_ms and decided_at_unix_ms.
approve ID Lets the device open that .local name.
revoke ID Forgets the device, pending or approved. Its next page load asks again.
revoke --all Forgets every device.

The dashboard at parcela-dashboard.localhost shows the same list under Devices on the LAN, with Approve for a pending device and Revoke for an approved one. Only the dashboard's own name decides, with the same same-origin rule as its other actions. LAN names never reach the dashboard, so a device cannot approve itself.

Approval is per device and .local name: browsers keep no cookie across single-label .local domains, so a phone that opens shop.local and api-shop.local is approved for each. The cookie, parcela_device, is Secure, HttpOnly and SameSite=Lax, lasts 400 days, and never reaches the app. Parcela stores a SHA-256 hash of its token in proxy/devices.json in the state directory. At most 20 requests stay pending; older ones make room, so 20 page loads without a cookie can push out a real request. Approve the id the device's page shows, and if it is no longer listed, reload the page there to ask again. Revoking a device stops its next request, but a WebSocket it already opened stays open until either side closes it.

The waiting page offers the root certificate as a one-tap download and links to /_parcela/certificate, which every .local name serves before pairing: the certificate's SHA-256 fingerprint, which should match parcela trust --fingerprint on this machine, and install steps for iPhone, Android and desktop browsers. /_parcela/ca.crt downloads the certificate in DER as application/x-x509-ca-cert; the private key is never served. Both are HTTPS only: plain http:// on the LAN is redirected to HTTPS before any route, so the first visit shows the browser's warning. Read what trusting the certificate authority allows first. Certificate trust on a phone is not verified working yet: after the root was installed on an iPhone, Brave on iOS still showed the .local page as not trusted. The cause has not been investigated.

An approved device is as trusted as this machine. Its requests reach the app as loopback requests: Caddy removes X-Forwarded-For, Forwarded, X-Real-IP and similar headers that would name the device, whether Caddy added them or the device sent them, and keeps X-Forwarded-Proto and X-Forwarded-Host, so the app still sees HTTPS on the .local name. Tools that answer only local requests, such as Rails' web-console, should therefore answer an approved device; that has not been tested. Approve only devices you would let use this computer. Apps need no change and learn nothing about pairing. Unapproved devices never reach the app. Tailscale and --domain shares are not gated and still pass the real client address.

Verified live through the LAN redirect on port 443: an iPhone (Brave on iOS) got the waiting page, was approved here and reached the app, and another host on the LAN got the waiting page.

relay

parcela relay [status | install [--lan [--interface NAME]] | uninstall]

Serves URLs without a port. The relay is not the proxy: it is a system service that forwards loopback port 443, and port 80 when free, to the proxy's port, as your user. Without a subcommand, shows whether it is installed.

Subcommand Effect
status Shows whether the relay is installed, whether it takes port 80, and the port it forwards to, as installed. JSON adds proxy_port, this state directory's proxy port, and lan, the installed LAN redirect's interface, target port and http, read from its rules file, or null.
install Installs the relay after a password prompt. Refuses an occupied 443. On macOS it is a launchd daemon running nc; on Linux, systemd socket units running systemd-socket-proxyd.
install --lan Installs the LAN redirect instead, after a password prompt. macOS only. --interface picks the interface; the default holds the detected LAN address.
uninstall Removes the relay and the LAN redirect.

Restart running environments after either change so their URLs update.

The LAN redirect sends ports 443 and 80 on one interface's address to the proxy's port on that same address. Caddy listens there only while a run is shared with --lan, and only for that run's .local names, so it never reaches loopback-only environments. It is a pf anchor, com.apple/parcela, loaded at boot by a launchd daemon that also turns pf on; /etc/pf.conf is not edited. The rules are plain rdr, so your own pf filter rules still apply. On this Mac itself the port-less .local URL does not connect: pf does not redirect the machine's own connections to its LAN address. Use <name>.localhost there, or <name>.local:<proxy port>. Linux is not supported: there install --lan refuses and .local URLs keep the port. pf checks the rules before the password prompt; if a later step fails, the install removes what it put in place and shows pf's error. It refuses when something already answers on port 443 at that address and skips port 80 when something answers there. Shared .local URLs drop the port only while the redirect targets this proxy's port on the interface that holds the run's LAN address. Uninstalling flushes the anchor but leaves pf on until the next boot. Verified live from an iPhone and from another host on the LAN, through port 443. proxy install and proxy uninstall still work as aliases.

autostart

parcela autostart [status | enable | disable]

Starts again, at login, the environments that were running when the machine went down. Environments stopped with down stay stopped, as do checkouts that no longer exist. Off by default. Without a subcommand, shows whether it is on and how many environments it would start.

Subcommand Effect
status Shows whether autostart is on.
enable Installs a per-user service that runs once at login: a LaunchAgent on macOS, a systemd user unit on Linux. No password prompt. It keeps the current PATH and PARCELA_CONFIG; set env.command so a project's tool versions come from its checkout instead.
disable Removes the service.

Each environment starts with parcela up --detach in its checkout, shared as its last run was: the same domains, Tailscale, and LAN on whatever address the machine has now. A run that shared nothing starts with --no-share. Output goes to autostart.log in the state directory. On a Linux machine nobody logs in to, run loginctl enable-linger so user services start at boot.

trust

parcela trust [--print | --export | --fingerprint | --remove]

Adds Caddy's local CA to the system trust store using caddy trust, starting the proxy first if needed. Prints the certificate's path and the undo command before the system password prompt. Requires a terminal. All projects use the same CA.

Flag Effect
--print Prints the certificate path. Changes nothing.
--export Prints the certificate itself, to install on a phone or another computer that opens .local URLs: parcela trust --export > parcela-ca.crt. Changes nothing.
--fingerprint Prints the certificate's SHA-256 fingerprint as colon-separated hex, to compare with the one a phone shows at /_parcela/certificate. Changes nothing.
--remove Removes the CA from the system trust store with caddy untrust, behind the system password prompt. Requires a terminal.

--print, --export and --fingerprint fail until the proxy has started once and created the CA. Clients and certificates covers programs with their own CA list.

upgrade

parcela upgrade [--nightly]

For shell-installer installations, downloads and runs the installer. Installs the latest release, or with --nightly the newest build of main. A successful installation refreshes an older running proxy on its existing port. Application processes, data, and setup hooks keep their current run. URLs briefly disconnect while owners republish their routes. A deliberately stopped proxy stays stopped, and an older CLI never replaces a newer proxy.

Bare parcela, up, restart, run, status, ls, logs, url, open and ui check for a stable release at most once a day when stdin, stdout and stderr are all terminals. Shell-installer installations offer Update now? [Y/n]. Accepting installs the release, refreshes the running proxy, and resumes the original command with the new CLI. Declining continues the command and suppresses another prompt for a day. Offline release checks do not block the command.

Other commands, piped commands, --json and background owners never check for updates or prompt. The same commands, --json included, refresh an older running proxy; other commands never touch it. PARCELA_NO_UPDATE=1 or parcela config set updates false disables automatic release checks. It does not disable local proxy maintenance after an update.

For Homebrew or Cargo installations, Parcela shows an update notice, and upgrade exits 1 with the matching package-manager command without replacing the installation. After that update, the next of the commands above refreshes an older running proxy. Builds outside known installation paths skip automatic release checks.

config

parcela config [list | get KEY | set KEY VALUE | add KEY VALUE | remove KEY VALUE | unset KEY | path]

Shows or changes this machine's settings. Without a subcommand, or with list (alias ls), lists every key with its default when unset. get exits 1 when the key is unset. add and remove change one item of a list; set replaces a list with comma-separated values. path prints the file's path. Booleans accept true, false, yes, no, on, off, 1 and 0.

Key Value
sharing.domains Shares every run under each domain in the list, like --domain. --domain replaces the list for a run. Removing the last one also unsets sharing.domain_port.
sharing.domain_port The loopback port for sharing.domains, 1480 by default, minimum 1024. Requires sharing.domains.
sharing.lan true shares every run at .local names, like --lan.
sharing.lan_ip The LAN address when LAN sharing is on, like --lan-ip. It does not turn LAN sharing on.
sharing.tailscale true shares every run through tailscale serve, like --tailscale. Never uses Funnel.
telemetry false turns off anonymous usage data, like parcela telemetry disable.
updates false turns off release checks, like PARCELA_NO_UPDATE=1.
worktrees.directory Where create puts new checkouts, as <directory>/<repository>-<NAME>. An absolute path or one under ~/.
ports.backend The backend port range, like 30000-30999, from 1024 up. Default 20000-29999.
proxy.port The proxy's HTTPS port, 1443 by default. Setting or unsetting it moves a running proxy; restart environments to update their URLs. Remove the relay first if it is installed.
proxy.caddy The Caddy binary: a name on PATH, an absolute path, or a path under ~/. Default caddy.
trust false stops up from offering to trust the CA, for example on a headless machine. parcela trust still works.
badge false stops the proxy adding the debug menu to .localhost, domain and LAN pages. Default true. A running proxy picks it up on its own.
env.command A shell command that prints a JSON object of variables for every service, hook and task, such as mise env --json or direnv export json. Unset by default. See below.

sharing applies to up, restart and the dashboard's actions, in projects with an HTTP service. Flags and PARCELA_LAN, PARCELA_TAILSCALE, PARCELA_DOMAIN and PARCELA_DOMAIN_PORT add to it or override it. --no-share turns all of it off for one run. Share with another device covers each kind.

The file is $XDG_CONFIG_HOME/parcela/config.yaml, or ~/.config/parcela/config.yaml. PARCELA_CONFIG names another file. It is YAML, and set rewrites it without comments:

sharing:
  domains: ["tower.example.com", "tower.example.org"]
  tailscale: true
telemetry: false
worktrees:
  directory: "~/worktrees"

Tool versions

A process inherits the environment of whatever started its environment: your shell for up, the proxy for the dashboard's Start and Restart, and the login service for autostart. That PATH was fixed when the proxy or service started, so it can name a Ruby, Node or Python the checkout has since moved off. Set env.command to ask your version manager from the checkout instead:

parcela config set env.command 'mise env --json'

Parcela runs it with /bin/sh in the checkout, with the inherited environment, each time an environment starts, a task runs or a takeover owner rebuilds its processes. It has 30 seconds. Its JSON object of strings is added to what processes inherit, so a PATH it prints replaces the inherited one; a null value keeps the inherited variable. Parcela's own variables and env in parcela.yaml win over it. When it fails or prints anything else, the start or task fails with its output. A checkout that no longer exists, as for hooks.teardown after its directory is gone, skips it. Running environments keep their variables until they restart.

telemetry

parcela telemetry [status | enable | disable]

Shows or changes the saved telemetry preference. Without a subcommand, shows status. Environment overrides and event fields are in Telemetry.

skill

parcela skill
parcela --skill

Prints the bundled agent instructions as Markdown without reading project or state. Worktrees and agents covers installation.

completion

parcela completion bash|zsh|fish|elvish|powershell

Prints a completion script for commands and flags. Load it from your shell's startup file:

source <(parcela completion zsh)          # ~/.zshrc
source <(parcela completion bash)         # ~/.bashrc
parcela completion fish | source          # ~/.config/fish/config.fish