Skip to content

Every day

Terminal window
talea sync # clone the new, fast-forward the rest
talea status # branch, clean/dirty, ahead/behind, in one table
dest=$(talea where eklavya) && cd -- "$dest"

talea sync

Clones what is missing, fast-forwards what is there. Safe to run unattended, and safe to run twice.

Progress is drawn as the workspace’s folder tree, the one talea tree prints. In a pipe or a CI log each line of it is printed once, as soon as every repo above it has finished:

alice/
└─ ▣ svc main up to date
work/
├─ backend/
│ └─ ▣ api main up to date
├─ ▣ Docs main up to date
└─ frontend/
└─ ▣ web main up to date

What it will not do, and this is the whole of it:

  • It will not merge a divergence. Fast-forwards only. Anything else is reported for you to deal with.
  • It will not move you off your branch. It fast-forwards the branch you are on, or leaves it alone and says why. A branch with no upstream is fetched and left.
  • It will not touch a dirty repo. Uncommitted changes mean it fetches and stops, with a line saying so.
  • It will not push.
  • It will not clone beside a checkout git refuses to open. That checkout is named with git’s reason and its fix, the repo sharing its folder name is held back, and the run exits non-zero. A linked worktree whose repo no longer knows it is named with its fix as a warning, and fails nothing; one sitting where a repo belongs is not fetched, and that repo is counted skipped.

Every command runs from anywhere. Inside a workspace, that workspace. Outside one, the workspace talea init made — and if this machine has several, it asks which. With no terminal to ask on (a script, a pipe) it lists them and exits non-zero rather than picking one for you.

Terminal window
talea sync -g nonstopio # one group
talea sync eklavya # one repo — same as -r eklavya
talea sync --no-clone # fast-forward only, clone nothing
talea sync --no-adopt # skip the existing-checkout scan

When some of your worktrees are merged or unused, sync ends with one amber line: how many, and how much space talea prune --apply would free. It is a hint, not a verdict — it changes neither the exit code nor ALL CLEAR — and it removes nothing; prune is still where you see the plan and decide.

talea clone is the first half on its own — clone what is missing and never fetch or merge. It is what you want on a slow connection.

talea status

ColumnWhat it shows
REPOrepository name
BRANCHthe branch checked out right now
DEFAULTthe repo’s default branch, blank when you are already on it
STATEclean or dirty, and commits ahead or behind origin
Terminal window
talea status --drift # only repos on some other branch
talea status --missing # only repos not cloned yet
talea status --all # the whole catalogue, not just this machine

talea prune

Worktrees pile up. Each one carries its own node_modules, build or .dart_tool, so thirty forgotten ones can hold gigabytes long after their branches were merged. talea prune finds them — in every repo this machine keeps, including worktrees that live outside the workspace — and gives each exactly one verdict:

VerdictMeansWith --apply
mergedevery change is on origin/<default branch> — the commits, identical ones (a rebase merge) or one squashed commit; a merge commit only if it is the merge git would make by itselfremoved
missingthe folder is already gonethe record is cleared
dirtymodified or untracked fileskept
ignoredmerged, but holds ignored files that are not build output, like a .envkept, unless --with-ignored
nestedmerged, but a repo inside its folder holds work of its own — a linked worktree, uncommitted changes, a stash, or a commit no remote haskept
unreadabletalea could not read all of it — a folder it may not open, a git call that failedkept
unuseda branch with no commits of its own, cut more than a day agoremoved
freshthe same, cut within the last day — a task just startedkept
lockedgit worktree lockedkept
unmergedanything elsekept
Terminal window
talea prune # the plan, with sizes; changes nothing
talea prune --apply # do it

fresh and unused show the branch’s age beside the verdict (fresh · 7h). A lock is kept unless Claude Code left it: it locks each agent’s worktree with claude agent <id> (pid N start <time>), and once that process has exited the worktree is judged as if unlocked, marked · stale lock, and --apply unlocks it before removing it. Any other lock is never touched. The dim line under a locked row shows its reason.

The removal is git worktree remove, never forced, so git itself refuses a tree with uncommitted work. The branch is kept — only the folder goes, and git worktree add brings it back. git deletes ignored files without asking, so a worktree holding ones that are not build output is kept as ignored and the plan names them. Move them out, or add --with-ignored. A file byte-identical to the main checkout’s copy at the same path does not count — it survives the removal — and a folder of ignored files is judged file by file, so a .claude/ holding only a seeded settings file keeps nothing.

Build output does not count either. talea ships a list of it — node_modules, build, .dart_tool, Flutter’s ephemeral/ and Generated.xcconfig, *.iml, .idea/ and more — in src/regenerable.gitattributes, written in git’s own attributes syntax and matched by git itself. A new ecosystem is a new line there, not new code. A pattern for every repo on your machine goes in git’s global attributes file (git config --global core.attributesFile), and a repo takes one of talea’s back with -talea-regenerable.

A repo inside a worktree is judged by what it holds, not where it sits. flutter build ios leaves clean SwiftPM clones under build/, and those do not keep a merged worktree. A linked worktree, uncommitted changes, a stash or a commit no remote has does, and the verdict says which (nested · 1 dirty), with the repo named underneath. A clean one’s own ignored files are judged like the worktree’s, wherever it sits: a .env in a clone under build/ keeps the worktree, even though build/ itself is build output.

Nothing talea cannot read counts as safe. A folder the walk may not open, or a git call that fails, keeps the worktree as unreadable, and the plan names where. With --apply, each worktree is judged again just before it goes, so an ignored file written or a nested repo changed since the plan keeps it too — and with --with-ignored, only the ignored files the plan named may go with it. A file that appears in that window is named, and the worktree waits for the next run.

A file a build copies out of tracked source — a generated page in public/, say — sits under no build folder, and the main checkout’s copy is only as fresh as its last build. Mark it in the repo’s .gitattributes and it stops counting:

web/public/runtime.html talea-regenerable
generated/** talea-regenerable

The mark is read from origin’s default branch as well as the worktree’s own, so adding it today covers worktrees branched before it. A mark only this machine should keep goes in .git/info/attributes instead. Mark only what a build really writes: a marked file is deleted with the folder, and a broad pattern like ** switches the guard off for that repo.

Each row names the worktree by its folder; the full path sits dimmed on the line below it, ready to copy.

A merge commit on the branch counts as merged only when its result is the merge git would make from its two parents by itself. One that adds a change of its own — a hand-resolved conflict, a file added mid-merge — is work origin may not have, and reads as unmerged. Checking a merge needs git 2.38 or newer; on an older git every merge commit reads as unmerged.

A squash merge reads as merged: the squashed commit is a new change, not the ones on the branch, but merging the branch into origin’s default branch would add nothing, and git can tell that itself (git merge-tree, git 2.38 or newer). A branch with a change the default branch lacks, or one that would conflict, stays unmerged; on an older git a squash merge does too, and you remove that worktree yourself. If the default branch has since edited the same lines, git cannot tell, so for a clean worktree git calls unmerged talea asks GitHub (the repo name and the commit’s sha go to api.github.com): it is merged only when a pull request into the default branch was merged with that commit, or a commit that contains it (checked locally with git), as its head, which proves nothing was added afterwards. A head git does not have locally counts as unknown. If GitHub cannot be asked — no token, a rate limit, a remote that is not GitHub — it stays unmerged and one line on stderr says why. A yes is remembered in ~/.talea/state.json; a no never is. A repo with no default branch recorded is skipped — run talea discover.

talea where

Terminal window
talea where eklavya # the absolute path, one line, nothing else
dest=$(talea where eklavya) && cd -- "$dest" # what it is actually for
talea where # the workspace root
talea where ek # a search: the one cloned repo with "ek" in its name, or a list to pick from

The path goes to stdout on its own, so it composes with cd, code, open and anything else that takes a directory. Every diagnostic goes to stderr, and an unknown name exits non-zero with nothing on stdout. A plain cd $(talea where typo) still runs cd with nothing after a failed lookup, which most shells read as “go home” — the failure of a $( ) does not stop the command around it. Check it with &&, and quote the path so a folder with a space in it survives.

A word that is not a repo’s name is a search over the repos cloned on this machine, by repo name or by the folder a repo’s dir gives it. One match prints its path. Several open a list — arrow keys to move, Enter to go, q to cancel — drawn on stderr, so it works inside $( ). With no terminal to pick on, several matches are listed on stderr and the command exits non-zero rather than choosing. A match that is in the catalogue but not cloned is named, never offered.

To go there in one step, add one line to your shell’s startup file:

Terminal window
eval "$(talea shell-init)" # ~/.zshrc or ~/.bashrc
talea shell-init fish | source # ~/.config/fish/config.fish

Then talea cd ek and tcd ek move your shell, and tcd alone goes to the workspace root. No program can change the folder of the shell that started it, so shell-init prints a small function that runs talea where and does the cd itself; every other talea command passes straight through. Without it, talea cd prints the path and says how to set it up. PowerShell is not covered yet; on Windows, use the talea where line above.

Terminal window
$dest = talea where eklavya; if ($?) { Set-Location -LiteralPath $dest }

If two owners have a repo of the same name it lists both to pick from at a terminal, and with no terminal says so and exits non-zero rather than picking one. Pass owner/name. The same is true of -r and a bare repo name after sync, clone, status, list, tree and prune: talea sync app stops when two owners have an app, and talea sync alice/app syncs the one.

Changing what this machine keeps

Terminal window
talea add some-repo # keep one more here, and clone it now
talea rm some-repo # take it off the list
talea select # reopen the whole checklist
talea pick some-repo # keep that one — an unknown name opens the checklist

talea rm removes the repo from this machine’s list and leaves the checkout exactly where it is, printing the path. Deleting it is your call — rm -rf already exists for when you mean it.

talea select opens the checklist with your current selection ticked. Everything in the catalogue is listed, including archived repos and forks: this machine is allowed to keep something the default set does not have. --no-clone saves the list without filling it.

talea pick <name> is talea add when the name matches exactly one repo — case does not matter, and owner/name works. When it matches none, or two owners share it, the checklist opens instead, so a typo lands you in the list rather than on an error.

Running one command everywhere

Terminal window
talea exec -- git log --oneline -1
talea exec -g nonstopio --shell -- 'npm install'
talea exec --all -- git branch --show-current
talea exec -- git commit -m "two words" # each argument arrives as typed
talea exec --shell -- 'yarn build && yarn test' # a pipeline: the system shell reads it

Everything after -- is the command, run once per repo with that repo as the working directory. Each argument arrives exactly as your shell handed it over — a space, an empty string, a quote, a $ or a ; included — because no second shell reads it. Repos are processed one at a time so the output stays readable and attributable.

--shell is for when you want a shell: pipes, &&, globs, variables. The words are joined with spaces and handed to the system shell (sh, or cmd.exe on Windows), which splits and interprets them again with its own quoting rules — so quote the whole line once, as above, to get it past your own shell untouched. On Windows, npm, yarn and other .cmd scripts only start through cmd.exe, so they need --shell; without it the run says so rather than quietly re-splitting your arguments.

Exit codes

Every bulk command exits non-zero if any repo failed. Per-repo errors are printed and the run keeps going, so without checking the exit code a partial failure reads as success to a script. A skip is not a failure — a sync over a workspace you are working in still exits 0.


Next: Adopting what you have.