sys1grep

grep by meaning

It finds lines by what they mean, not by regular expressions — in any language, with AND / OR / NOT. Every line is judged by TypeSafe Jev, which answers “does this line match?” with a calibrated probability.

▶ Watch the demo GitHub npm Design notes (日本語)
npx @uehaj/sys1grep -n -e "customer is angry or frustrated" tickets.txt
sys1grep

Outputs are real runs, copied from the README. Scenes marked ★ new are new in 0.4.0.

Why it is different

🌐 Language-agnostic

A Japanese meaning finds French, Russian, Chinese and Korean lines. No translation step, same speed, same cost.

⚖️ Propositions, not topics

Jev reads the line and the question together, so negation and “asked for” vs “already done” change the answer. Embeddings can only measure closeness.

🧮 Real booleans

Each meaning yields an independent probability, so AND / OR / NOT are plain boolean operations. One threshold (0.5) works across queries.

📦 Zero dependencies

One file, Node.js 20.16+ and fetch. 30 lines per request, 8 requests in parallel. No index to build.

✂️ Lines, sentences, records new

--unit=sentence-by-jev finds sentences across line breaks and, with --color, colors just the matching sentence inside a line; -z judges NUL-terminated records like git log -z.

🎯 Find the answer new

-Q / --question finds lines that answer X, where -e X finds lines that say X. -q stops at the first match, like grep -q.

🔣 Regex terms new

-e '/ERROR|FATAL/' runs locally for free, prefilters what Jev sees, and hands captures to meanings as $<name>: -a '$<time> is at night' asks each line about its own time.

🗜️ One request per template new

--dedup folds machine logs by skeleton: a 43,071-line system log becomes 550 templates, 1.2% of the bytes.

💸 Send only what matters new

Narrow before you pay: --include / --exclude, --changed-within=7d, .gitignore, binary and secret skips, regex terms, --dedup. --dry-run / -i show the totals first.

🌿 git sys1grep new

git sys1grep searches tracked files like git grep. SYS1GREP_OPTS sets default options; --sys1-url / --sys1-model override the endpoint per run.

🔑 Any endpoint

TypeSafe by default; OpenRouter, Vercel AI Gateway or any server that speaks POST /v1/systemone via SYS1GREP_URL.

🤖 Claude Code skill

Describe what you want in plain words; the skill builds the expression, runs it and reports file:line hits.

Get started

# install (or just use npx)
npm install -g @uehaj/sys1grep

# API key from https://console.typesafe.ai/
export SYS1GREP_API_KEY=your-key

# search the files git tracks, like git grep
git sys1grep -l -e "customer is asking for a refund"

# other endpoints: set the URL and its key together
export SYS1GREP_URL=https://openrouter.ai/api/v1/systemone SYS1GREP_API_KEY=sk-or-...

# meanings combine: (A and B) or C, and NOT with -v
sys1grep -n -e "network or remote connection failure" -v "a retry is happening" app.log
# as a Claude Code skill
claude plugin marketplace add uehaj/uehaj-marketplace
claude plugin install uehaj@uehaj-marketplace
# then, inside Claude Code
/uehaj:sys1grep customer is asking for a refund tickets/*.txt

Every line searched is sent to the TypeSafe API (or the endpoint in SYS1GREP_URL).