git add

built-in
-0.4% Savings
127 Commands
-1 Tokens saved
3 Tests

Install

tokf install c5ec98282e21e65f649627275663e4ad8d2ae517dfff88b279ecb224c060c7dc
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