For the complete documentation index, see llms.txt. A markdown version of this page is at /reference/resources/worktreeset/index.md.

WorktreeSet

A WorktreeSet is a directory on one workstation that holds a git worktree of each of up to eight sources, all on one branch.

A WorktreeSet is a directory on one workstation that holds a git worktree of each of one to eight of the workstation’s sources, all on one branch. Terminal sessions and agent sessions name a set and start in its first tree. This page lists the fields of the kind. Worktree sets explains where the trees live and how to use a set.

The kind is in the workstations.ringleader.dev/v1 API group. A set belongs to the person who creates it. A member manages their own sets, and an administrator of the namespace manages all of the namespace’s sets. A set has no share command.

Minimal example

apiVersion: workstations.ringleader.dev/v1
kind: WorktreeSet
metadata:
  name: tls-floor
  namespace: acme-dev
spec:
  workstationRef: {name: my-box}
  path: sessions/ringleader/tls-floor
  branch: fix/tls-floor
  sources: [ringleader, infra]

Apply a file with rl apply -f, or create a set with rl worktreeset create.

Spec fields

workstationRef, path, branch and sources are required, and deletionPolicy is optional. Only sources and deletionPolicy can change after you create the set.

FieldTypeDescription
workstationRefobject{name}: the workstation that holds the trees. Fixed after create.
pathstringThe directory that holds the trees, absolute or relative to the login user’s home. At most 512 bytes of letters, digits and _ . / @ + -. Write a home path without ~. Each tree is at <path>/<source>. Fixed after create.
branchstringThe branch every tree is on, used exactly as written. At most 256 bytes of letters, digits and _ . / -, and a name that git accepts. Fixed after create.
sources[]stringOne to eight names of the workstation’s sources, which are the sources[].name entries of its configuration. No name repeats, and none contains / or is . or ... The first source is where a session starts, so the order matters.
deletionPolicystringWhether Ringleader deletes the set when sessions stop naming it: DeleteWhenUnused or Retain. With DeleteWhenUnused, Ringleader deletes the set after no session has named it for 10 minutes. With Retain, the set stays until you delete it. A set made with rl worktreeset create has no value, and stays until you delete it too.

Changing a fixed field is rejected with a message that says the field is fixed when a worktree set is created, and tells you to create a new set.

When the desktop app or the web console creates a set for a new session, it gives the set deletionPolicy: DeleteWhenUnused. Ringleader then deletes the set after no session has named it for 10 minutes. To keep the set, change the field to Retain, as Keep a set that the app created shows.

Status fields

The workstation reports these. They are read-only.

FieldTypeDescription
phasestringPending, Ready or Stopped. See Phases.
messagestringA sentence that says what the set waits for, or that it is ready.
worktrees[]objectOne entry for each source, in the order of spec.sources. See Tree fields.

A WorktreeSet reports no conditions list. Read the phase with rl worktreeset get, and the trees with rl worktreeset get <name> -o yaml.

Phases

PhaseMeaning
PendingAt least one tree is not made. status.message says why, such as Waiting for <workstation> to make this set's trees.
ReadyEvery tree is made: Every tree of this set is made on <workstation>.
StoppedThe owner no longer holds the workstation, because a pool lease ended. The reason is LeaseEnded.

A Pending set can say Something on <workstation> is in the way of one of this set's trees, such as its branch being checked out somewhere else. Change the branch or the path, or remove what is in the way.

Tree fields

FieldTypeDescription
sourcestringThe source the tree is a worktree of.
pathstringThe tree’s directory on the workstation.
branchstringThe branch the tree is on.
statestringmade or waiting.
classstringWhy a tree waits, such as refused for a tree that cannot be made as written.

Refusals

Ringleader checks a set when you create or apply it, and rejects it with a message that names the field:

MessageFix
spec.path: is "~/x", which holds a character a source path cannot ...Write a home path without ~.
spec.branch: is "fix.lock", which git cannot use as a branch name ...Choose a name git accepts. A name ending in .lock is not.
spec.sources[1]: repeats the source "a": a set holds one tree of each sourceName each source once.

Each source must also be declared on the workstation, or Ringleader rejects the set. Deleting a set is refused while a terminal session names it, or while an agent session that names it is running. The message names up to five sessions.

Next steps