Skip to content

list

Copy page

Lists git worktrees with their agent status, multiplexer window status, and merge status. Alias: ls

Terminal window
workrex list [options] [worktree-or-branch...]
ArgumentDescription
worktree-or-branchFilter by worktree handle (directory name) or branch name. Multiple values supported. Optional.
FlagDescription
--allInclude worktrees from every repository represented by a tracked agent in the current multiplexer instance. Repositories without tracked agents cannot be discovered.
--prShow GitHub PR status for each worktree. Requires the gh CLI to be installed and authenticated. Note that it shows pull requests’ statuses with Nerd Font icons, which requires Nerd Font compatible font installed.
--jsonOutput as JSON. Produces a JSON array with project, project_path, handle, branch, path, is_main, mode, has_uncommitted_changes, is_open, agent_statuses, and created_at.
Terminal window
# List all worktrees
workrex list
# List with PR status
workrex list --pr
# Output tracked projects as one JSON response
workrex list --all --json
# Filter to a specific worktree
workrex list my-feature
# Filter to multiple worktrees
workrex list feature-auth feature-api

Workspaces on remote servers are listed alongside local worktrees. Their path names the remote instead of a local directory, with a note while a workspace is still being set up, has a merge or cleanup in progress, or its remote can’t be reached. AGENT and UNMERGED come from the remote’s last known state, and AGENT says when the agent’s session ended, for example exited (host rebooted). In JSON output, they carry a remote field with the remote’s name, path is the worktree’s path on the remote, and agent_statuses and has_uncommitted_changes describe the remote worktree. Local worktrees have no remote field.

Remote is_open comes from a bounded read of the recorded Rex server, session, and terminal blocks. It is true while a configured block lives and false when those targets have closed. If the native target cannot be read, is_open is null and MUX shows ?. Agent status and connection notes still come from the node’s last observation.

BRANCH AGE AGENT MUX UNMERGED PATH
main - - - - ~/project
user-auth 2h 🤖 ✓ - ~/project__worktrees/user-auth
bug-fix 3d ✅ ✓ ● ~/project__worktrees/bug-fix
api-work 1w - ✓ - ~/project__worktrees/api-work
  • AGE column shows how old the worktree is, based on directory creation time. Uses compact units: m, h, d, w, mo, y. Shows - for the main worktree or when creation time is unavailable.
  • AGENT column shows the current agent status using status icons:
    • 🤖 = agent is working
    • 💬 = agent is waiting for user input
    • ✅ = agent finished
    • When multiple agents run in one worktree, shows a count (e.g., 2🤖 1✅)
    • When stdout is piped (e.g., by a script or agent), text labels are used instead: working, waiting, done
  • ✓ in MUX column = multiplexer window exists for this worktree
  • ? in MUX column = the remote’s native Rex target could not be checked
  • ● in UNMERGED column = branch has commits not merged into main
  • - = not applicable