Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,7 @@ The [independent model research](community/projects/tools/README.md#independent-
- [jevnav](https://github.com/dtduc-git/jevnav) - Browser automation with TypeSafe Jev element choice, JSONL decision traces, risk gates, and offline CI replay (distinct from Ultrafast). [Project guide](community/projects/tools/jevnav.md).
- [JevPilot](https://github.com/standardagents/jevpilot) - Demonstrates Jev maneuver selection in a browser driving simulation with local collision checks; application licensing is unspecified. [Project guide](community/projects/tools/jevpilot.md).
- [JevPokerBench](https://github.com/Prophetlab/JevPokerBench) - Texas Hold'em benchmark/playground with official TypeSafe Jev, cash/SNG boards, and BYOK agents. [Project guide](community/projects/tools/jev-poker-bench.md).
- [jevsearch](https://github.com/kylemclaren/jevsearch) - shadcn/ui registry block for ⌘K site search that shows keyword hits immediately, then re-ranks the top candidates with one TypeSafe Jev request; no embeddings or vector database. [Project guide](community/projects/tools/jevsearch.md).
- [JevSQL](https://github.com/EugeneBoondock/jevsql) - Adds TypeSafe Jev natural-language predicates and decision tables to SQLite SQL with batching, caching, and review queues; distinct from pg-jev. [Project guide](community/projects/tools/jevsql.md).
- [jgrep](https://github.com/keltokhy/jgrep) - Filters text, structured records, functions, and diff hunks against plain-English descriptions using Jev Noul judgments. [Project guide](community/projects/tools/jgrep.md).
- [jgrep (npm: jevgrep)](https://github.com/kyu1204/jgrep) - Node CLI that gates a diff in CI on a rule written in English (`--diff`, grep exit codes) and lists the test files a diff can affect (`--tests`), one TypeSafe Jev Noul per code chunk, diff hunk, or CSV row; distinct from the Python jgrep. [Project guide](community/projects/tools/jgrep-jevgrep.md).
Expand Down
1 change: 1 addition & 0 deletions community/projects/tools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@ These projects study related typed-decision patterns using other models. They ar
| [jev-reranker (hotchpotch)](hotchpotch-jev-reranker.md) | Score/filter RAG candidates with TypeSafe Jev in Python (listwise/pointwise/pairwise; PyPI). Distinct from the Rust CLI. | Python · library (`jev-reranker` 0.1.2) |
| [jev-semgrep](jev-semgrep.md) | Filter lines by whether a plain-language proposition holds, with AND/OR/NOT meanings via TypeSafe Jev (not Semgrep Inc). | Node.js · CLI (`@uehaj/semgrep`) |
| [Jev Second Brain](jev-second-brain.md) | Index a Markdown/Obsidian vault and optionally judge note relationships with TypeSafe Jev (Gateway). | Python · CLI (`secondbrain`) |
| [jevsearch](jevsearch.md) | Add a ⌘K site-search palette to a shadcn/ui site: keyword hits on the first keystroke, then one TypeSafe Jev request re-ranks the top 20 by intent, with no embeddings. | TypeScript · shadcn registry block (React component, Fetch-API handler; MIT) |
| [JevSQL](jevsql.md) | Add TypeSafe Jev match/pick/rank/bool/choice helpers to SQLite SQL with batching, caches, and review queues. | TypeScript · library and CLI |
| [jgrep](jgrep.md) | Filters text, structured records, functions, and diff hunks against plain-English descriptions using Jev Noul judgments. | Python · library and CLI (`jev-grep`) |
| [jgrep (npm: jevgrep)](jgrep-jevgrep.md) | Gate a diff in CI on an English rule (`--diff`, grep exit codes), list the test files a diff can affect (`--tests`), or grep code and CSV rows by description with one TypeSafe Jev Noul per chunk. Distinct from the Python jgrep. | TypeScript · npm CLI (`jevgrep` 0.4.0, Node ≥ 18) |
Expand Down
51 changes: 51 additions & 0 deletions community/projects/tools/jevsearch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# jevsearch

[All projects](../README.md) · [Search and retrieval](README.md#search-and-retrieval)

shadcn/ui registry block that adds a ⌘K site-search palette: a local keyword pass answers on the first keystroke, then TypeSafe Jev re-ranks the top hits by what the visitor meant.

| At a glance | Details |
| --- | --- |
| Source | [Source](https://github.com/kylemclaren/jevsearch) |
| Maintainer | [kylemclaren](https://github.com/kylemclaren). Self-submission by the maintainer. |
| Format | shadcn registry block (`jev-search`: React component, hook, lexical index, Fetch-API server handler, and a Next.js API route) plus an optional Markdown/MDX indexer block (`jev-search-indexer`). The repository also holds the Astro demo site and a benchmark. |
| Requirements | A React/Tailwind project set up for shadcn/ui, and `TYPESAFE_API_KEY` on the server for Jev ranking. The handler uses only the Fetch API, so it can be wired into Next.js, Astro, Remix, Hono, Bun, Deno, or Workers; the bundled route targets Next.js. |
| License | [MIT](https://github.com/kylemclaren/jevsearch/blob/1df37decb960b3c4826c71b41d3393c15a8f28d3/LICENSE). |
| Disclosure | Submitted by the author with AI assistance (Claude Code). Listing is not an endorsement. |

## When to use

Use it for docs or marketing-site search where visitors type questions rather than exact page words, and you want keyword results immediately with a Jev re-rank shortly after. It needs no embeddings, vector database, or re-indexing job; the index is a JSON array of documents. It does not retrieve beyond its keyword candidates, so a page that never reaches the candidate pool cannot be ranked first. Prefer [jev-reranker](jev-reranker.md) or [jev-reranker (hotchpotch)](hotchpotch-jev-reranker.md) to rerank candidates from an existing search backend, and [Jev Search](../apps/jev-search.md) (distinct from this project) for web search.

## How it works

`GET /api/jev-search?q=…` first runs a weighted lexical scorer with prefixes, a light stemmer, and one-edit typo tolerance ([`src/lib/jev-search-core.ts`](https://github.com/kylemclaren/jevsearch/blob/1df37decb960b3c4826c71b41d3393c15a8f28d3/src/lib/jev-search-core.ts)) and streams those hits as NDJSON. The top 20 hits then go to TypeSafe in one request ([`src/lib/jev-search-server.ts`](https://github.com/kylemclaren/jevsearch/blob/1df37decb960b3c4826c71b41d3393c15a8f28d3/src/lib/jev-search-server.ts)): a Noul per candidate ("would the visitor be glad to land here?"), a Choice over all candidates for the single best page, and a Noul for whether any candidate answers the query. Hits are ordered by 0.75 × relevance + 0.25 × best-answer probability, hits under the threshold (default 0.15) are dropped, and the result is cached in memory. If TypeSafe errors or exceeds the timeout (default 4 s), keyword order stands. The registry definition is in [`registry.json`](https://github.com/kylemclaren/jevsearch/blob/1df37decb960b3c4826c71b41d3393c15a8f28d3/registry.json).

## Get started

```sh
# In a shadcn/ui project
npx shadcn@latest add https://raw.githubusercontent.com/kylemclaren/jevsearch/1df37decb960b3c4826c71b41d3393c15a8f28d3/public/r/jev-search.json
echo 'TYPESAFE_API_KEY=your-key' >> .env.local

# Optional: index a folder of Markdown/MDX into lib/jev-search-index.json
npx shadcn@latest add https://raw.githubusercontent.com/kylemclaren/jevsearch/1df37decb960b3c4826c71b41d3393c15a8f28d3/public/r/jev-search-indexer.json
npx tsx scripts/jev-search-index.ts content/docs /docs
```

Then render `<JevSearch />` from `@/components/jev-search`. Each uncached query sends the query and up to 20 candidate titles, descriptions, and 320-character excerpts to TypeSafe and may incur charges.

## Examples and demos

- [Hosted demo](https://jevsearch.fly.dev) that searches the TypeSafe documentation (109 pages).
- `bun run bench` ([`bench/run.ts`](https://github.com/kylemclaren/jevsearch/blob/1df37decb960b3c4826c71b41d3393c15a8f28d3/bench/run.ts)) compares it with Lunr, Fuse.js, Orama, MiniSearch, FlexSearch, and Pagefind on 41 labelled queries over that corpus. The author-reported results in [`bench/results.json`](https://github.com/kylemclaren/jevsearch/blob/1df37decb960b3c4826c71b41d3393c15a8f28d3/bench/results.json) are Hit@1 83% with Jev versus 41% for its keyword pass alone and 41% for Lunr, a 278 ms median uncached, and about $0.26 per thousand uncached searches. The benchmark calls the live API; it was not rerun for this listing.

## Limits and data handling

The query and candidate excerpts go over HTTPS to TypeSafe; the index and keyword pass stay on your server. The cache is in memory per process. The bundled sample index has three documents and must be replaced. The benchmark covers one corpus and was run by the author.

## Review and maintenance

Reviewed on **2026-09-23** at [commit 1df37de](https://github.com/kylemclaren/jevsearch/tree/1df37decb960b3c4826c71b41d3393c15a8f28d3) by the maintainer. In a fresh clone, `bun install && bun run build` (shadcn registry build plus Astro build) passed; the build makes no TypeSafe calls. No live TypeSafe queries or benchmark runs were made for this review, and it makes no independent quality or accuracy claims.

Related: [jev-reranker](jev-reranker.md), [jev-reranker (hotchpotch)](hotchpotch-jev-reranker.md), [sieve](sieve.md), [Jev Search](../apps/jev-search.md).
Loading