git add

built-in
-38.1% Savings
16 Commands
-16 Tokens saved
3 Tests

Install

tokf install 6c6799a6a51e04eef210a72b0a2f4e66238f9b15a81c3a97b08ee8e71c931ec1
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