Stop Parsing LLM Answers: Classify Any Text From Your Terminal With jev-cli
DEV Community

Stop Parsing LLM Answers: Classify Any Text From Your Terminal With jev-cli

Stop Parsing LLM Answers: Classify Any Text From Your Terminal With jev-cli

Every developer who has plugged an LLM into a script knows this moment. You ask a simple question: "Is this customer angry?" The model answers with a friendly paragraph. Now you write code to parse that paragraph. Tomorrow it words things differently, and your parser breaks. You didn't want a paragraph. You wanted a yes or no, and ideally how sure it is. That is why we built jev-cli, a free, open-source command-line tool that turns any text into a clear, typed answer your code can act on.

What is jev-cli?

jev-cli is an open-source CLI for Jev, a model from TypeSafe AI that never writes text. Instead of a reply, it gives you back a probability. You give it two things:

  • Some text (a support ticket, a review, a commit message, an AI's answer)
  • A question you define

You get back a number. Your script decides what to do with it.

How It Works

The tool converts unstructured text into a typed answer that your code can directly act upon. Rather than parsing a paragraph, you receive a calibrated probability that your program can use for branching decisions.

Question Types

jev-cli supports three kinds of questions, each designed for different classification needs:

Type When to Ask What You Get Back
noul Something is true or not Probability of "yes", 0 to 1
choice One option out of many must win The winner plus a probability for each option
score You want a position on a scale A level on your own 2 to 10 step rubric

For example, routing a ticket to the right team uses the choice type:

jev choice "Which team should handle this?" \
    --state-file ticket.txt \
    --option billing \
    --option technical \
    --option other

Practical Applications

With jev-cli, you can perform real tasks across development workflows:

  • Triage support tickets: Determine which team, how urgent, and how upset based on the state of the ticket.
  • Moderate content: Flag rule breaks and send borderline cases to a human.
  • Gate CI jobs: Decide whether a commit needs a changelog entry.
  • Guard an AI pipeline: Check if the user's input is on topic or if the model actually answered.
  • Score feedback at scale: Rate 50,000 reviews in one resumable batch run.
  • Label a dataset: Turn a folder of documents into labeled rows.

Answers become exit codes, enabling seamless integration with shell scripts and CI pipelines. They also produce JSON output suitable for scripts and MCP tools for AI agents.

Integration with AI Agents

jev-cli is designed to work efficiently alongside popular AI coding assistants. Instead of the large model wasting tokens repeatedly deciding relevance, it delegates small judgment calls to jev. Key integrations include:

  • jev mcp serve - Runs jev as an MCP server, describing every command in JSON so agents don't have to guess.
  • Dry-run mode - Checks a request offline, for free, before any resources are spent (--dry-run).
  • API key security - Your API key is stored via environment variable (TYPESAFE_API_KEY) and never appears as a command-line flag, keeping it out of shell history.

Installation

Installation is quick and straightforward:

curl -fsSL https://raw.githubusercontent.com/shaharia-lab/jev-cli/main/install.sh | sh

Alternatively, on macOS, use Homebrew:

brew install shaharia-lab/tap/jev

Once installed, set your TypeSafe API key and ask your first question:

export TYPESAFE_API_KEY="your-key-here"
jev noul "Is this message angry?" \
    --state "You charged me twice. Fix it now."

License and Disclaimer

jev-cli is free, open source, and built in the open. It is an unofficial, community project and is not affiliated with, endorsed by, or sponsored by TypeSafe AI. "TypeSafe" and "Jev" belong to their owner. To use the tool, you need a TypeSafe API key.


Quick Start Example

jev noul "Is this customer angry?" \
    --state "You charged me twice. Fix it now." \
    --fail-under 0.7 \
    --quiet

Exit 0 means the condition holds (the issue is likely about billing), while Exit 10 means it doesn't (and that is never treated as an error). Uncertain cases can be directed to a human with --abstain-band 0.4,0.6.

Read on DEV Community ↗ ← Back to News

Comments

No comments yet. Start the discussion.