Skip to content

Run a worktree

This is the everyday loop for a single worktree: bring it up, watch it, and stop it.

From inside the worktree:

Terminal window
wos up

wos up is a non-interactive launcher. The CLI submits the up operation to the local daemon (starting it if needed), streams deployment steps and service logs to stderr (Docker Compose logs in Docker-backed modes), and shows an active-phase spinner. On success it prints a service table with published addresses to stdout and the worktree detail-page URL in the web UI, then exits. Services keep running until an explicit wos down.

If the daemon was built without the web UI, or web.port is not bound, the CLI still prints the service table and reports that the web UI URL is unavailable.

Terminal window
wos up --force

--force re-runs first-run setup: it restores caches, re-runs app.init_script, and (in secondary worktrees) removes and re-copies clone_volumes destinations before copying again. See the deployment lifecycle.

Terminal window
wos status

shows the managed services, their status, published host ports, and app-port healthcheck results for the current worktree — without re-deploying. If the worktree has no session yet, it reports that no deployment has been initialized; run wos up first.

Terminal window
wos wait --timeout 3m

wos wait blocks until the current worktree deployment reports ready, or until the timeout elapses (default 1m). Durations accept a raw number of milliseconds or ms / s / m suffixes. This is the deterministic readiness gate to use after detached startup or in scripts.

Every worktree-scoped command accepts the global --cwd <path> option, which must appear before the subcommand:

Terminal window
wos --cwd /var/www/feature-login status
wos --cwd /var/www/feature-login up app,api
wos --cwd /var/www/feature-login down

Prefer --cwd over cd in scripts: it keeps your working directory stable and produces clearer command logs.

Terminal window
wos down

stops the WorktreeOS services for the current worktree — removing the containers in Docker-backed modes, or terminating the host processes in shell mode. It keeps the worktree’s session state, generated Compose file, and the worktree itself — contrast this with removing a worktree.