Skip to main content

Overview

Proxy for git commands with token-optimized output. Supports all git flags and subcommands with specialized filtering for common operations.

Syntax

Global Options

All git global options are supported and passed through correctly:
string
Run as if git was started in <path> (can be repeated)
string
Override git config for this command
string
Set path to .git directory
string
Set path to working tree
flag
Disable pager output
flag
Skip optional locks
flag
Treat repository as bare

Optimized Subcommands

rtk git status

Compact status with grouped changes.
Output:
Token savings: 70%

rtk git log

One-line commit history with auto-truncation.
Default flags applied:
  • --pretty=format:%h %s (%ar) <%an> (if not specified)
  • -10 (if no limit specified)
  • --no-merges (unless --merges requested)
Output:
Token savings: 60%

rtk git diff

Stat summary + compacted diff.
Output:
Flags:
  • --stat - Show only stat (no diff)
  • --no-compact - Disable RTK compacting
Token savings: 80%

rtk git show

Commit summary + stat + compacted diff.
Output:
Special cases:
  • git show rev:path - Shows blob content (no diff formatting)
  • --stat - Shows only stat
  • --pretty=... - Custom format (no RTK filtering)
Token savings: 80%

rtk git add/commit/push/pull

Ultra-compact confirmations.
Outputs:
Token savings: 59%

rtk git branch

Compact branch list with remote-only section.
Output:
Token savings: 65%

rtk git fetch/stash/worktree

All operations have compact output formats with essential info preserved.

Passthrough Support

Any git subcommand not listed above is passed through unchanged:
Savings: 0% (raw git output, but usage tracked)

Token Savings Summary

Exit Codes

All git exit codes are preserved:
  • 0 - Success
  • 1 - Generic error
  • 128+N - Fatal error
  • rtk gh - GitHub CLI operations
  • rtk diff - Universal diff command
  • rtk log - Log file filtering