git add

built-in
0.0% Savings
24 Commands
-24 Tokens saved
3 Tests

Install

tokf install 79b1ce5ea829a921e78ef305cd8906a1749522ee1523473cff50e7f4bf4ab38a
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"

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