Skip to content

Add a grut status command #314

Description

@jongio

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestideaFeature idea from the idea pipeline

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions