Skip to content

jev-swap

CLI that scans TS/JS and Python code for LLM calls that are really decisions, converts them to Jev and shadow-tests them on real traffic.

DemobetaMIT

Overview

jev-swap finds LLM calls in a codebase that return only a decision (an enum, boolean, small integer range or yes/no answer) and helps move them to TypeSafe Jev. The scan command recognises OpenAI, Anthropic, AI SDK and LangChain structured-output calls as well as raw HTTP posts to OpenAI, Anthropic or OpenRouter. Convert generates one Jev module per candidate with a decide() function and a confidence-gated fallback to the original LLM. Shadow replays recorded inputs and LLM outputs through Jev and writes a cost and agreement report.

A live shadow proxy forwards every request to the real API unchanged while mirroring matching ones to Jev, with a dashboard of agreement, latency, savings, confidence curve and disagreements; once enough samples meet a target, a threshold can be applied to the generated module. It also has an OSS mode that estimates percentage savings for public repositories. A mock mode allows trying the pipeline without a key. Limits include no mirroring of streaming requests.

What the decision model decides

TypeQuestionAnswers
OtherMirrors the existing LLM decision (enum, boolean, small integer or yes/no) as an equivalent Jev Choice, Score or Noul—

How it works

  1. Scan codebase for decision-type LLM calls
  2. Convert each into a Jev module with a confidence-gated fallback
  3. Shadow-test on recorded samples or via a live proxy
  4. Apply a threshold once agreement meets the target

Strengths

  • Evidence-based migration: compare agreement and savings before switching
  • Proxy forwards traffic unchanged, so production is unaffected
  • Keyless mock mode for trying the flow
  • Published on npm

Caveats

  • Streaming requests are not mirrored
  • Jev state is only the last user message in proxy mode
  • Mirrored samples contain user inputs and must be kept private

Getting started

npx jev-swap scan ./your-app (Node >= 22.12; Python >= 3.9 for Python scanning).

At a glance

Type
Demo
Status
beta
Language
TypeScript
Runtime
Node CLI / proxy
Has code
yes
License
MIT

Use cases and integrations

How curated lists describe it

  • Find the LLM calls in your codebase that are really decisions, see what they'd save on TypeSafe Jev, and prove it on live traffic before you swap. TypeScript, JavaScript, Python.

    logicrw/awesome-jev-projects
  • Find the LLM calls in your codebase that are really decisions, see what they.

    wh000wh000/awesome-jev-live
  • Find the LLM calls in your codebase that are really decisions, see what they'd save on TypeSafe Jev, and prove it on live traffic before you swap. TypeScript, JavaScript, Python.

    hellogumbo/awesome-jev

Frequently asked questions

What kinds of LLM calls can it convert?

Calls whose output is an enum, boolean, small integer range or yes/no answer, across OpenAI, Anthropic, AI SDK, LangChain and raw HTTP.

Will it change my app's behaviour while testing?

No. The proxy forwards every request unchanged and only mirrors matching ones to Jev.

Can I try it without a TypeSafe key?

Yes, use --mock for a clearly labelled simulated Jev.

Related projects

  • Skill and MCP service that audits an app for AI calls that are really decisions and shadow-tests migrating them to Jev.

    MCP serverbetaTypeScript
  • winnow★ 110

    Calibrated context sieve for Claude Code: Jev judges each block of large tool output and hides confident-no blocks behind recallable stubs.

    Projectbeta
  • Local code search for coding agents: ripgrep/BM25 shortlist, then Jev judges each chunk's relevance, served over MCP.

    MCP serverbetaRust
  • Codex and Claude Code skills that narrow a repository locally and let Jev judge which candidate files the coding model needs.

    ProjectprototypeGo
  • Code search CLI and agent skill (jg) where Jev judges relevance across folders, files and declarations to return excerpts.

    Agent skillbetaTypeScript
  • Hack Club's lightweight LLM proxy, listed for adding a Jev forwarding endpoint behind its auth, limits and usage logging.

    MCP serverproductionTypeScript