jevish
Tiny JavaScript semantic matcher that classifies text locally in microseconds and escalates ambiguous cases to Jev.
Overview
jevish is an npm package for semantic pattern matching and zero-shot labelling in JavaScript. You pass a string and either a map of label patterns to handlers, an array of labels, or a single predicate, and it returns the winning label, a boolean, or calls the matching handler. Patterns can carry thresholds, such as only filing a bug when confidence is above 0.8.
The default engine is deliberately simple and dependency-free: tokenisation, stemming, n-grams and synonym clusters, about 8.6 kB. It commits only when the top score and its margin are both high. With the cascade option, uncertain or out-of-vocabulary inputs are escalated to the hosted Jev model. It suits developers who want a cheap first-pass router for tickets, spam or intents in Node, edge workers or the browser, with Jev as the fallback. The README publishes a small benchmark (100 items per task) comparing the local engine, the cascade and Jev.
What the decision model decides
| Type | Question | Answers |
|---|---|---|
| Choice | Which of these labels does the text belong to? (e.g. bug, feature, billing) | bug · feature · billing |
| Yes / no | Is this text an instance of the given label (e.g. spam)? | — |
How it works
- Call jevish(text, labels or handler map)
- Local engine scores labels from token, n-gram and synonym-cluster overlap
- If score and margin clear the thresholds, return the label or run the handler
- With cascade enabled, ambiguous inputs are sent to Jev for a calibrated answer
- Optional fallback handler catches anything unmatched
Strengths
- Local path runs in well under a millisecond with zero dependencies
- Cascade sends only hard cases to the paid API
- Custom synonym clusters add domain vocabulary without retraining
- Runs in Node, Bun, Deno, Workers and browsers
Caveats
- The local engine is lexical, not a neural model, so accuracy depends on vocabulary
- Benchmark sample sizes are small (100 per task)
- Cascade requires network access and a TypeSafe key
Getting started
npm install jevishAt a glance
- Type
- Project
- Status
- beta
- Language
- JavaScript
- Runtime
- Node, Bun, Deno, Cloudflare Workers, browser
- Has code
- yes
- License
- MIT
Use cases and integrations
How curated lists describe it
Every mode auto-curries when called with only the patterns:
logicrw/awesome-jev-projects
Frequently asked questions
Is jevish a model?
No. It is a lexical matcher that mimics Jev's interface for easy cases and can hand hard cases to the real Jev API.
How fast is it?
The README reports under 0.05 ms per call for the local engine; cascaded calls take the network round trip.
Do I need a TypeSafe key?
Only if you enable the cascade to cloud Jev; the local engine makes no network calls.
Related projects
Pre-flight hook for WorkBuddy and Hermes Agent where Jev classifies each prompt on nine dimensions and injects routing cues.
ProjectbetaPythonTransparent proxy that asks Jev to classify each coding-agent prompt and injects the decision into the agent's context before it generates.
ProxybetaPythonOpenClaw plugin where Jev decides whether a group-chat bot should reply and, optionally, which model tier should answer.
PluginbetaTypeScriptDeepSeek Harness plugin registering a jev_decide tool so the agent can ask Noul, Choice or Score questions and gate on probabilities.
PluginbetaTypeScriptDeepSeek Harness Web GUI plugin giving the agent a jev_ask tool, usage tracking and an optional command guard with explicit caveats.
PluginbetaTypeScriptBrowser tool that finds bounded decisions in LLM prompts and proposes Jev Choice, Score and Noul questions with SDK code.
ProjectbetaJavaScript