Skip to content
System One

uehaj/jev-semgrep

A grep that matches lines by meaning instead of regular expressions: Jev scores each line against a plain-language description and the tool applies a threshold, combining meanings with AND, OR and NOT.

uehaj/jev-semgrep on GitHub

Stars
134
Forks
8
Language
JavaScript
Last push
24 Sep 2026

Read from GitHub on . Counts change daily.

Reported by the author

Batch speed
<1s/210 linesA 210-line file finishes in under a second.github.com

jev-semgrep is a grep that matches lines by meaning instead of regular expressions. For every line, it asks Jev a noul (yes/no) question, does this line match the meaning “network failure”, gets back a probability, and applies a threshold; meanings combine with AND, OR and NOT to build more specific queries.

Because Jev compares concepts rather than words, the meaning and the text being searched don’t need to share a language. The author demonstrates an English meaning matching Japanese lines, a Japanese meaning matching English lines, and a single Japanese meaning finding refund requests written in French, Russian, German, Spanish, Chinese and Korean, with no translation step. One caveat from the README: TypeSafe documents English as the most accurate language for Jev, and the author found Japanese meanings wobble more near the threshold, so phrasing a borderline query in English is safer.

The tool has zero dependencies beyond Node.js 20.12+ and fetch, batches 30 lines per request, and runs 8 requests at a time; the author reports a 210-line file finishes in under a second.

How it uses Jev

Environment (read from the environment, else from ./.env, else from ~/.config/semgrep/.env):
  SEMGREP_API_KEY    API key. Falls back to TYPESAFE_API_KEY. Get one at https://console.typesafe.ai/
  SEMGREP_URL        endpoint (default https://api.typesafe.ai/v1/systemone). Any TypeSafe-compatible
                     /v1/systemone works, e.g. https://openrouter.ai/api/v1/systemone
  SEMGREP_MODEL      model id (default jev-latest)
  SEMGREP_OPTS       default options, split on spaces and put before the command line, which wins;
                     --no-X turns a boolean flag off (--color takes --color=never). Options only: no
                     meanings, files or --. e.g. SEMGREP_OPTS='--level strict -n'. Scripts: SEMGREP_OPTS= semgrep
  The key goes to SEMGREP_URL, whatever it is. With SEMGREP_URL set and no key, no auth header is sent.
  e.g.  mkdir -p ~/.config/semgrep && echo 'SEMGREP_API_KEY=your-key' > ~/.config/semgrep/.env`;
const HELP_JA = `usage: semgrep [OPTION]... -e MEANING [-a MEANING] [-v MEANING]... [FILE...]
jev (TypeSafe System One) で意味的にマッチする行を探す grep。FILE 省略時は stdin。

  -e MEANING   この意味に合う行 (複数指定は OR)
  -a MEANING   直前の -e 項に AND で連結。-e A -a B -e C は (A and B) or C

View in semgrep.mjs

Open on GitHub

PrimitivesNoul

More like this

Use cases this is tagged with