Skip to content

Shortcuts: is, pick, filter, rank

Each shortcut is ask with one question already shaped. The same saved questions, context, settings and exit codes apply.

The four shapes
jevx is "Is this urgent?" < email.txt # an if: yes 0.92, exit 0 / 1 / 3 / 4
jevx pick "Which team?" web=frontend api=backend billing=money --in "charged twice" # a switch
jevx filter "Is this an error?" < app.log # a grep by meaning (-v: the lines that are not)
jevx rank "Is this about refunds?" --top 5 < results.txt # a sort: every line with P(yes), best first

is and pick print VERDICT P on one line. filter and rank read one input per line from stdin unless you pass --in, --lines or --states.

Terminal window
$ echo "Prod is down" | jevx is "Is this urgent?"; echo "exit $?"
yes 0.92
exit 0
$ echo "Weekly newsletter: our new office plants" | jevx is "Is this urgent?"; echo "exit $?"
no 0.05
exit 1

Use it straight in shell logic. Exit 1 is a real no; an unreachable endpoint is 4, never 1:

triage.sh
if jevx is "Is this urgent?" < "$msg"; then
notify-oncall "$msg"
fi

A saved yes/no question works as the question: jevx is urgent < email.txt.

pick needs at least two key=description options. The verdict is one key.

Terminal window
$ jevx pick "Which team?" web=frontend api=backend billing=money --in "charged twice"
billing 0.99

Prints the input lines whose verdict is yes. -v inverts it.

app.log
INFO 09:12:01 request served in 12ms
ERROR 09:12:04 payment gateway timeout after 30s
INFO 09:12:05 cache warmed
Terminal window
$ jevx filter "Is this line an error or failure?" < app.log
ERROR 09:12:04 payment gateway timeout after 30s

Prints every line with its P(yes), highest first. --top N keeps the first N.

Terminal
jevx rank "Is this about refunds?" --top 5 < results.txt

Something wrong or unclear on this page?Open an issue on GitHub.