shipwithjev

Catalog / Tools & apps

0487GitHub

semdecide

Typed semantic decisions for Unix pipelines and CI.

sharziki/semdecideREADME ↗
# SemDecide

**Typed semantic decisions for Unix pipelines and CI, powered by TypeSafe AI Jev.**

SemDecide is `grep` for meaning and `jq` for judgment. Pipe in text or JSONL and get a predicate, route, score, filtered stream, and stable process exit code without writing prompt, parsing, retry, or confidence-handling glue.

```bash
printf '%s' 'Login from a new country, followed by payout changes.' \
  | semdecide is 'This describes a plausible account takeover'
```

```text
TRUE probability=0.860 threshold=0.700
```

## Why

Exact string rules cannot express concepts such as:

- “This customer is likely to churn.”
- “This change introduces a breaking API behavior.”
- “This record may describe account takeover.”
- “This response is grounded and complete.”

General-purpose LLM calls can make those judgments, but they are awkward to place in shell scripts. They generate text that must be parsed, are comparatively slow and expensive, and often hide uncertainty.

Jev returns typed decisions instead. SemDecide gives those decisions predictable Unix input, output, limits, retries, schemas, and exit behavior.

## Install

SemDecide requires Python 3.10 or newer.

```bash
pipx install https://github.com/sharziki/semdecide/releases/download/v0.2.1/semdecide-0.2.1-py3-none-any.whl
# or, with uv
uv tool install https://github.com/sharziki/semdecide/releases/download/v0.2.1/semdecide-0.2.1-py3-none-any.whl
```

SemDecide is not yet published on PyPI. The commands above install the signed-off GitHub release artifact directly.

From a source checkout:

```bash
python3 -m venv .venv
.venv/bin/pip install -e .
```

Set a [TypeSafe AI](https://typesafe.ai) API key:

```bash
export TYPESAFE_API_KEY='...'
```

SemDecide also reads `~/.config/typesafe/credentials.env`:

```bash
TYPESAFE_AP

Also filed under Tools & apps