git add

built-in
57.0% Savings
495 Commands
1.2K Tokens saved
3 Tests

Install

tokf install 02defb7ba94f778bf9527035ca3718924bfedc459a879bedca28fa6a0b5b403e
Safety checks passed

Filter definition

# git-add.toml — Minimal filter
# Raw: nothing on success, error messages on failure
# Filtered: "ok ✓" or error

command = "git add"
description = "Strip noise; confirm ok or show errors"

match_output = [
  { contains = "fatal:", output = "✗ {line_containing}" },
]

[on_success]
output = "ok ✓"

[on_failure]
tail = 5

Examples

non-fatal failure passes through via tail ~10 tokens → ~10 tokens
Raw output
error: something
went wrong
details here
Filtered output
error: something
went wrong
details here
fatal pathspec error shows friendly message ~14 tokens → ~15 tokens
Raw output
fatal: pathspec 'nonexistent.txt' did not match any files
Filtered output
✗ fatal: pathspec 'nonexistent.txt' did not match any files
successful add shows ok ~0 tokens → ~1 tokens
Raw output
 
Filtered output
ok ✓
Warning: Community filters are third-party code. Review the filter definition above before installing it in production environments.
Browse all filters