Skip to content

Simplify the command set, and add 'gra each' - #31

Merged
martinus merged 5 commits into
mainfrom
claude/simplify-gra-commands-dsluww
Sep 1, 2026
Merged

martinus merged 5 commits into
mainfrom
claude/simplify-gra-commands-dsluww

Conversation

@martinus

@martinus martinus commented Sep 1, 2026

Copy link
Copy Markdown
Owner

gra has grown; this trims the commands that saw no use and replaces them with one general tool.

Removed

  • gra fetchgra ls --fetch already refreshes every repository; the fetch machinery stays for it and for gra done. The fork-clone hint now points at gra ls --fetch.
  • gra switch — a worktree that should hold other work is what gra work and plain git switch are for. With it gone, the branch picker always offers the detached entry and the checked-out guard lost its exemption parameter.
  • The fzf picker of gra cd — NAME is now required; gra ls shows the names and Tab completes them. The worktree row type and its picker plumbing collapse into a filesystem probe. fzf stays for the branch picker of gra work.

Added

  • gra each <command> runs a command once in every repository, in its .bare directory, one at a time with output streaming to the terminal: gra each git fetch --all --tags. Failures do not stop the rest; they are listed at the end and gra exits non-zero.
  • gra each --wt <command> runs in every worktree instead, labelled <repo>/<worktree>: gra each --wt git merge --ff-only.

Version goes 6.0.0 → 8.2.0 (two breaking steps, then two features). Net −218 lines. README and Bash completion follow the commands; 131 tests pass on the suite.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Nrfsj2RiFkXaetPthLZFZz


Generated by Claude Code

Neither command earned its keep. 'gra ls --fetch' already refreshes
every repository, so 'gra fetch' was that minus the listing; and a
worktree that should hold other work is what 'gra work' and plain
'git switch' are for.

With 'gra switch' gone, the branch picker always offers the detached
entry and the checked-out guard has no worktree to exempt, so both
lose a parameter. The fetch machinery stays for 'gra ls --fetch' and
'gra done'.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Nrfsj2RiFkXaetPthLZFZz
'gra ls' shows the names and Tab completes them, so the picker was a
second way to do what the shell already does. NAME is now required,
and 'gra cd' just resolves it to the worktree's path.

The worktree row type and its picker plumbing existed only for that
listing, so resolving a name collapses to a filesystem probe that
returns the path. fzf stays for the branch picker of 'gra work'.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Nrfsj2RiFkXaetPthLZFZz
'gra each git fetch --all --tags' runs that once per repository, in
its bare checkout, so Git commands act on the repository itself.
Repositories run one at a time with the command's output streaming
to the terminal; failures do not stop the rest and are listed at the
end, with a non-zero exit.

Tab completes 'each' and the command name after it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Nrfsj2RiFkXaetPthLZFZz
'gra each --wt git merge --ff-only' runs the command once per
worktree instead of once per repository, labelled <repo>/<worktree>
the way tmux windows are. Repositories without any worktree say so
instead of silently doing nothing.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Nrfsj2RiFkXaetPthLZFZz
The release notes are the annotated tag's message, so cutting a
release is one tag push and nothing to click.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Nrfsj2RiFkXaetPthLZFZz
@martinus
martinus merged commit 2fc4bda into main Sep 1, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants