Add a grut status subcommand that prints a short working-tree summary to stdout and exits, without launching the TUI. It gives scripts and quick terminal checks a grut-native status view, and with --json it fits the same machine-readable output pattern as the other print commands.
Solution
Gather the current branch, upstream ahead/behind counts, and staged / unstaged / untracked file counts from the existing git client, then print a compact human summary by default or a JSON object with --json.
Acceptance criteria
grut status prints branch, ahead/behind, and staged/unstaged/untracked counts for the repo in the current directory.
grut status --json prints the same data as a single JSON object with stable field names.
- Running outside a git repository exits non-zero with a clear message.
- The command reuses the existing git client rather than shelling out directly.
- Unit tests cover the JSON shape and the not-a-repo path.
Add a
grut statussubcommand that prints a short working-tree summary to stdout and exits, without launching the TUI. It gives scripts and quick terminal checks a grut-native status view, and with--jsonit fits the same machine-readable output pattern as the other print commands.Solution
Gather the current branch, upstream ahead/behind counts, and staged / unstaged / untracked file counts from the existing git client, then print a compact human summary by default or a JSON object with
--json.Acceptance criteria
grut statusprints branch, ahead/behind, and staged/unstaged/untracked counts for the repo in the current directory.grut status --jsonprints the same data as a single JSON object with stable field names.